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