gmid/Makefile

56 lines
1.2 KiB
Makefile
Raw Normal View History

# tests to run as a port of the regression suite. Leave empty to run
# all.
TESTS=
.PHONY: all static clean cleanall regress install
all: Makefile.local gmid gg TAGS compile_flags.txt
Makefile.local: configure
./configure
2020-10-02 19:39:00 +02:00
include Makefile.local
2020-10-02 19:39:00 +02:00
y.tab.c: parse.y
${YACC} -b y parse.y
2021-04-25 14:06:54 +02:00
SRCS = gmid.c iri.c utf8.c ex.c server.c sandbox.c mime.c puny.c \
utils.c log.c dirs.c fcgi.c proxy.c
OBJS = ${SRCS:.c=.o} y.tab.o ${COMPAT}
2021-01-15 15:03:45 +01:00
gmid: ${OBJS}
${CC} ${OBJS} -o gmid ${LDFLAGS}
2020-10-02 19:39:00 +02:00
gg: gg.o iri.o utf8.o ${COMPAT}
${CC} gg.o iri.o utf8.o ${COMPAT} -o $@ ${LDFLAGS}
static: ${OBJS}
2021-03-29 11:42:06 +02:00
${CC} ${OBJS} -o gmid ${LDFLAGS} ${STATIC}
TAGS: ${SRCS}
@(etags ${SRCS} || true) 2>/dev/null
2020-10-02 19:39:00 +02:00
clean:
2021-06-16 17:00:52 +02:00
rm -f *.o compat/*.o y.tab.c y.tab.h y.output gmid
2021-02-01 20:30:38 +01:00
rm -f compile_flags.txt
cleanall: clean
${MAKE} -C regress clean
2021-05-24 15:48:55 +02:00
regress: gmid
${MAKE} TESTS=${TESTS} -C regress all
2021-01-22 17:48:04 +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
2021-02-01 20:30:38 +01:00
compile_flags.txt:
printf "%s\n" ${CFLAGS} > compile_flags.txt
# make sure we pass -o to ${CC}. OpenBSD default suffix rule doesn't
.SUFFIXES: .c .o
.c.o:
${CC} ${CFLAGS} -c $< -o $@