improve log
[trinked.git] / Makefile
index 0c9fcc1..78e3db9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,12 @@
 CC=cc
 INCLUDE=-I/usr/local/include -I.
 LIB=-L/usr/local/lib -lhidapi
+INSTALL=install -o root 
 ifndef OS
 OS=$(shell uname)
 endif
 
-CFLAGS=-Wall -pedantic -std=c99 -O2 -g
+CFLAGS=-Wall -pedantic -std=c99 -O2 -g -DASSERT_CORE
 ifeq ($(OS), FreeBSD)
 endif
 
@@ -13,7 +14,7 @@ ifeq ($(OS), Linux)
 CFLAGS+= -D_GNU_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64
 endif
 
-OBJ=trinket.o main.o
+OBJ=trinket.o main.o tlog.o
 
 .SUFFIXES: .o.c
 
@@ -28,3 +29,6 @@ trinketd: $(OBJ)
 clean:
        rm -rf *core *.o trinketd
 
+install: all
+       $(INSTALL) trinketd /usr/local/sbin/trinketd
+       $(INSTALL) rc.d/trinketd /usr/local/etc/rc.d/trinketd