dag

Djmoch's Auto Generator
git clone git://git.danielmoch.com/dag.git
Log | Files | Refs | README | LICENSE

Makefile (1446B)


      1 # See LICENSE file for copyright and license details
      2 .POSIX:
      3 
      4 include config.mk
      5 
      6 all: dag dagindex
      7 
      8 y.tab.o: y.tab.c y.tab.h
      9 	${CC} -Wno-implicit-function-declaration -c -o y.tab.o y.tab.c
     10 
     11 lex.yy.o: lex.yy.c y.tab.h
     12 	${CC} -c -o lex.yy.o lex.yy.c
     13 
     14 .c.o: ${HDRS}
     15 	${CC} ${CFLAGS} ${CPPFLAGS} -o $@ $<
     16 
     17 y.tab.h y.tab.c: parse.y
     18 	yacc -d parse.y
     19 
     20 lex.yy.c: parse.l
     21 	lex parse.l
     22 
     23 dag: ${DOBJ}
     24 	${CC} -o $@ ${DOBJ} ${LDFLAGS}
     25 
     26 dagindex: ${IOBJ}
     27 	${CC} -o $@ ${IOBJ}
     28 
     29 string_test: string_test.o string.o
     30 	${CC} -o $@ string_test.o string.o
     31 
     32 install: dag dagindex
     33 	install -Dm755 dag ${DESTDIR}${PREFIX}/bin/dag
     34 	install -Dm755 dagindex ${DESTDIR}${PREFIX}/bin/dagindex
     35 	install -Dm644 dag.1 ${DESTDIR}${MANPATH}/man1/dag.1
     36 	install -Dm644 dagindex.1 ${DESTDIR}${MANPATH}/man1/dagindex.1
     37 	install -Dm644 dagfile.5 ${DESTDIR}${MANPATH}/man5/dagfile.5
     38 
     39 uninstall:
     40 	rm -f ${DESTDIR}${PREFIX}/bin/dag
     41 	rm -f ${DESTDIR}${PREFIX}/bin/dagindex
     42 	rm -f ${DESTDIR}${MANPATH}/man1/dag.1
     43 	rm -f ${DESTDIR}${MANPATH}/man1/dagindex.1
     44 	rm -f ${DESTDIR}${MANPATH}/man5/dagfile.5
     45 
     46 clean:
     47 	rm -f *.o dag dagindex *_test y.tab.* lex.yy.c
     48 
     49 test: string_test
     50 	./string_test
     51 
     52 dist:
     53 	rm -rf dag-${VERSION}
     54 	mkdir dag-${VERSION}
     55 	cp ${DIST_SRC} dag-${VERSION}
     56 	tar -cf - dag-${VERSION} | gzip > dag-${VERSION}.tar.gz
     57 
     58 distclean:
     59 	rm -rf dag-${VERSION}
     60 	rm -f dag-${VERSION}.tar.gz
     61 
     62 clean-all: clean distclean
     63 
     64 .PHONY: all clean install uninstall dist distclean clean-all test