xref: /freebsd/usr.sbin/crunch/examples/Makefile (revision 734e82fe33aa764367791a7d603b383996c6b40b)
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