From f504521328d05d922b0f0752fa3c8382b969e34b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 25 Aug 2001 01:40:49 +0000 Subject: 2001-08-24 Roland McGrath * Makefile (SRCS): Add part.c here. (OBJS): Mutate part.o -> parted.o here. (parted.o, parted_p.o, parted_pic.o): New targets. (LDFLAGS-libstore.so): Set to $(PARTED_LIBS). --- libstore/Makefile | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/libstore/Makefile b/libstore/Makefile index 4a252bf4..3598a56c 100644 --- a/libstore/Makefile +++ b/libstore/Makefile @@ -26,16 +26,41 @@ libname = libstore SRCS = create.c derive.c make.c rdwr.c set.c device.c file.c stripe.c \ enc.c encode.c decode.c clone.c argp.c std.c kids.c zero.c flags.c \ open.c remap.c xinl.c task.c typed.c copy.c gunzip.c map.c mvol.c \ - bunzip2.c + bunzip2.c part.c LCLHDRS=store.h installhdrs=store.h HURDLIBS = shouldbeinlibc UNZIP_OBJS = unzip.o inflate.o util.o do-bunzip2.o -OBJS = $(SRCS:.c=.o) $(UNZIP_OBJS) +OBJS = $(patsubst part.o,parted.o,$(SRCS:.c=.o)) $(UNZIP_OBJS) # Look for zip stuff VPATH += $(srcdir)/../exec CPPFLAGS += -I$(srcdir)/../exec include ../Makeconf + +ifeq (,$(strip $(PARTED_LIBS))) +# Configure didn't find the Parted libraries, so we have no "part" store type. + +parted.o parted_p.o parted_pic.o: + $(CC) -o $@ -c -x c /dev/null + +else + +# We have Parted, so link against it. For the static libraries, +# we slurp in all the Parted code we need and stuff it into one +# object file along with our code that uses it. + +LDFLAGS-libstore.so += $(PARTED_LIBS) + +parted.o: part.o $(..)config.make + $(CC) -r -o $@ $< $(PARTED_LIBS) + +parted_p.o: part_p.o $(..)config.make + $(CC) -r -o $@ $< $(PARTED_LIBS:=_p) + +parted_pic.o: part_pic.o + ln -f $< $@ + +endif -- cgit v1.2.3