]> git.sven.stormbind.net Git - sven/jattach.git/blob - debian/patches/do-not-override-CFLAGS
fix order of CPPFLAGS and CFLAGS, make CFLAGS assignment more flexible
[sven/jattach.git] / debian / patches / do-not-override-CFLAGS
1 Description: do not override CFLAGS
2  By default the Makefile ignores the CFLAGS as
3  exported by dh.
4 Author: Sven Hoexter <hoexter@debian.org>
5
6 Index: jattach/Makefile
7 ===================================================================
8 --- jattach.orig/Makefile
9 +++ jattach/Makefile
10 @@ -16,7 +16,7 @@ else
11      SOURCES=$(RPM_ROOT)/SOURCES
12      SPEC_FILE=jattach.spec
13      CC=gcc
14 -    CFLAGS=-O2
15 +    CFLAGS ?= -O2
16      JATTACH_EXE=jattach
17    endif
18  endif
19 @@ -27,7 +27,7 @@ build:
20         mkdir -p build
21  
22  build/jattach: src/jattach_posix.c
23 -       $(CC) $(CFLAGS) -DJATTACH_VERSION=\"$(JATTACH_VERSION)\" -o $@ $^
24 +       $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DJATTACH_VERSION=\"$(JATTACH_VERSION)\" -o $@ $^
25  
26  build/jattach.exe: src/jattach_windows.c
27         $(CL) $(CFLAGS) /DJATTACH_VERSION=\"$(JATTACH_VERSION)\" /Fobuild/jattach.obj /Fe$@ $^ advapi32.lib /link /SUBSYSTEM:CONSOLE,5.02