blob: c8fd77f45ccdf5a223b8b332db1c406fd1f68738 (
plain)
1 out=luminous
2 CCOPTS=-Wall
3
4 BINDIR=/usr/bin
5 INITDIR=/etc/rc.d
6 CONFDIR=/etc/
7
8 VERSION = 1
9 PATCHLEVEL = 2
10 SUBLEVEL = 0
11 EXTRAVERSION =
12
13 VERSTR = "$(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL))$(EXTRAVERSION)"
14 DATESTR = "$(shell date '+%F')"
15
16
17 all:
18 if [ ! -d obj ]; then mkdir obj; fi
19 cc $(CCOPTS) $(DBG) src/config.c -c -o obj/config.o
20 cc $(CCOPTS) $(DBG) \
21 -DVERSTR=$(VERSTR) \
22 -D DATESTR=$(DATESTR) \
23 obj/*.o src/main.c -o luminous
24
25 install:
26 install -D luminous ${DESTDIR}/${BINDIR}/luminous
27 install -D init.sh ${DESTDIR}/${INITDIR}/luminous
28 install -D sample.conf ${DESTDIR}/${CONFDIR}/luminous.conf
29
30 debug:
31 make DBG=-g
32
33 leak-test:
34 make debug
35 valgrind --error-exitcode=1 luminous -l 800 && printf "\n\n--- No leaks found!\n\n"
36 valgrind --error-exitcode=1 luminous -l 150 && printf "\n\n--- No leaks found!\n\n"
|