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