summaryrefslogtreecommitdiff
path: root/Makeconf
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1996-09-17 16:43:48 +0000
committerThomas Bushnell <thomas@gnu.org>1996-09-17 16:43:48 +0000
commitdcf8f5b059e9ae3f767dc4069859dceba756328a (patch)
tree0079e8ac765fb551a9778ede1643145a954992a4 /Makeconf
parent88f8b13a55f5dac05830f486d0403b11b107c975 (diff)
*** empty log message ***
Diffstat (limited to 'Makeconf')
-rw-r--r--Makeconf19
1 files changed, 16 insertions, 3 deletions
diff --git a/Makeconf b/Makeconf
index 15139425..34de75be 100644
--- a/Makeconf
+++ b/Makeconf
@@ -12,10 +12,14 @@
# SRCS (all actual source code)
# LCLHDRS (all source headers in this directory [NOT MiG created])
# OBJS (all .o files used to produce some target).
+# HURDLIBS (all Hurd libraries used; with no directory name or `lib' attached)
+# For types `server' and `utility' an automatic dependency will be
+# written for these, and type `library' will include a .so dependency.
+# Types `servers' and `utilities'; you have to do it yourself.
# Types `server' and `utility' should define
-# OTHERLIBS (all other libraries used)
# target (the name of the program built)
+# OTHERLIBS (all libraries used)
# Types `servers' and `utilities' should define
# targets (the names of all the programs built)
@@ -67,6 +71,9 @@ top_srcdirinc=-I$(top_srcdir)
endif
CPPFLAGS += -I. $(srcdirinc) -I.. $(top_srcdirinc) -I$(top_srcdir)/include -D_GNU_SOURCE
CFLAGS += -Wall -g -O3
+
+# More useful version of HURDLIBS
+library_deps=$(foreach lib,$(HURDLIBS),$(..)lib$(lib)/lib$(lib).so)
# Local programs:
MKINSTALLDIRS = $(top_srcdir)/mkinstalldirs
@@ -200,7 +207,7 @@ ifeq ($(doinst),many)
endif
ifeq ($(doinst),one)
-$(target): $(OBJS) $(OTHERLIBS)
+$(target): $(OBJS) $(OTHERLIBS) $(library_deps)
endif
# Determine which sort of library we should link against from whether -static
@@ -230,11 +237,17 @@ $(libname).a: $(OBJS)
$(AR) r $@ $^
$(RANLIB) $@
-$(libname).so: $(patsubst %.o,%_pic.o,$(OBJS))
+$(libname).so: $(patsubst %.o,%_pic.o,$(OBJS)) $(library_deps)
$(CC) -shared -Wl,-soname=$(libname).so -o $(libname).so \
$(rpath) $(CFLAGS) $(LDFLAGS) $($@-LDFLAGS) $^
endif
+# Providing directory dependencies
+directory-depend: $(..)$(dir).d
+$(..)$(dir).d: Makefile
+ rm -f $@
+ echo $(dir): $(addprefix lib,$(HURDLIBS)) > $@
+
# Making a snapshot
distfiles = Makefile ChangeLog $(SRCS) $(LCLHDRS) $(DIST_FILES)
lndist: $(distfiles) $(top_srcdir)/hurd-snap/$(dir) FORCE