1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-30 17:18:21 +03:00

More makefile cleaning up and fixing. (gentoo)

This commit is contained in:
Alasdair Kergon 2009-10-05 13:46:00 +00:00
parent cf65a124e6
commit 437219e27d
7 changed files with 19 additions and 16 deletions

View File

@ -92,7 +92,7 @@ INSTALL_TARGETS = \
install_clvmd
clvmd: $(OBJECTS) $(top_builddir)/lib/liblvm-internal.a
$(CC) -o clvmd $(OBJECTS) $(CFLAGS) $(LDFLAGS) \
$(CC) $(CFLAGS) $(LDFLAGS) -o clvmd $(OBJECTS) \
$(LVMLIBS) $(LMLIBS) $(LIBS)
.PHONY: install_clvmd

View File

@ -32,7 +32,7 @@ LMLIBS += $(CPG_LIBS) $(SACKPT_LIBS)
CFLAGS += $(CPG_CFLAGS) $(SACKPT_CFLAGS)
cmirrord: $(OBJECTS) $(top_builddir)/lib/liblvm-internal.a
$(CC) -o cmirrord $(OBJECTS) $(LDFLAGS) \
$(CC) $(CFLAGS) $(LDFLAGS) -o cmirrord $(OBJECTS) \
$(LVMLIBS) $(LMLIBS) $(LIBS)
install: $(TARGETS)

View File

@ -42,11 +42,10 @@ include ../../make.tmpl
all: dmeventd
device-mapper: dmeventd $(LIB_STATIC)
LDFLAGS += -ldl -ldevmapper -lpthread
CLDFLAGS += -ldl -ldevmapper -lpthread
LIBS += -ldl -ldevmapper -lpthread
dmeventd: $(LIB_SHARED) $(VERSIONED_SHLIB) dmeventd.o
$(CC) -o $@ dmeventd.o $(CFLAGS) $(LDFLAGS) \
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ dmeventd.o \
-L. -ldevmapper-event $(LIBS) -rdynamic
.PHONY: install_dynamic install_static install_include \

View File

@ -18,7 +18,8 @@ top_builddir = @top_builddir@
VPATH = @srcdir@
INCLUDES += -I${top_srcdir}/tools
CLDFLAGS += -L${top_builddir}/tools -ldevmapper @LVM2CMD_LIB@
CLDFLAGS += -L${top_builddir}/tools
LIBS += -ldevmapper @LIB_PTHREAD@ @LVM2CMD_LIB@
SOURCES = dmeventd_mirror.c

View File

@ -18,7 +18,8 @@ top_builddir = @top_builddir@
VPATH = @srcdir@
INCLUDES += -I${top_srcdir}/tools
CLDFLAGS += -L${top_builddir}/tools -ldevmapper @LVM2CMD_LIB@
CLDFLAGS += -L${top_builddir}/tools
LIBS += -ldevmapper @LIB_PTHREAD@ @LVM2CMD_LIB@
SOURCES = dmeventd_snapshot.c

View File

@ -138,7 +138,8 @@ ifeq ("@HAVE_LIBDL@", "yes")
endif
ifeq ("@DMEVENTD@", "yes")
CLDFLAGS += -ldevmapper-event
CLDFLAGS += -L../daemons/dmeventd
LIBS += -ldevmapper-event
endif
LIB_NAME = liblvm-internal

View File

@ -17,6 +17,8 @@ top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
LIB_PTHREAD = @LIB_PTHREAD@
SOURCES =\
dumpconfig.c \
formats.c \
@ -110,24 +112,23 @@ include ../make.tmpl
device-mapper: $(TARGETS_DM)
dmsetup: dmsetup.o $(top_builddir)/libdm/libdevmapper.$(LIB_SUFFIX)
$(CC) -o $@ dmsetup.o $(CFLAGS) $(LDFLAGS) \
-L$(top_builddir)/libdm -ldevmapper $(LIBS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ dmsetup.o \
-L$(top_builddir)/libdm -ldevmapper $(LIBS) $(LIB_PTHREAD)
dmsetup.static: dmsetup.o $(interfacedir)/libdevmapper.a
$(CC) -o $@ dmsetup.o $(CFLAGS) $(LDFLAGS) -static \
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ dmsetup.o -static \
-L$(interfacedir) -ldevmapper $(LIBS) \
$(LIB_PTHREAD)
all: device-mapper
lvm: $(OBJECTS) lvm.o $(top_builddir)/lib/liblvm-internal.a
$(CC) -o $@ $(CFLAGS) $(OBJECTS) lvm.o \
$(LDFLAGS) $(LVMLIBS) $(LIBS) -rdynamic
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) lvm.o \
$(LVMLIBS) $(LIBS) $(LIB_PTHREAD) -rdynamic
LIB_PTHREAD = @LIB_PTHREAD@
lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(interfacedir)/libdevmapper.a
$(CC) -o $@ $(CFLAGS) $(OBJECTS) lvm-static.o -static \
-L$(interfacedir) $(LDFLAGS) $(LVMLIBS) $(LIBS) $(LIB_PTHREAD) -rdynamic
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) lvm-static.o -static \
-L$(interfacedir) $(LVMLIBS) $(LIBS) $(LIB_PTHREAD) -rdynamic
liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o
cat $(top_builddir)/lib/liblvm-internal.a > $@