summaryrefslogtreecommitdiff
path: root/scripts/makefile.hpgcc
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2014-01-12 11:24:47 -0600
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2014-01-12 11:57:09 -0600
commite9a25f4568ec9ab3602fc32cd874ec520ff66cc3 (patch)
tree4ffa5488d9bd5b051db66d071777ebe99a6e6531 /scripts/makefile.hpgcc
parentc8ada608b966ead4e76db1cac1c33a9e914f4208 (diff)
downloadlibpng-e9a25f4568ec9ab3602fc32cd874ec520ff66cc3.tar.gz
[libpng15] Updated scripts/makefile.* to use CPPFLAGS (Cosmin)
Diffstat (limited to 'scripts/makefile.hpgcc')
-rw-r--r--scripts/makefile.hpgcc13
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/makefile.hpgcc b/scripts/makefile.hpgcc
index 3fe21177a..2551ba7b3 100644
--- a/scripts/makefile.hpgcc
+++ b/scripts/makefile.hpgcc
@@ -53,8 +53,8 @@ WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
# for pgcc version 2.95.1, -O3 is buggy; don't use it.
-CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \
- $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
+CPPFLAGS=-I$(ZLIBINC) # -DPNG_DEBUG=5
+CFLAGS=-W -Wall -O3 -funroll-loops $(ALIGN) # $(WARNMORE) -g
#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng15 -lz -lm
LDFLAGS=-L. -L$(ZLIBLIB) -lpng15 -lz -lm
@@ -86,8 +86,11 @@ OBJSDLL = $(OBJS:.o=.pic.o)
.SUFFIXES: .c .o .pic.o
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
+
.c.pic.o:
- $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
@@ -185,7 +188,7 @@ install: install-static install-shared install-man install-config
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) -I$(ZLIBINC) \
+ $(CC) -I$(DI) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) -Wl,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
@@ -194,7 +197,7 @@ test-dd:
test-installed:
echo
echo Testing installed dynamic shared library.
- $(CC) -I$(ZLIBINC) \
+ $(CC) $(CPPFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`