wmbutton: Makefile install rewritten
[dockapps.git] / wmbutton / Makefile
blob1ac72985e9805d344581501d8dcd36836a5a93b2
1 INCLUDES =-I/usr/include -I/usr/local/include
2 LIBINC =-L/usr/X11R6/lib -L/usr/include/lib
3 LIBS = -lX11 -lXpm -lXext
5 TARGET = wmbutton
6 OBJECTS = wmbutton.o wmb_libs.o
7 DESTDIR = /usr/local
8 PREFIX = /usr
9 BINDIR = /bin
10 CONF = /etc
11 CONFFL = ${CONF}/wmbutton.conf
12 INSTALL = /usr/bin/install
14 CFLAGS += -Wall -O2
15 LDFLAGS +=
17 .c.o:
18 gcc -c ${CFLAGS} ${INCLUDES} $< -o $*.o
20 ${TARGET}: ${OBJECTS}
21 gcc -o ${TARGET} ${OBJECTS} ${LDFLAGS} ${LIBINC} ${LIBS}
23 clean::
24 for i in ${OBJECTS}; do if [ -e $$i ] ; then rm $$i; fi; done
25 if [ -e ${TARGET} ] ; then rm ${TARGET}; fi
26 if [ -e tags ]; then rm tags; fi
27 if [ -e core ]; then rm core; fi
29 install::
30 $(INSTALL) -d -m 0755 ${DESTDIR}${PREFIX}${BINDIR} ${DESTDIR}${CONF}
31 $(INSTALL) -p -o root -g root -m 755 wmbutton ${DESTDIR}${PREFIX}${BINDIR}
32 $(INSTALL) -p -o root -g root -m 644 sample.wmbutton ${DESTDIR}${CONFFL}
34 wmbutton.o: wmbutton.c wmbutton.h Makefile
36 wmb_libs.o: wmb_libs.c wmbutton.h Makefile
38 tags:
39 ctags *.[ch]