36c4fbeb |
1 | LEX = flex |
5b25ff5f |
2 | BUILD = jethro kraut cockney jive nyc ken ky00te newspeak nethackify |
32a7bed8 |
3 | OTHER = eleet b1ff chef jibberish upside-down rasterman studly fudd \ |
5fbd4551 |
4 | censor spammer uniencode pirate kenny scottish fanboy |
fb5da53f |
5 | CFLAGS = -O2 -lfl |
36c4fbeb |
6 | INSTALL_PROGRAM = install |
7 | |
8 | # DEB_BUILD_OPTIONS suport, to control binary stripping. |
9 | ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
10 | INSTALL_PROGRAM += -s |
11 | endif |
12 | |
13 | # And debug building. |
14 | ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) |
15 | CFLAGS += -g |
16 | endif |
7e3afbba |
17 | |
9edc0e61 |
18 | all: $(OTHER) $(BUILD) |
7e3afbba |
19 | |
9edc0e61 |
20 | install: $(BUILD) $(OTHER) |
7e3afbba |
21 | install -d $(PREFIX)/usr/games |
36c4fbeb |
22 | $(INSTALL_PROGRAM) $(BUILD) $(PREFIX)/usr/games/ |
23 | install $(OTHER) $(PREFIX)/usr/games/ |
f49da801 |
24 | install -d $(PREFIX)/usr/share/man/man6 |
25 | install -m 0644 filters.6 $(PREFIX)/usr/share/man/man6 |
26 | cd $(PREFIX)/usr/share/man/man6 && \ |
9edc0e61 |
27 | $(foreach prog,$(BUILD) $(OTHER),ln -s filters.6 $(prog).6;) |
7e3afbba |
28 | |
9edc0e61 |
29 | samples: $(BUILD) $(OTHER) |
f49da801 |
30 | -rm -f SAMPLES |
9edc0e61 |
31 | PATH=.:$$PATH; export PATH; echo $(BUILD) $(OTHER) |xargs -n 1 sh makesample.sh |
7e3afbba |
32 | |
33 | clean: |
9edc0e61 |
34 | $(RM) -f core *.o *~ $(BUILD) *.c SAMPLES |
bc19f2cf |
35 | cd ky00te.dir && make clean |
1afef5f2 |
36 | rm -f kraut.dir/lex.yy.c |
5b25ff5f |
37 | cd nethackify.dir && make clean |
7e3afbba |
38 | |
39 | .SUFFIXES: .l |
40 | |
41 | .l: |
42 | $(RM) $*.c |
43 | $(LEX) -t $< > $*.c |
fb5da53f |
44 | $(CC) -o $@ $*.c $(CFLAGS) |
7e3afbba |
45 | $(RM) $*.c |
46 | |
47 | .SUFFIXES: .dir |
48 | |
49 | .dir: |
50 | cd $<; make |
f49da801 |
51 | |
bc19f2cf |
52 | ky00te: |
53 | cd ky00te.dir && make |
54 | |
f49da801 |
55 | kraut: |
56 | cd kraut.dir && lex kraut.l |
57 | cd kraut.dir && cc kraut.c lex.yy.c -o ../kraut |
5b25ff5f |
58 | |
59 | nethackify: |
60 | cd nethackify.dir && make |