2021-01-22 17:48:04 +01:00
|
|
|
.PHONY: all static clean regress install
|
2021-01-17 13:12:37 +01:00
|
|
|
|
2021-01-21 12:57:46 +01:00
|
|
|
all: Makefile.local gmid TAGS
|
2021-01-17 13:12:37 +01:00
|
|
|
|
2021-01-21 12:57:46 +01:00
|
|
|
Makefile.local: configure
|
|
|
|
./configure
|
2020-10-02 19:39:00 +02:00
|
|
|
|
2021-01-21 12:57:46 +01:00
|
|
|
include Makefile.local
|
2020-10-02 19:39:00 +02:00
|
|
|
|
2021-01-15 10:17:43 +01:00
|
|
|
lex.yy.c: lex.l y.tab.c
|
|
|
|
${LEX} lex.l
|
|
|
|
|
|
|
|
y.tab.c: parse.y
|
|
|
|
${YACC} -b y -d parse.y
|
|
|
|
|
2021-01-27 16:35:09 +01:00
|
|
|
SRCS = gmid.c iri.c utf8.c ex.c server.c sandbox.c mime.c puny.c utils.c
|
2021-01-21 12:57:46 +01:00
|
|
|
OBJS = ${SRCS:.c=.o} lex.yy.o y.tab.o ${COMPAT}
|
2021-01-18 19:18:57 +01:00
|
|
|
|
2021-01-15 15:03:45 +01:00
|
|
|
gmid: ${OBJS}
|
|
|
|
${CC} ${OBJS} -o gmid ${LDFLAGS}
|
2020-10-02 19:39:00 +02:00
|
|
|
|
2021-01-23 18:39:12 +01:00
|
|
|
gg: gg.o iri.o utf8.o ${COMPAT}
|
|
|
|
${CC} gg.o iri.o utf8.o ${COMPAT} -o $@ ${LDFLAGS}
|
2021-01-23 17:56:24 +01:00
|
|
|
|
2021-01-17 13:12:37 +01:00
|
|
|
static: ${OBJS}
|
|
|
|
${CC} -static ${OBJS} \
|
|
|
|
${LIBDIR}/libcrypto.a ${LIBDIR}/libtls.a ${LIBDIR}/libssl.a \
|
|
|
|
-o gmid
|
|
|
|
strip gmid
|
|
|
|
|
2021-01-18 19:18:57 +01:00
|
|
|
TAGS: ${SRCS}
|
|
|
|
-etags ${SRCS} || true
|
2020-10-02 19:39:00 +02:00
|
|
|
|
|
|
|
clean:
|
2021-01-23 18:10:00 +01:00
|
|
|
rm -f *.o lex.yy.c y.tab.c y.tab.h y.output gmid gg
|
2021-01-22 17:48:04 +01:00
|
|
|
make -C regress clean
|
2020-12-25 13:13:12 +01:00
|
|
|
|
2021-01-11 14:08:00 +01:00
|
|
|
iri_test: iri_test.o iri.o utf8.o
|
|
|
|
${CC} iri_test.o iri.o utf8.o -o iri_test ${LDFLAGS}
|
2020-12-25 13:13:12 +01:00
|
|
|
|
2021-01-23 18:10:00 +01:00
|
|
|
regress: gmid gg
|
2021-01-22 17:48:04 +01:00
|
|
|
make -C regress all
|
|
|
|
|
2021-01-17 13:12:37 +01:00
|
|
|
install: gmid
|
2021-01-21 14:50:11 +01:00
|
|
|
mkdir -p ${DESTDIR}${BINDIR}
|
|
|
|
mkdir -p ${DESTDIR}${MANDIR}/man1
|
|
|
|
${INSTALL_PROGRAM} gmid ${DESTDIR}${BINDIR}
|
2021-01-30 15:38:32 +01:00
|
|
|
${INSTALL_MAN} gmid.1 ${DESTDIR}${MANDIR}/man1
|