Fixes fixes fixes, init.d script
[tpg/opendispense2.git] / src / server / Makefile
1 # OpenDispense 2
2 #
3
4 OBJ := main.o server.o logging.o
5 OBJ += dispense.o itemdb.o
6 OBJ += handler_coke.o handler_snack.o handler_door.o
7 BIN := ../../dispsrv
8
9 DEPFILES := $(OBJ:%.o=%.d)
10
11 LINKFLAGS := -g ../../cokebank.so -lutil -Wl,-rpath,. -Wl,-rpath,/usr/local/sbin
12 CPPFLAGS := 
13 CFLAGS := -Wall -Wextra -Werror -g
14
15 .PHONY: all clean
16
17 all: $(BIN)
18
19 clean:
20         $(RM) $(BIN) $(OBJ)
21
22 $(BIN): $(OBJ)
23         $(CC) -o $(BIN) $(LINKFLAGS) $(OBJ)
24
25 %.o: %.c
26         $(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS)
27         @cpp $< -MM -MF $*.d
28         
29 -include $(DEPFILES)
30

UCC git Repository :: git.ucc.asn.au