summaryrefslogtreecommitdiff
path: root/Makeconf
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1998-07-07 15:45:11 +0000
committerThomas Bushnell <thomas@gnu.org>1998-07-07 15:45:11 +0000
commit5f2a4f9ab0ad19a2a0a9e1a0050b5693af855e44 (patch)
tree41b3a89f4ad8a05b6fd6c7f9c0df6363d2572b34 /Makeconf
parent9755910e9b8c9dcf7b87cc62d00a884aac65a3d3 (diff)
Tue Jul 7 11:39:08 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
* 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).
Diffstat (limited to 'Makeconf')
-rw-r--r--Makeconf17
1 files changed, 12 insertions, 5 deletions
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 $@