1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

build: libbase.a

This commit is contained in:
Joe Thornber 2018-06-04 13:53:07 +01:00
parent 29abba3785
commit 232918fb86
13 changed files with 26 additions and 26 deletions

View File

@ -214,6 +214,7 @@ endif
include test/unit/Makefile include test/unit/Makefile
include $(top_srcdir)/device_mapper/Makefile include $(top_srcdir)/device_mapper/Makefile
include $(top_srcdir)/base/Makefile
ifneq ($(shell which ctags),) ifneq ($(shell which ctags),)
.PHONY: tags .PHONY: tags

View File

@ -80,7 +80,7 @@ CFLAGS += -fno-strict-aliasing $(EXTRA_EXEC_CFLAGS)
INSTALL_TARGETS = \ INSTALL_TARGETS = \
install_clvmd install_clvmd
clvmd: $(OBJECTS) $(top_builddir)/lib/liblvm-internal.a $(top_builddir)/device_mapper/libdevice-mapper.a clvmd: $(OBJECTS) $(top_builddir)/lib/liblvm-internal.a $(INTERNAL_LIBS)
$(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) \ $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) \
-o clvmd $+ $(LMLIBS) $(LIBS) -o clvmd $+ $(LMLIBS) $(LIBS)

View File

@ -61,7 +61,7 @@ LIBS += $(PTHREAD_LIBS)
dmeventd: $(LIB_SHARED) dmeventd.o dmeventd: $(LIB_SHARED) dmeventd.o
$(CC) $(CFLAGS) -L. $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) dmeventd.o \ $(CC) $(CFLAGS) -L. $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) dmeventd.o \
-o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(top_builddir)/device_mapper/libdevice-mapper.a $(LIBS) -lm -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(INTERNAL_LIBS) $(LIBS) -lm
dmeventd.static: $(LIB_STATIC) dmeventd.o dmeventd.static: $(LIB_STATIC) dmeventd.o
$(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \ $(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \

View File

@ -36,13 +36,13 @@ LIBS += $(RT_LIBS) $(DAEMON_LIBS) $(PTHREAD_LIBS) -lm
lvmetad: $(OBJECTS) $(top_builddir)/libdaemon/client/libdaemonclient.a \ lvmetad: $(OBJECTS) $(top_builddir)/libdaemon/client/libdaemonclient.a \
$(top_builddir)/libdaemon/server/libdaemonserver.a \ $(top_builddir)/libdaemon/server/libdaemonserver.a \
$(top_builddir)/device_mapper/libdevice-mapper.a $(INTERNAL_LIBS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(top_builddir)/device_mapper/libdevice-mapper.a -ldaemonserver $(LIBS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) -ldaemonserver $(INTERNAL_LIBS) $(LIBS)
lvmetactl: lvmetactl.o $(top_builddir)/libdaemon/client/libdaemonclient.a \ lvmetactl: lvmetactl.o $(top_builddir)/libdaemon/client/libdaemonclient.a \
$(top_builddir)/libdaemon/server/libdaemonserver.a \ $(top_builddir)/libdaemon/server/libdaemonserver.a \
$(top_builddir)/device_mapper/libdevice-mapper.a $(INTERNAL_LIBS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ lvmetactl.o $(top_builddir)/device_mapper/libdevice-mapper.a $(LIBS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ lvmetactl.o $(INTERNAL_LIBS) $(LIBS)
CLEAN_TARGETS += lvmetactl.o CLEAN_TARGETS += lvmetactl.o

View File

@ -42,12 +42,10 @@ LIBS += $(RT_LIBS) $(DAEMON_LIBS) $(PTHREAD_LIBS)
lvmlockd: $(OBJECTS) $(top_builddir)/libdaemon/client/libdaemonclient.a \ lvmlockd: $(OBJECTS) $(top_builddir)/libdaemon/client/libdaemonclient.a \
$(top_builddir)/libdaemon/server/libdaemonserver.a $(top_builddir)/libdaemon/server/libdaemonserver.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LOCK_LIBS) -ldaemonserver \ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LOCK_LIBS) -ldaemonserver $(INTERNAL_LIBS) $(LIBS)
$(top_builddir)/device_mapper/libdevice-mapper.a $(LIBS)
lvmlockctl: lvmlockctl.o $(top_builddir)/libdaemon/client/libdaemonclient.a lvmlockctl: lvmlockctl.o $(top_builddir)/libdaemon/client/libdaemonclient.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ lvmlockctl.o \ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ lvmlockctl.o $(INTERNAL_LIBS) $(LIBS)
$(top_builddir)/device_mapper/libdevice-mapper.a $(LIBS)
install_lvmlockd: lvmlockd install_lvmlockd: lvmlockd
$(INSTALL_PROGRAM) -D $< $(sbindir)/$(<F) $(INSTALL_PROGRAM) -D $< $(sbindir)/$(<F)

View File

@ -34,8 +34,7 @@ LIBS += $(DAEMON_LIBS) -ldaemonserver $(PTHREAD_LIBS)
lvmpolld: $(OBJECTS) $(top_builddir)/libdaemon/client/libdaemonclient.a \ lvmpolld: $(OBJECTS) $(top_builddir)/libdaemon/client/libdaemonclient.a \
$(top_builddir)/libdaemon/server/libdaemonserver.a $(top_builddir)/libdaemon/server/libdaemonserver.a
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) \ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(INTERNAL_LIBS) $(LIBS)
$(top_builddir)/device_mapper/libdevice-mapper.a $(LIBS)
install_lvmpolld: lvmpolld install_lvmpolld: lvmpolld
$(INSTALL_PROGRAM) -D $< $(sbindir)/$(<F) $(INSTALL_PROGRAM) -D $< $(sbindir)/$(<F)

View File

@ -21,7 +21,6 @@ ifeq ("@CLUSTER@", "shared")
endif endif
SOURCES =\ SOURCES =\
../base/data-struct/radix-tree.c \
activate/activate.c \ activate/activate.c \
cache/lvmcache.c \ cache/lvmcache.c \
cache_segtype/cache.c \ cache_segtype/cache.c \

View File

@ -342,7 +342,7 @@ SUBDIRS.distclean := $(SUBDIRS:=.distclean)
TARGETS += $(LIB_SHARED) $(LIB_STATIC) TARGETS += $(LIB_SHARED) $(LIB_STATIC)
all: $(top_builddir)/device_mapper/libdevice-mapper.a $(SUBDIRS) $(TARGETS) all: $(SUBDIRS) $(TARGETS)
install: all $(SUBDIRS.install) install: all $(SUBDIRS.install)
install_cluster: all $(SUBDIRS.install_cluster) install_cluster: all $(SUBDIRS.install_cluster)
@ -351,7 +351,7 @@ install_lvm2: $(SUBDIRS.install_lvm2)
install_ocf: $(SUBDIRS.install_ocf) install_ocf: $(SUBDIRS.install_ocf)
cflow: $(SUBDIRS.cflow) cflow: $(SUBDIRS.cflow)
$(SUBDIRS): $(SUBDIRS.device-mapper) $(top_builddir)/device_mapper/libdevice-mapper.a $(SUBDIRS): $(SUBDIRS.device-mapper)
$(MAKE) -C $@ $(MAKE) -C $@
$(SUBDIRS.device-mapper): $(SUBDIRS.device-mapper):

View File

@ -342,7 +342,11 @@ SUBDIRS.distclean := $(SUBDIRS:=.distclean)
TARGETS += $(LIB_SHARED) $(LIB_STATIC) TARGETS += $(LIB_SHARED) $(LIB_STATIC)
all: $(top_builddir)/device_mapper/libdevice-mapper.a $(SUBDIRS) $(TARGETS) INTERNAL_LIBS=\
$(top_builddir)/device_mapper/libdevice-mapper.a \
$(top_builddir)/base/libbase.a
all: $(INTERNAL_LIBS) $(SUBDIRS) $(TARGETS)
install: all $(SUBDIRS.install) install: all $(SUBDIRS.install)
install_cluster: all $(SUBDIRS.install_cluster) install_cluster: all $(SUBDIRS.install_cluster)
@ -351,7 +355,7 @@ install_lvm2: $(SUBDIRS.install_lvm2)
install_ocf: $(SUBDIRS.install_ocf) install_ocf: $(SUBDIRS.install_ocf)
cflow: $(SUBDIRS.cflow) cflow: $(SUBDIRS.cflow)
$(SUBDIRS): $(SUBDIRS.device-mapper) $(top_builddir)/device_mapper/libdevice-mapper.a $(SUBDIRS): $(SUBDIRS.device-mapper) $(INTERNAL_LIBS)
$(MAKE) -C $@ $(MAKE) -C $@
$(SUBDIRS.device-mapper): $(SUBDIRS.device-mapper):

View File

@ -88,8 +88,8 @@ endif
CFLAGS_lvm2_activation_generator_systemd_red_hat.o += $(EXTRA_EXEC_CFLAGS) CFLAGS_lvm2_activation_generator_systemd_red_hat.o += $(EXTRA_EXEC_CFLAGS)
lvm2_activation_generator_systemd_red_hat: $(OBJECTS) $(DEPLIBS) $(top_builddir)/device_mapper/libdevice-mapper.a lvm2_activation_generator_systemd_red_hat: $(OBJECTS) $(DEPLIBS) $(INTERNAL_LIBS)
$(CC) -o $@ $(OBJECTS) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) $(LVMLIBS) $(top_builddir)/device_mapper/libdevice-mapper.a $(LIBS) $(CC) -o $@ $(OBJECTS) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) $(LVMLIBS) $(INTERNAL_LIBS) $(LIBS)
install_systemd_generators: install_systemd_generators:
$(INSTALL_DIR) $(systemd_generator_dir) $(INSTALL_DIR) $(systemd_generator_dir)

View File

@ -46,8 +46,7 @@ DEFS += -D_REENTRANT
DEPLIBS += $(top_builddir)/liblvm/liblvm2app.so DEPLIBS += $(top_builddir)/liblvm/liblvm2app.so
LDFLAGS+=\ LDFLAGS+=\
-L$(top_builddir)/liblvm \ -L$(top_builddir)/liblvm \
-L$(top_builddir)/daemons/dmeventd \ -L$(top_builddir)/daemons/dmeventd
-L$(top_builddir)/device_mapper/libdevice-mapper.a
LIBS += @LVM2APP_LIB@ $(DMEVENT_LIBS) LIBS += @LVM2APP_LIB@ $(DMEVENT_LIBS)
%.t: %.o $(DEPLIBS) %.t: %.o $(DEPLIBS)

View File

@ -34,7 +34,7 @@ UNIT_OBJECTS=$(UNIT_SOURCE:%.c=%.o)
CLEAN_TARGETS+=$(UNIT_DEPENDS) $(UNIT_OBJECTS) CLEAN_TARGETS+=$(UNIT_DEPENDS) $(UNIT_OBJECTS)
UNIT_LDLIBS += $(LVMINTERNAL_LIBS) -laio UNIT_LDLIBS += $(LVMINTERNAL_LIBS) -laio
test/unit/unit-test: $(UNIT_OBJECTS) lib/liblvm-internal.a device_mapper/libdevice-mapper.a test/unit/unit-test: $(UNIT_OBJECTS) lib/liblvm-internal.a $(INTERNAL_LIBS)
@echo " [LD] $@" @echo " [LD] $@"
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) \ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) \
-o $@ $+ $(UNIT_LDLIBS) -lm -o $@ $+ $(UNIT_LDLIBS) -lm

View File

@ -122,12 +122,12 @@ device-mapper: $(TARGETS_DM)
CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS) CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS)
dmsetup: dmsetup.o $(top_builddir)/device_mapper/libdevice-mapper.a dmsetup: dmsetup.o $(INTERNAL_LIBS)
@echo " [CC] $@" @echo " [CC] $@"
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) \ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) \
-o $@ $+ $(LIBS) -lm -o $@ $+ $(LIBS) -lm
dmsetup.static: dmsetup.o $(top_builddir)/device_mapper/libdevice-mapper.a dmsetup.static: dmsetup.o $(INTERNAL_LIBS)
@echo " [CC] $@" @echo " [CC] $@"
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \
-o $@ $+ $(M_LIBS) $(PTHREAD_LIBS) $(STATIC_LIBS) $(LIBS) -o $@ $+ $(M_LIBS) $(PTHREAD_LIBS) $(STATIC_LIBS) $(LIBS)
@ -138,7 +138,7 @@ CFLAGS_lvm.o += $(EXTRA_EXEC_CFLAGS)
INCLUDES += -I$(top_builddir)/tools INCLUDES += -I$(top_builddir)/tools
lvm: $(OBJECTS) lvm.o $(top_builddir)/lib/liblvm-internal.a $(top_builddir)/device_mapper/libdevice-mapper.a lvm: $(OBJECTS) lvm.o $(top_builddir)/lib/liblvm-internal.a $(INTERNAL_LIBS)
@echo " [CC] $@" @echo " [CC] $@"
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $+ \ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) -o $@ $+ \
$(LVMLIBS) $(READLINE_LIBS) $(LIBS) -lm $(LVMLIBS) $(READLINE_LIBS) $(LIBS) -lm
@ -157,7 +157,7 @@ ifeq ("@BUILD_LVMETAD@", "yes")
lvm: $(top_builddir)/libdaemon/client/libdaemonclient.a lvm: $(top_builddir)/libdaemon/client/libdaemonclient.a
endif endif
lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(top_builddir)/device_mapper/libdevice-mapper.a lvm.static: $(OBJECTS) lvm-static.o $(top_builddir)/lib/liblvm-internal.a $(INTERNAL_LIBS)
@echo " [CC] $@" @echo " [CC] $@"
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ \
$(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS) $(OBJECTS) lvm-static.o $(LVMLIBS) $(STATIC_LIBS) $(LIBS)