--- Makefile.orig	2014-10-06 15:20:41.300883734 +0200
+++ Makefile	2014-10-06 15:22:08.936939085 +0200
@@ -1,6 +1,6 @@
 INCLUDES =-I/usr/include -I/usr/local/include
-LIBINC =-L/usr/X11R6/lib -L/usr/include/lib
 LIBS = -lX11 -lXpm -lXext
+CC = gcc
 
 TARGET = wmbutton
 OBJECTS = wmbutton.o wmb_libs.o
@@ -14,13 +14,11 @@
 INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
 INSTALL_FILE    = $(INSTALL) -p -o root -g root -m 644
 
-CFLAGS += -Wall -O2
-
 .c.o:
-	gcc -c ${CFLAGS} ${INCLUDES} $< -o $*.o
+	${CC} -c ${CFLAGS} ${INCLUDES} $< -o $*.o
 
 ${TARGET}: ${OBJECTS}
-	gcc -o ${TARGET} ${OBJECTS} ${LIBINC} ${LIBS}
+	${CC} ${LDFLAGS} ${OBJECTS} ${LIBS} -o ${TARGET} 
 
 clean::
 	for i in ${OBJECTS}; do if [ -e $$i ] ; then rm $$i; fi; done 
