diff options
Diffstat (limited to 'libstore/Makefile')
-rw-r--r-- | libstore/Makefile | 55 |
1 files changed, 47 insertions, 8 deletions
diff --git a/libstore/Makefile b/libstore/Makefile index 7050f13d..93dc1562 100644 --- a/libstore/Makefile +++ b/libstore/Makefile @@ -1,6 +1,6 @@ # Makefile for libstore # -# Copyright (C) 1995,96,97,2001 Free Software Foundation, Inc. +# Copyright (C) 1995,96,97,2001,02 Free Software Foundation, Inc. # Written by Miles Bader <miles@gnu.org> # # This file is part of the GNU Hurd. @@ -23,23 +23,48 @@ dir := libstore makemode := library 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 part.c nbd.c memobj.c url.c unknown.c +SRCS = create.c derive.c make.c rdwr.c set.c \ + enc.c encode.c decode.c clone.c argp.c kids.c flags.c \ + open.c xinl.c typed.c map.c url.c unknown.c \ + stripe.c $(filter-out ileave.c concat.c,$(store-types:=.c)) + +store-types = \ + bunzip2 \ + concat \ + copy \ + device \ + file \ + gunzip \ + ileave \ + memobj \ + module \ + mvol \ + nbd \ + remap \ + task \ + zero + +libstore.so-LDLIBS += -ldl LCLHDRS=store.h installhdrs=store.h HURDLIBS = shouldbeinlibc -UNZIP_OBJS = unzip.o inflate.o util.o do-bunzip2.o -OBJS = $(patsubst part.o,parted.o,$(SRCS:.c=.o)) $(UNZIP_OBJS) +GUNZIP_OBJS = unzip.o inflate.o util.o +BUNZIP2_OBJS = do-bunzip2.o +OBJS = $(patsubst part.o,parted.o,$(SRCS:.c=.o)) $(GUNZIP_OBJS) $(BUNZIP2_OBJS) +DIST_FILES = unzipstore.c # Look for zip stuff -VPATH += $(srcdir)/../exec +vpath %.c $(srcdir)/../exec CPPFLAGS += -I$(srcdir)/../exec include ../Makeconf +module-CPPFLAGS = -D'STORE_SONAME_SUFFIX=".so.$(hurd-version)"' + +libstore_gunzip.so.$(hurd-version): $(GUNZIP_OBJS:.o=_pic.o) +libstore_bunzip2.so.$(hurd-version): $(BUNZIP2_OBJS:.o=_pic.o) + ifeq (,$(strip $(PARTED_LIBS))) # Configure didn't find the Parted libraries, so we have no "part" store type. @@ -64,3 +89,17 @@ parted_pic.o: part_pic.o ln -f $< $@ endif + + +libstore_%.so.$(hurd-version): %_pic.o libstore.so + $(CC) -shared -Wl,-soname=$@ -o $@ \ + $(rpath) $(CFLAGS) $(LDFLAGS) $(libstore_$*.so-LDFLAGS) $^ + +# Each libstore_TYPE.a is in fact an object file script so that `-lstore_TYPE' +# just has the same effect as `-u store_TYPE_class'. +$(store-types:%=libstore_%.a): libstore_%.a: $(srcdir)/Makefile + $(CC) -r -nostdlib -nostartfiles -x c /dev/null \ + -o $@ -u store_$*_class + +# XXX need to install these +all: $(store-types:%=libstore_%.a) |