From 5f2a4f9ab0ad19a2a0a9e1a0050b5693af855e44 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Tue, 7 Jul 1998 15:45:11 +0000 Subject: Tue Jul 7 11:39:08 1998 Thomas Bushnell, n/BSG * Makeconf (%.o): New rules (from %.c and %.S) so that we can specify file-specific CPPFLAGS (already in use by utils/Makefile for utils/ping.c). (%_pic.o, $_p.o, make-deps): Also grok file-specific CPPFLAGS. Reported by Gordon Matzigkeit (gord@gnu.org). * INSTALL-cross: Updated by Gordon Matzigkeit (gord@gnu.org). --- Makeconf | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'Makeconf') diff --git a/Makeconf b/Makeconf index 0dfa1618..00e076f7 100644 --- a/Makeconf +++ b/Makeconf @@ -349,19 +349,26 @@ relink: vpath libutil.% $(libdir)/ +# Default rules to build standard object files. +%.o: %.c + $(COMPILE.c) $($*-CPPFLAGS) $< -o $@ + +%.o: %.S + $(COMPILE.S) $($*-CPPFLAGS) $< -o $@ + # Default rules to build PIC object files. %_pic.o: %.c - $(COMPILE.c) $< -DPIC -fPIC -o $@ + $(COMPILE.c) $($*-CPPFLAGS) $< -DPIC -fPIC -o $@ %_pic.o: %.S - $(COMPILE.S) $< -DPIC -o $@ + $(COMPILE.S) $($*-CPPFLAGS) $< -DPIC -o $@ # Default rules to build profiled object files. %_p.o: %.c - $(COMPILE.c) $< -DPROF -pg -o $@ + $(COMPILE.c) $($*-CPPFLAGS) $< -DPROF -pg -o $@ %_p.o: %.S - $(COMPILE.S) $< -DPROF -o $@ + $(COMPILE.S) $($*-CPPFLAGS) $< -DPROF -o $@ # How to build RPC stubs @@ -466,7 +473,7 @@ $(target): %: FORCE endif define make-deps -set -e; $(CC) $(CFLAGS) $(CPPFLAGS) -M -MG $< | \ +set -e; $(CC) $(CFLAGS) $(CPPFLAGS) $($*-CPPFLAGS) -M -MG $< | \ sed > $@.new -e 's/$*\.o:/$*.o $*_pic.o $*_p.o $@:/' \ -e 's% [^ ]*/gcc-lib/[^ ]*\.h%%g' mv -f $@.new $@ -- cgit v1.2.3