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-22 17:33:45 +00:00
|
|
|
DESTDIR = /usr/local
|
|
|
|
PREFIX = /usr
|
|
|
|
BINDIR = /bin
|
2012-08-21 18:32:07 +00:00
|
|
|
CONF = /etc
|
|
|
|
CONFFL = ${CONF}/wmbutton.conf
|
|
|
|
INSTALL = /usr/bin/install
|
|
|
|
|
|
|
|
CFLAGS += -Wall -O2
|
2012-08-22 17:33:45 +00:00
|
|
|
LDFLAGS +=
|
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}
|
2012-08-22 17:33:45 +00:00
|
|
|
gcc -o ${TARGET} ${OBJECTS} ${LDFLAGS} ${LIBINC} ${LIBS}
|
2012-08-20 08:02:36 +00:00
|
|
|
|
|
|
|
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::
|
2012-08-22 17:33:45 +00:00
|
|
|
$(INSTALL) -d -m 0755 ${DESTDIR}${PREFIX}${BINDIR} ${DESTDIR}${CONF}
|
|
|
|
$(INSTALL) -p -o root -g root -m 755 wmbutton ${DESTDIR}${PREFIX}${BINDIR}
|
|
|
|
$(INSTALL) -p -o root -g root -m 644 sample.wmbutton ${DESTDIR}${CONFFL}
|
2012-08-21 18:32:07 +00:00
|
|
|
|
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]
|