2012-08-21 18:32:07 +00:00
|
|
|
INCLUDES =-I/usr/include -I/usr/local/include
|
2012-08-20 08:02:36 +00:00
|
|
|
LIBINC =-L/usr/X11R6/lib -L/usr/include/lib
|
|
|
|
LIBS = -lX11 -lXpm -lXext
|
|
|
|
|
|
|
|
TARGET = wmbutton
|
|
|
|
OBJECTS = wmbutton.o wmb_libs.o
|
2012-08-21 18:32:07 +00:00
|
|
|
DESTDIR =
|
|
|
|
PREFIX = /usr/local
|
|
|
|
BINDIR = ${PREFIX}/bin
|
|
|
|
MANDIR = ${PREFIX}/share/man
|
|
|
|
CONF = /etc
|
|
|
|
CONFFL = ${CONF}/wmbutton.conf
|
|
|
|
INSTALL = /usr/bin/install
|
|
|
|
INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
|
|
|
|
INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
|
|
|
|
|
|
|
|
CFLAGS += -Wall -O2
|
2012-08-20 08:02:36 +00:00
|
|
|
|
|
|
|
.c.o:
|
2012-08-21 18:32:07 +00:00
|
|
|
gcc -c ${CFLAGS} ${INCLUDES} $< -o $*.o
|
2012-08-20 08:02:36 +00:00
|
|
|
|
|
|
|
${TARGET}: ${OBJECTS}
|
|
|
|
gcc -o ${TARGET} ${OBJECTS} ${LIBINC} ${LIBS}
|
|
|
|
|
|
|
|
clean::
|
|
|
|
for i in ${OBJECTS}; do if [ -e $$i ] ; then rm $$i; fi; done
|
|
|
|
if [ -e ${TARGET} ] ; then rm ${TARGET}; fi
|
|
|
|
if [ -e tags ]; then rm tags; fi
|
|
|
|
if [ -e core ]; then rm core; fi
|
|
|
|
|
2012-08-21 18:32:07 +00:00
|
|
|
install::
|
|
|
|
${INSTALL_PROGRAM} wmbutton ${DESTDIR}${BINDIR}
|
|
|
|
${INSTALL_FILE} sample.wmbutton ${DESTDIR}${CONFFL}
|
|
|
|
|
2012-08-20 08:02:36 +00:00
|
|
|
wmbutton.o: wmbutton.c wmbutton.h Makefile
|
|
|
|
|
|
|
|
wmb_libs.o: wmb_libs.c wmbutton.h Makefile
|
|
|
|
|
|
|
|
tags:
|
|
|
|
ctags *.[ch]
|