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