about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-10-07 18:45:11 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-10-07 18:45:11 +0000
commit9eba0808f20753cd15887b057f0d0fb20e663c03 (patch)
tree29e0776b5bf387175c31e3368d6b7c2c4e61a3d2
parent0bf54ddfa2a0efcf6142ad1292abbfa26fe0bee3 (diff)
downloadnetpbm-mirror-9eba0808f20753cd15887b057f0d0fb20e663c03.tar.gz
netpbm-mirror-9eba0808f20753cd15887b057f0d0fb20e663c03.tar.xz
netpbm-mirror-9eba0808f20753cd15887b057f0d0fb20e663c03.zip
Add CPPFLAGS to builds where it is missing
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@83 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--Makefile.common10
-rw-r--r--converter/other/jpeg2000/libjasper/Makefile.common2
-rw-r--r--converter/other/pnmtopalm/Makefile3
-rw-r--r--lib/Makefile4
-rw-r--r--lib/util/Makefile2
-rw-r--r--urt/Makefile3
6 files changed, 13 insertions, 11 deletions
diff --git a/Makefile.common b/Makefile.common
index c31013c6..0d9ee5e2 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -61,13 +61,13 @@
 #   libjpeg.  All header files from the Netpbm source tree take precedence
 #   over these.
 
-# In addition, there is CADD, which is extra C compilation flags and
+# In addition, there is CADD, which is extra C compilation options and
 # is intended to be set on a make command line (e.g. 'make CADD=-g')
-# for flags that apply just to a particular build.
+# for options that apply just to a particular build.
 
 # In addition, there is CFLAGS_PERSONAL, which is extra C
-# compilation flags and is expected to be set via environment variable
-# for flags that are particular to the person doing the build and not
+# compilation options and is expected to be set via environment variable
+# for options that are particular to the person doing the build and not
 # specific to Netpbm.
 
 include $(SRCDIR)/Makefile.version
@@ -320,7 +320,7 @@ $(PORTBINARIES) $(MATHBINARIES): %: %.o $(NETPBMLIB) $(LIBOPT)
 
 %.o2: %.c importinc
 # Note that the user may have configured -I options into CFLAGS.
-	$(CC) -c $(INCLUDES) -DNDEBUG $(CFLAGS) \
+	$(CC) -c $(INCLUDES) -DNDEBUG $(CPPFLAGS) $(CFLAGS) \
 	  "-Dmain=main_$*" \
           $(CFLAGS_MERGE) $(CFLAGS_PERSONAL) $(CADD) -o $@ $<
 
diff --git a/converter/other/jpeg2000/libjasper/Makefile.common b/converter/other/jpeg2000/libjasper/Makefile.common
index 7737f2c0..d2cb7d42 100644
--- a/converter/other/jpeg2000/libjasper/Makefile.common
+++ b/converter/other/jpeg2000/libjasper/Makefile.common
@@ -26,7 +26,7 @@ INCLUDES = -I$(JASPERSRCDIR)/include -Iimportinc
 DEFS = -DHAVE_LIBM=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STDDEF_H=1 -DEXCLUDE_BMP_SUPPORT -DEXCLUDE_RAS_SUPPORT -DEXCLUDE_MIF_SUPPORT -DEXCLUDE_JPG_SUPPORT -DEXCLUDE_PGX_SUPPORT -DEXCLUDE_PNM_SUPPORT
 
 $(LIB_OBJECTS):%.o:%.c
-	$(CC) -c $(CFLAGS) $(INCLUDES) $(DEFS) $(CADD) $<
+	$(CC) -c $(CPPFLAGS) $(CFLAGS) $(INCLUDES) $(DEFS) $(CADD) $<
 
 $(LIB_OBJECTS): importinc
 
diff --git a/converter/other/pnmtopalm/Makefile b/converter/other/pnmtopalm/Makefile
index d7bf2829..3d802ed6 100644
--- a/converter/other/pnmtopalm/Makefile
+++ b/converter/other/pnmtopalm/Makefile
@@ -25,7 +25,8 @@ $(BINARIES): %: %.o palmcolormap.o $(NETPBMLIB) $(LIBOPT)
 	  $(MATHLIB) $(LDLIBS) $(RPATH) $(LADD)
 
 gen_palm_colormap : % : %.c palmcolormap.o
-	$(CC) -I importinc $(CFLAGS) $(LDFLAGS) -o $@ $< palmcolormap.o \
+	$(CC) -I importinc $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
+	  $< palmcolormap.o \
 	  $(LIBOPTS) $(MATHLIB) $(LDLIBS) $(LADD)
 
 
diff --git a/lib/Makefile b/lib/Makefile
index 704b838a..0f333c2b 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -79,8 +79,8 @@ extra_staticlib: $(EXTRA_STATICLIB)
 #----------------------------------------------------------------------------
 
 $(LIBOBJECTS): %.o: %.c importinc
-# Note that the user may have configured -I options into CFLAGS.
-	$(CC) -c $(INCLUDES) -DNDEBUG $(CFLAGS) $(CFLAGS_SHLIB) \
+# Note that the user may have configured -I options into CPPFLAGS/CFLAGS.
+	$(CC) -c $(INCLUDES) -DNDEBUG $(CPPFLAGS) $(CFLAGS) $(CFLAGS_SHLIB) \
 	  $(CFLAGS_PERSONAL) $(CADD) -o $@ $<
 
 MAJ = $(NETPBM_MAJOR_RELEASE)
diff --git a/lib/util/Makefile b/lib/util/Makefile
index ffa1db5b..d770555f 100644
--- a/lib/util/Makefile
+++ b/lib/util/Makefile
@@ -20,7 +20,7 @@ include $(SRCDIR)/Makefile.common
 INCLUDES = -I $(BUILDDIR) -I $(SRCDIR)/$(SUBDIR)/..
 
 $(UTILOBJECTS):%.o:%.c importinc
-	$(CC) -c $(INCLUDES) -DNDEBUG $(CFLAGS) $(CFLAGS_SHLIB) \
+	$(CC) -c $(INCLUDES) -DNDEBUG $(CPPFLAGS) $(CFLAGS) $(CFLAGS_SHLIB) \
 	  $(CFLAGS_PERSONAL) $(CADD) -o $@ $<
 
 testnstring: test.c nstring.h nstring.o
diff --git a/urt/Makefile b/urt/Makefile
index 04dd2913..930cae6c 100644
--- a/urt/Makefile
+++ b/urt/Makefile
@@ -24,7 +24,8 @@ librle.a: $(LIBOBJECTS)
 
 # Rule for objects.
 $(LIBOBJECTS): %.o: %.c importinc
-	$(CC) -c $(CFLAGS) -I importinc -o $@ $< $(CFLAGS_PERSONAL) $(CADD)
+	$(CC) -c $(CPPFLAGS) $(CFLAGS) -I importinc -o $@ \
+	  $< $(CFLAGS_PERSONAL) $(CADD)
 
 BINARIES =
 SCRIPTS =