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 gg: gg.o iri.o utf8.o ${COMPAT}
23 ${CC} gg.o iri.o utf8.o ${COMPAT} -o $@ ${LDFLAGS}
25 static: ${OBJS}
26 ${CC} -static ${OBJS} \
27 ${LIBDIR}/libcrypto.a ${LIBDIR}/libtls.a ${LIBDIR}/libssl.a \
28 -o gmid
29 strip gmid
31 TAGS: ${SRCS}
32 -etags ${SRCS} || true
34 clean:
35 rm -f *.o lex.yy.c y.tab.c y.tab.h y.output gmid gg
36 make -C regress clean
38 iri_test: iri_test.o iri.o utf8.o
39 ${CC} iri_test.o iri.o utf8.o -o iri_test ${LDFLAGS}
41 regress: gmid gg
42 make -C regress all
44 test: gmid iri_test
45 @echo "IRI tests"
46 @echo "=============================="
47 ./iri_test
48 @echo
49 @echo "server tests"
50 @echo "=============================="
51 cd test && ./test.sh
53 install: gmid
54 mkdir -p ${DESTDIR}${BINDIR}
55 mkdir -p ${DESTDIR}${MANDIR}/man1
56 ${INSTALL_PROGRAM} gmid ${DESTDIR}${BINDIR}
57 ${INSTALL_MAN} gmid.1 ${DESTDIR}${BINDIR}