Blob


1 .POSIX:
3 PREFIX = /usr/local
4 MANPREFIX = ${PREFIX}/man
5 CFLAGS = -std=c99 -O2 -pipe -Wall -Wextra
6 DIST = Makefile lexicgen.c lexicgen.1 example.lx
8 all: lexicgen
10 clean:
11 rm -f lexicgen lexicgen.tgz *.core
13 man:
14 man ./lexicgen.1
16 run: lexicgen example.lx
17 ./lexicgen -o - example.lx
19 install: lexicgen
20 mkdir -p ${DESTDIR}${PREFIX}/bin ${DESTDIR}${MANPREFIX}/man1
21 cp -f lexicgen ${DESTDIR}${PREFIX}/bin/
22 cp -f lexicgen.1 ${DESTDIR}${MANPREFIX}/man1/
24 dist:
25 rm -rf _dist
26 mkdir -p _dist/lexicgen
27 cp -f ${DIST} _dist/lexicgen/
28 tar -C _dist -czf lexicgen.tgz lexicgen
29 rm -rf _dist