xref: /freebsd/usr.sbin/crunch/examples/Makefile (revision 2da066ef6d85d3f7cd8aaec14369d66254836536)
1
2CRUNCHED=	fixit
3
4# below is boiler-plate to make $(CRUNCHED) from $(CRUNCHED).conf
5# I'd use PROG instead of CRUNCHED, but the system makefiles REALLY want
6# to build things in the normal way if you use PROG.
7
8CONF=	$(CRUNCHED).conf
9
10OUTMK=	$(CRUNCHED).mk
11OUTPUTS= $(OUTMK) $(CRUNCHED).c $(CRUNCHED).cache
12
13MAN=
14CLEANFILES+= $(CRUNCHED) *.o *.lo *.c *.mk *.cache
15CLEANDIRFILES+= $(OUTPUTS)
16
17all: $(CRUNCHED)
18exe: $(CRUNCHED)
19
20$(OUTPUTS): $(CONF)
21	MAKE=${MAKE} crunchgen ${.CURDIR}/$(CONF)
22
23$(CRUNCHED): $(OUTPUTS) submake
24
25submake:
26	${MAKE} -f $(OUTMK)
27objs:
28	${MAKE} -f $(OUTMK) objs
29cleandir:
30	rm -f $(CLEANDIRFILES)
31
32.include <bsd.prog.mk>
33