(bugfix) Insufficient warning level to catch that bug
[tpg/opendispense2.git] / src / cokebank_sqlite / Makefile
1
2 BIN := ../../cokebank_sqlite.so
3 OBJ := main.o
4
5 CPPFLAGS := 
6 CFLAGS := -Wall -Wextra -Werror -g -fPIC -Wmissing-prototypes -Wstrict-prototypes
7 LDFLAGS := -shared -Wl,-soname,cokebank.so -lsqlite3
8
9 ifneq ($(USE_LDAP),)
10         CFLAGS += -DUSE_LDAP
11         LDFLAGS += -lldap
12 endif
13
14 DEPFILES := $(OBJ:%.o=%.d)
15
16 .PHONY: all clean
17
18 all:    $(BIN)
19
20 clean:
21         $(RM) $(BIN) $(OBJ) $(DEPFILES)
22
23 $(BIN): $(OBJ)
24         $(CC) $(LDFLAGS) -o $(BIN) $(OBJ)
25
26 %.o: %.c
27         $(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS)
28         @cpp $< -MM -MF $*.d
29         
30 -include $(DEPFILES)

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