Blob


1 # tests to run as a port of the regression suite. Leave empty to run
2 # all.
3 TESTS=
5 .PHONY: all static clean cleanall regress install
7 all: Makefile.local gmid gg
9 Makefile.local: configure
10 ./configure
12 include Makefile.local
14 y.tab.c: parse.y
15 ${YACC} -b y parse.y
17 gmid: ${GMID_OBJS}
18 ${CC} ${GMID_OBJS} -o $@ ${LDFLAGS}
20 gg: ${GG_OBJS}
21 ${CC} ${GG_OBJS} -o $@ ${LDFLAGS}
23 static: ${GMID_OBJS}
24 ${CC} ${GMID_OBJS} -o gmid ${LDFLAGS} ${STATIC}
26 clean:
27 rm -f *.o compat/*.o y.tab.c y.tab.h y.output gmid gg
28 rm -f compile_flags.txt
30 cleanall: clean
31 ${MAKE} -C regress clean
33 regress: gmid
34 ${MAKE} 'TESTS=${TESTS}' -C regress all
36 install: gmid
37 mkdir -p ${DESTDIR}${BINDIR}
38 mkdir -p ${DESTDIR}${MANDIR}/man1
39 ${INSTALL_PROGRAM} gmid ${DESTDIR}${BINDIR}
40 ${INSTALL_MAN} gmid.1 ${DESTDIR}${MANDIR}/man1
42 compile_flags.txt:
43 printf "%s\n" ${CFLAGS} > compile_flags.txt
45 # make sure we pass -o to ${CC}. OpenBSD default suffix rule doesn't
46 .SUFFIXES: .c .o
47 .c.o:
48 ${CC} ${CFLAGS} -c $< -o $@