greenhouse / petal / Makefile36 lines · 725B · raw
1include config.mk
2
3SRC = petal.c
4OBJ = ${SRC:.c=.o}
5
6all: petal
7
8.c.o:
9 ${CC} -c ${CFLAGS} $<
10
11${OBJ}: config.h config.mk
12
13config.h:
14 cp config.def.h $@
15
16petal: ${OBJ}
17 ${CC} -o $@ ${OBJ} ${LDFLAGS}
18
19clean:
20 rm -f petal ${OBJ}
21
22install: all
23 mkdir -p ${DESTDIR}${PREFIX}/bin
24 cp -f petal ${DESTDIR}${PREFIX}/bin
25 chmod 755 ${DESTDIR}${PREFIX}/bin/petal
26 mkdir -p ${DESTDIR}${PREFIX}/share/petal
27 cp -f style.css icon.svg ${DESTDIR}${PREFIX}/share/petal
28 chmod 644 ${DESTDIR}${PREFIX}/share/petal/style.css\
29 ${DESTDIR}${PREFIX}/share/petal/icon.svg
30
31uninstall:
32 rm -f ${DESTDIR}${PREFIX}/bin/petal\
33 ${DESTDIR}${PREFIX}/share/petal/style.css\
34 ${DESTDIR}${PREFIX}/share/petal/icon.svg
35
36.PHONY: all clean install uninstall