greenhouse

greenhouse

minimal software forge

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

greenhouse / hedge / Makefile34 lines · 641B · raw

1include config.mk
2
3SRC = hedge.c
4OBJ = ${SRC:.c=.o}
5
6all: hedge
7
8.c.o:
9	${CC} -c ${CFLAGS} $<
10
11${OBJ}: config.h config.mk
12
13config.h:
14	cp config.def.h $@
15
16hedge: ${OBJ}
17	${CC} -o $@ ${OBJ} ${LDFLAGS}
18
19clean:
20	rm -f hedge ${OBJ}
21
22install: all
23	mkdir -p ${DESTDIR}${PREFIX}/bin
24	cp -f hedge ${DESTDIR}${PREFIX}/bin
25	chmod 755 ${DESTDIR}${PREFIX}/bin/hedge
26	mkdir -p ${DESTDIR}${MANPREFIX}/man1
27	sed "s/VERSION/${VERSION}/g" < hedge.1 > ${DESTDIR}${MANPREFIX}/man1/hedge.1
28	chmod 644 ${DESTDIR}${MANPREFIX}/man1/hedge.1
29
30uninstall:
31	rm -f ${DESTDIR}${PREFIX}/bin/hedge\
32		${DESTDIR}${MANPREFIX}/man1/hedge.1
33
34.PHONY: all clean install uninstall