gmid/Makefile

47 lines
998 B
Makefile
Raw Normal View History

2021-01-22 17:48:04 +01:00
.PHONY: all static clean regress install
2021-02-01 20:30:38 +01:00
all: Makefile.local gmid 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
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
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
2021-01-22 17:48:04 +01:00
make -C regress clean
2021-05-24 15:48:55 +02:00
regress: gmid
2021-01-22 17:48:04 +01:00
make -C regress all
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 $@