File dmenu-optflags.patch of Package dmenu

Index: dmenu-4.7/Makefile
===================================================================
--- dmenu-4.7.orig/Makefile
+++ dmenu-4.7/Makefile
@@ -16,7 +16,7 @@ options:
 
 .c.o:
 	@echo CC $<
-	@${CC} -c ${CFLAGS} $<
+	${CC} -c ${CFLAGS} $<
 
 config.h:
 	@echo creating $@ from config.def.h
@@ -26,11 +26,11 @@ ${OBJ}: arg.h config.h config.mk drw.h
 
 dmenu: dmenu.o drw.o util.o
 	@echo CC -o $@
-	@${CC} -o $@ dmenu.o drw.o util.o ${LDFLAGS}
+	${CC} $(CFLAGS) -o $@ dmenu.o drw.o util.o ${LDFLAGS}
 
 stest: stest.o
 	@echo CC -o $@
-	@${CC} -o $@ stest.o ${LDFLAGS}
+	${CC} $(CFLAGS) -o $@ stest.o ${LDFLAGS}
 
 clean:
 	@echo cleaning
Index: dmenu-4.7/config.mk
===================================================================
--- dmenu-4.7.orig/config.mk
+++ dmenu-4.7/config.mk
@@ -23,9 +23,9 @@ INCS = -I${X11INC} -I${FREETYPEINC}
 LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
 
 # flags
-CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
-CFLAGS   = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
-LDFLAGS  = -s ${LIBS}
+CPPFLAGS += -D_GNU_SOURCE -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
+CFLAGS := $(CFLAGS) -Wall ${INCS} ${CPPFLAGS}
+LDFLAGS  += ${LIBS}
 
 # compiler and linker
 CC = cc
openSUSE Build Service is sponsored by