Add 03_Makefile.patch: allows to set CFLAGS; use CFLAGS in
authorgregor herrmann <gregoa@debian.org>
Fri, 20 Jun 2008 19:44:46 +0000 (19:44 -0000)
committergregor herrmann <gregoa@debian.org>
Fri, 20 Jun 2008 19:44:46 +0000 (19:44 -0000)
debian/rules; thanks again to Cesare Tirabassi!

debian/changelog
debian/patches/03_Makefile.patch [new file with mode: 0644]
debian/patches/series
debian/rules

index 3b5ad98..c70e1e2 100644 (file)
@@ -1,3 +1,10 @@
+cpulimit (1.1-12) UNRELEASED; urgency=low
+
+  * Add 03_Makefile.patch: allows to set CFLAGS; use CFLAGS in
+    debian/rules; thanks again to Cesare Tirabassi!
+
+ -- gregor herrmann <gregoa@debian.org>  Fri, 20 Jun 2008 21:37:59 +0200
+
 cpulimit (1.1-11) unstable; urgency=low
 
   * debian/rules:
diff --git a/debian/patches/03_Makefile.patch b/debian/patches/03_Makefile.patch
new file mode 100644 (file)
index 0000000..0e2c9a5
--- /dev/null
@@ -0,0 +1,16 @@
+Author: Cesare Tirabassi <norsetto@ubuntu.com>
+Description: allow to pass CFLAGS from debian/rules
+
+--- cpulimit-1.1.orig/Makefile
++++ cpulimit-1.1/Makefile
+@@ -1,7 +1,9 @@
++CFLAGS?=-Wall -O2
++
+ all:: cpulimit
+ cpulimit:     cpulimit.c
+-      gcc -o cpulimit cpulimit.c -lrt -Wall -O2
++      gcc -o cpulimit cpulimit.c -lrt $(CFLAGS)
+ clean:
+       rm -f *~ cpulimit
index 5bd1458..382c97c 100644 (file)
@@ -1,2 +1,3 @@
 01_priority.patch
 02_segfault_longoptions.patch
+03_Makefile.patch
index 120d148..7d6a9d7 100755 (executable)
@@ -22,7 +22,7 @@ endif
 build: build-stamp
 build-stamp: $(QUILT_STAMPFN)
        dh_testdir
-       $(MAKE)
+       CFLAGS="$(CFLAGS)" $(MAKE)
        touch $@
 
 clean: unpatch