summaryrefslogtreecommitdiff
path: root/libstore/Makefile
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-03-14 21:09:29 +0000
committerRoland McGrath <roland@gnu.org>2002-03-14 21:09:29 +0000
commit4bf7af7062d8b7217b1e17337657863720ef2846 (patch)
tree3aa62a23d125b441f14462289a671567b323f4d5 /libstore/Makefile
parentfba1ada51bdfa7fea872c2f6a0e8745584df22c0 (diff)
2002-03-13 Roland McGrath <roland@frob.com>
* Makefile ($(store-types:%=libstore_%.a)): Create object files with the undefined symbol rather than linker scripts. 2002-03-11 Roland McGrath <roland@frob.com> * unzipstore.c: New file, broken out of bunzip2.c. * bunzip2.c: Most code moved to unzipstore.c, which we #include. (DO_UNZIP, UNZIP): New function, macro. * gunzip.c: Most code deleted, now in unzipstore.c, which we #include. (DO_UNZIP, UNZIP): New function, macro. * Makefile (DIST_FILES): New variable, list unzipstore.c here. * Makefile (module-CPPFLAGS): New variable. * module.c (STORE_SONAME_SUFFIX): Macro removed. * Makefile (store-types): Add missing types here. (SRCS): Remove all those from here and use $(store-types:=.c) instead. 2002-02-08 Roland McGrath <roland@frob.com> * Makefile (store-types): New variable. (all): Depend on $(store-types:%=libstore_%.a). (libstore_%.so.$(hurd-version)): New pattern rule. ($(store-types:%=libstore_%.a): libstore_%.a): New static pattern rule to create `-lstore_TYPE' pseudo-objects (linker scripts) for each type. (libstore.so-LDLIBS): New variable, adds -ldl. (GUNZIP_OBJS, BUNZIP2_OBJS): New variables. (UNZIP_OBJS): Variable removed, replaced by those two. (OBJS): Update use. (libstore_gunzip.so.$(hurd-version)): Depend on PIC $(GUNZIP_OBJS). (libstore_bunzip2.so.$(hurd-version)): Depend on PIC $(BUNZIP2_OBJS). * unknown.c: Add STORE_STD_CLASS decl. * bunzip2.c: Likewise. * copy.c: Likewise. * device.c: Likewise. * file.c: Likewise. * gunzip.c: Likewise. * memobj.c: Likewise. * module.c: Likewise. * mvol.c: Likewise. * nbd.c: Likewise. * open.c: Likewise. * part.c: Likewise. * remap.c: Likewise. * stripe.c: Likewise. * stripe.c: Likewise. * task.c: Likewise. * typed.c: Likewise. * typed.c: Likewise. * unknown.c: Likewise. * url.c: Likewise. * zero.c: Likewise. 2001-12-28 Roland McGrath <roland@frob.com> * Makefile (SRCS): Remove std.c.
Diffstat (limited to 'libstore/Makefile')
-rw-r--r--libstore/Makefile55
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)