Blob


1 .PHONY: all static clean test install
3 all: Makefile.local gmid TAGS
5 Makefile.local: configure
6 ./configure
8 include Makefile.local
10 lex.yy.c: lex.l y.tab.c
11 ${LEX} lex.l
13 y.tab.c: parse.y
14 ${YACC} -b y -d parse.y
16 SRCS = gmid.c iri.c utf8.c ex.c server.c sandbox.c mime.c
17 OBJS = ${SRCS:.c=.o} lex.yy.o y.tab.o ${COMPAT}
19 gmid: ${OBJS}
20 ${CC} ${OBJS} -o gmid ${LDFLAGS}
22 static: ${OBJS}
23 ${CC} -static ${OBJS} \
24 ${LIBDIR}/libcrypto.a ${LIBDIR}/libtls.a ${LIBDIR}/libssl.a \
25 -o gmid
26 strip gmid
28 TAGS: ${SRCS}
29 -etags ${SRCS} || true
31 clean:
32 rm -f *.o lex.yy.c y.tab.c y.tab.h y.output gmid iri_test
33 rm -f Makefile.local
35 iri_test: iri_test.o iri.o utf8.o
36 ${CC} iri_test.o iri.o utf8.o -o iri_test ${LDFLAGS}
38 test: gmid iri_test
39 @echo "IRI tests"
40 @echo "=============================="
41 ./iri_test
42 @echo
43 @echo "server tests"
44 @echo "=============================="
45 cd test && ./test.sh
47 install: gmid
48 mkdir -p ${DESTDIR}${BINDIR}
49 mkdir -p ${DESTDIR}${MANDIR}/man1
50 ${INSTALL_PROGRAM} gmid ${DESTDIR}${BINDIR}
51 ${INSTALL_MAN} gmid.1 ${DESTDIR}${BINDIR}