Adding new config system, template modbus coke, AUTHIDENT in client
[tpg/opendispense2.git] / src / server / Makefile
index 6acb88c..300145d 100644 (file)
@@ -1,16 +1,18 @@
 # OpenDispense 2
 #
 
-OBJ := main.o server.o logging.o
+INSTALLDIR := /usr/local/opendispense2
+
+OBJ := main.o server.o logging.o config.o
 OBJ += dispense.o itemdb.o
 OBJ += handler_coke.o handler_snack.o handler_door.o
 BIN := ../../dispsrv
 
 DEPFILES := $(OBJ:%.o=%.d)
 
-LINKFLAGS := -g ../../cokebank.so -lutil -lident -Wl,-rpath,. -Wl,-rpath,/usr/local/sbin
+LINKFLAGS := -g ../../cokebank.so -lutil -lident -lmodbus -Wl,-rpath,. -Wl,-rpath,$(INSTALLDIR)
 CPPFLAGS := 
-CFLAGS := -Wall -Wextra -Werror -g
+CFLAGS := -Wall -Wextra -Werror -g -std=gnu99
 
 .PHONY: all clean
 
@@ -20,7 +22,7 @@ clean:
        $(RM) $(BIN) $(OBJ)
 
 $(BIN): $(OBJ)
-       $(CC) -o $(BIN) $(LINKFLAGS) $(OBJ)
+       $(CC) -o $(BIN) $(OBJ) $(LINKFLAGS)
 
 %.o: %.c
        $(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS)

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