]>
Commit | Line | Data |
---|---|---|
1 | LEX = flex | |
2 | BUILD = jethro kraut cockney jive nyc ken ky00te newspeak nethackify scramble | |
3 | OTHER = eleet b1ff chef jibberish upside-down rasterman studly fudd \ | |
4 | censor spammer uniencode pirate kenny scottish fanboy LOLCAT | |
5 | ifndef CFLAGS | |
6 | CFLAGS = -O2 | |
7 | endif | |
8 | CFLAGS += $(CPPFLAGS) | |
9 | export CFLAGS | |
10 | INSTALL_PROGRAM = install | |
11 | ||
12 | # DEB_BUILD_OPTIONS suport, to control binary stripping. | |
13 | ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) | |
14 | INSTALL_PROGRAM += -s | |
15 | endif | |
16 | ||
17 | all: $(OTHER) $(BUILD) | |
18 | ||
19 | install: $(BUILD) $(OTHER) | |
20 | install -d $(DESTDIR)/usr/games | |
21 | $(INSTALL_PROGRAM) $(BUILD) $(DESTDIR)/usr/games/ | |
22 | install $(OTHER) $(DESTDIR)/usr/games/ | |
23 | install -d $(DESTDIR)/usr/share/man/man6 | |
24 | install -m 0644 filters.6 $(DESTDIR)/usr/share/man/man6 | |
25 | cd $(DESTDIR)/usr/share/man/man6 && \ | |
26 | $(foreach prog,$(BUILD) $(OTHER),ln -s filters.6 $(prog).6;) | |
27 | ||
28 | clean: | |
29 | $(RM) -f core *.o *~ $(BUILD) | |
30 | cd ky00te.dir && make clean | |
31 | ||
32 | .SUFFIXES: .l | |
33 | ||
34 | .l: | |
35 | $(RM) $*.c | |
36 | $(LEX) -t $< > $*.c | |
37 | $(CC) -o $@ $*.c $(CFLAGS) -lfl $(LDFLAGS) | |
38 | $(RM) $*.c | |
39 | ||
40 | .SUFFIXES: .dir | |
41 | ||
42 | .dir: | |
43 | cd $<; make | |
44 | ||
45 | nethackify: nethackify.c | |
46 | scramble: scramble.c |