diff options
| author | Wilfredo Sanchez <tritan@mit.edu> | 1999-10-26 01:49:53 +0000 |
|---|---|---|
| committer | Wilfredo Sanchez <tritan@mit.edu> | 1999-10-26 01:49:53 +0000 |
| commit | 576f92854331c90f779e721443dcd375e6851670 (patch) | |
| tree | 7730482a06f359c2997068ac71a5358d397dc0f9 /src/config | |
| parent | 3edb32acbb73c8d52e66ab71b71c0b5896fe5400 (diff) | |
Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES, LOCAL_INCLUDES such
that one can override CFLAGS from the command line without losing CPP
search patchs and defines. Some associated Makefile cleanup.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11876 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/libobj.in | 8 | ||||
| -rw-r--r-- | src/config/post.in | 2 | ||||
| -rw-r--r-- | src/config/pre.in | 11 |
3 files changed, 13 insertions, 8 deletions
diff --git a/src/config/libobj.in b/src/config/libobj.in index e2cf59572..f8af821c0 100644 --- a/src/config/libobj.in +++ b/src/config/libobj.in @@ -27,14 +27,12 @@ SONAME=@SONAME@ # PICFLAGS=@PICFLAGS@ PROFFLAGS=@PROFFLAGS@ -.SUFFIXES: .c .o .so .po -.c.o: - $(CC) $(CFLAGS) -c $< +.SUFFIXES: .c .so .po .c.so: - $(CC) $(PICFLAGS) $(CFLAGS) -c $< -o $*.so.o && \ + $(CC) $(DEFS) $(DEFINES) $(LOCALINCLUDES) $(PICFLAGS) $(CPPFLAGS) -c $< -o $*.so.o && \ $(MV) $*.so.o $*.so .c.po: - $(CC) $(PROFFLAGS) $(CFLAGS) -c $< -o $*.po.o && \ + $(CC) $(DEFS) $(DEFINES) $(LOCALINCLUDES) $(PROFFLAGS) $(CPPFLAGS) -c $< -o $*.po.o && \ $(MV) $*.po.o $*.po # rules to generate object file lists diff --git a/src/config/post.in b/src/config/post.in index 6a318288a..79b734bae 100644 --- a/src/config/post.in +++ b/src/config/post.in @@ -4,7 +4,7 @@ check-windows:: .depend: $(SRCS) $(SRCTOP)/util/depfix.sed if test -n "$(SRCS)" ; then \ - $(CC) -M $(CFLAGS) $(SRCS) | \ + $(CC) -M $(ALL_CFLAGS) $(SRCS) | \ sed -f $(SRCTOP)/util/depfix.sed | \ sed -e 's; $(SRCTOP)/; $$(SRCTOP)/;g' | \ sed -e 's; $(srcdir)/; $$(srcdir)/;g' | \ diff --git a/src/config/pre.in b/src/config/pre.in index b8d565ffd..45fb6d9ad 100644 --- a/src/config/pre.in +++ b/src/config/pre.in @@ -70,11 +70,12 @@ SRCTOP = @srcdir@/$(BUILDTOP) VPATH = @srcdir@ CONFIG_RELTOPDIR = @CONFIG_RELTOPDIR@ +ALL_CFLAGS = $(DEFS) $(DEFINES) $(LOCALINCLUDES) $(CPPFLAGS) $(CFLAGS) +CFLAGS = @CCOPTS@ CPPFLAGS = @CPPFLAGS@ -DEFS = @DEFS@ $(CPPFLAGS) +DEFS = @DEFS@ CC = @CC@ LD = $(PURE) @LD@ -CCOPTS = @CCOPTS@ DEPLIBS = @DEPLIBS@ LDFLAGS = @LDFLAGS@ LD_UNRESOLVED_PREFIX = @LD_UNRESOLVED_PREFIX@ @@ -284,6 +285,12 @@ COMPILE_ET_C= $(AWK) -f $(SRCTOP)/util/et/et_c.awk outfile=$@ .et.c: $(AWK) -f $(SRCTOP)/util/et/et_c.awk outfile=$*.c $< +# rule to make object files +# +.SUFFIXES: .c .o +.c.o: + $(CC) $(ALL_CFLAGS) -c $< + # ss command table rules # MAKE_COMMANDS= $(BUILDTOP)/util/ss/mk_cmds |
