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

More build fixes

This commit is contained in:
Alasdair Kergon 2004-04-06 15:14:23 +00:00
parent 4ea7e4b8cc
commit c5ff6dfa74
4 changed files with 40 additions and 23 deletions

View File

@ -72,10 +72,6 @@ endif
LD_FLAGS += -L$(top_srcdir)/lib -L$(libdir)
ifeq ("@STATIC_LINK@", "yes")
LD_FLAGS += -static
endif
#CFLAGS += -DDEBUG_POOL
#CFLAGS += -DBOUNDS_CHECK
@ -140,16 +136,14 @@ $(TARGETS): $(OBJECTS)
%.o: %.c
$(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
%.pot: %.c
%.pot: %.c Makefile
$(CC) -E $(INCLUDES) -include $(top_srcdir)/include/pogen.h \
$(CFLAGS) $< > $@
%.pot: Makefile
%.so: %.o
$(CC) -c $(INCLUDES) $(CFLAGS) %< -o $@
$(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
%.so: $(OBJECTS) $(LD_DEPS)
$(LIB_SHARED): $(OBJECTS) $(LD_DEPS)
$(CC) $(SOFLAG) -Wl,-soname,$(notdir $@).$(LIB_VERSION) \
$(CLDFLAGS) $(OBJECTS) -o $@

View File

@ -16,7 +16,7 @@ srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
SOURCES=\
SOURCES =\
archiver.c \
dumpconfig.c \
lvchange.c \
@ -57,20 +57,26 @@ SOURCES=\
vgscan.c \
vgsplit.c
TARGETS=\
TARGETS =\
.commands \
lvm
LVMLIBS=-llvm
INSTALL_TARGETS = install_tools_dynamic
INSTALL_CMDLIB_TARGETS = install_cmdlib_dynamic
INSTALL_TARGETS=\
install_lvm_tools
ifeq ("@STATIC_LINK@", "yes")
TARGETS += lvm.static
INSTALL_TARGETS += install_tools_static
INSTALL_CMDLIB_TARGETS += install_cmdlib_static
endif
CLEAN_TARGETS = liblvm2cmd.so liblvm2cmd.a
LVMLIBS = -llvm
CLEAN_TARGETS = liblvm2cmd.so liblvm2cmd.a lvm lvm.static
ifeq ("@CMDLIB@", "yes")
TARGETS += liblvm2cmd.so
INSTALL_TARGETS += install_cmdlib
INSTALL_TARGETS += $(INSTALL_CMDLIB_TARGETS)
endif
ifeq ("@DEVMAPPER@", "yes")
@ -80,7 +86,11 @@ endif
include ../make.tmpl
lvm: $(OBJECTS) lvm.o $(top_srcdir)/lib/liblvm.a
$(CC) -o lvm $(OBJECTS) lvm.o $(LD_FLAGS) $(LVMLIBS) $(LIBS)
$(CC) -o $@ $(OBJECTS) lvm.o $(LD_FLAGS) $(LVMLIBS) $(LIBS) -rdynamic
lvm.static: $(OBJECTS) lvm.o $(top_srcdir)/lib/liblvm.a
$(CC) -o $@ $(OBJECTS) lvm.o -static $(LD_FLAGS) $(LVMLIBS) $(LIBS) \
-rdynamic
liblvm2cmd.a: $(top_srcdir)/lib/liblvm.a $(OBJECTS)
cat $(top_srcdir)/lib/liblvm.a > $@
@ -94,16 +104,24 @@ liblvm2cmd.so: liblvm2cmd.a $(LD_DEPS)
$(CC) -E -P cmdnames.h 2> /dev/null | \
egrep -v '^ *(|#.*|dumpconfig|help|pvdata|version) *$$' > .commands
.PHONY: install_lvm_tools install_cmdlib
.PHONY: install_cmdlib_dynamic install_cmdlib_static \
install_tools_dynamic install_tools_static
install_cmdlib: $(TARGETS)
install_cmdlib_dynamic: liblvm2cmd.so
$(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 555 $(STRIP) liblvm2cmd.so \
$(libdir)/liblvm2cmd.so.$(LIB_VERSION)
$(LN_S) -f liblvm2cmd.so.$(LIB_VERSION) $(libdir)/liblvm2cmd.so
$(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 444 lvm2cmd.h \
$(includedir)/lvm2cmd.h
install_lvm_tools: $(TARGETS)
install_cmdlib_static: liblvm2cmd.a
$(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 555 $(STRIP) liblvm2cmd.a \
$(libdir)/liblvm2cmd.a.$(LIB_VERSION)
$(LN_S) -f liblvm2cmd.a.$(LIB_VERSION) $(libdir)/liblvm2cmd.a
$(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 444 lvm2cmd.h \
$(includedir)/lvm2cmd.h
install_tools_dynamic: lvm .commands
$(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 555 $(STRIP) lvm \
$(sbindir)/lvm
@echo Creating symbolic links for individual commands in $(sbindir)
@ -114,5 +132,9 @@ install_lvm_tools: $(TARGETS)
done; \
)
install_tools_static: lvm.static
$(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 555 $(STRIP) lvm.static \
$(sbindir)/lvm.static
install: $(INSTALL_TARGETS)

View File

@ -1,5 +1,6 @@
/*
* Copyright (C) 2001 Sistina Software (UK) Limited.
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
* Copyright (C) 2004 Red Hat, Inc. All rights reserved.
*
* This file is part of LVM2.
*

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2001 Sistina Software (UK) Limited.
*
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
* Copyright (C) 2004 Red Hat, Inc. All rights reserved.
* This file is part of LVM2.
*
* This copyrighted material is made available to anyone wishing to use,