greenhouse

greenhouse

minimal software forge

git clone git@git.lostduk.com:greenhouse.git

greenhouse / petal / Makefile40 lines · 892B · 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	mkdir -p ${DESTDIR}${MANPREFIX}/man1
31	cp -f petal.1 ${DESTDIR}${MANPREFIX}/man1
32	chmod 644 ${DESTDIR}${MANPREFIX}/man1/petal.1
33
34uninstall:
35	rm -f ${DESTDIR}${PREFIX}/bin/petal\
36		${DESTDIR}${PREFIX}/share/petal/style.css\
37		${DESTDIR}${PREFIX}/share/petal/icon.svg\
38		${DESTDIR}${MANPREFIX}/man1/petal.1
39
40.PHONY: all clean install uninstall