patch from Jakub Wilk adding noopt and nostrip build option support
[debian/sudo] / debian / rules
index 15f94a4bd037ead91d0700e166938f5c3a630591..5011197f7959fe02286bd7836c550cd27437ef26 100755 (executable)
@@ -2,9 +2,11 @@
 
 export DH_VERBOSE=1
 
-CFLAGS = -O2 -Wall -Wno-comment
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
-CFLAGS += -g
+CFLAGS = -Wall -Wno-comment -g
+ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
+    CFLAGS += -O0
+else
+    CFLAGS += -O2
 endif
 export CFLAGS