Blob


1 .PHONY: all static clean regress 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
33 make -C regress clean
35 iri_test: iri_test.o iri.o utf8.o
36 ${CC} iri_test.o iri.o utf8.o -o iri_test ${LDFLAGS}
38 regress: gmid
39 make -C regress all
41 test: gmid iri_test
42 @echo "IRI tests"
43 @echo "=============================="
44 ./iri_test
45 @echo
46 @echo "server tests"
47 @echo "=============================="
48 cd test && ./test.sh
50 install: gmid
51 mkdir -p ${DESTDIR}${BINDIR}
52 mkdir -p ${DESTDIR}${MANDIR}/man1
53 ${INSTALL_PROGRAM} gmid ${DESTDIR}${BINDIR}
54 ${INSTALL_MAN} gmid.1 ${DESTDIR}${BINDIR}