1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
Description: Fixes to introduce build hardening
This patch modifies the upstream source to introduce build
hardening. Additionally it fixes upstream source to work properly
with CDBS build system.
Author: Vasudev Kamath <kamathvasudev@gmail.com>
Last-Updated: 2012-03-12
Forwaded: not-needed
--- a/config.mk
+++ b/config.mk
@@ -10,17 +10,16 @@
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
-GTKINC = `pkg-config --cflags gtk+-2.0 webkit-1.0`
-GTKLIB = `pkg-config --libs gtk+-2.0 webkit-1.0`
+GTKINC = $(shell pkg-config --cflags gtk+-2.0 webkit-1.0)
+GTKLIB = $(shell pkg-config --libs gtk+-2.0 webkit-1.0)
# includes and libs
INCS = -I. -I/usr/include -I${X11INC} ${GTKINC}
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${GTKLIB} -lgthread-2.0
# flags
-CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE
-CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
-LDFLAGS = -g ${LIBS}
+SCPPFLAGS += -DVERSION=\"${VERSION}\" -D_BSD_SOURCE
+SCFLAGS += -std=c99
# Solaris
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@
.c.o:
@echo CC $<
- ${CC} -c ${CFLAGS} $<
+ ${CC} -c ${SCFLAGS} ${SCPPFLAGS} ${CFLAGS} ${CPPFLAGS} ${INCS} $<
${OBJ}: config.h config.mk
@@ -26,7 +26,7 @@
surf: ${OBJ}
@echo CC -o $@
- ${CC} -o $@ surf.o ${LDFLAGS}
+ ${CC} -o $@ surf.o ${LDFLAGS} ${LIBS}
clean:
@echo cleaning
|