1# Standard installation: 2INCLUDES= -I/usr/local/include 3LIBS= -Wl,-rpath,/usr/local/lib -lsectok -lcrypto -L/usr/local/lib 4 5# For building locally (libsectok not installed) 6#INCLUDES= -I../libsectok 7#LIBS= ../libsectok/libsectok.a -lcrypto 8 9# If crypto is included with openssl you might need this 10#INCLUDES= -I/usr/include/openssl 11 12# You shouldn't have to change anything below this line 13 14TARGETS= sectok 15SRC= main.c cmds.c cyberflex.c 16OBJ= $(SRC:.c=.o) 17CC= gcc 18CFLAGS= -g -Wall 19INSTALL= install 20PREFIX= /usr/local 21RELEASE= sectok-`date "+%Y%m%d"` 22 23all : $(TARGETS) 24 25sectok : $(OBJ) 26 $(CC) -o $@ $(OBJ) $(LIBS) 27 28.c.o : 29 $(CC) $(CFLAGS) $(INCLUDES) -c $*.c 30 31install : 32 $(INSTALL) $(TARGETS) $(PREFIX)/bin 33 34release : 35 rm -rf $(RELEASE) 36 mkdir -p $(RELEASE)/palm 37 cp -p LICENSE Makefile *.[ch] sectok.1 $(RELEASE) 38 cp -pR palm/Makefile palm/*.[ch] palm/*.pbm palm/*.rcp $(RELEASE)/palm 39 find $(RELEASE) -type f -exec chmod 644 \{\} \; 40 tar zcvf $(RELEASE).tgz $(RELEASE) 41 rm -rf $(RELEASE) 42 43clean: 44 rm -f *.o *.core $(TARGETS) 45 46