releasing version 2.39
[filters.git] / Makefile
1 LEX = flex
2 BUILD = jethro kraut cockney jive nyc ken ky00te newspeak nethackify
3 OTHER = eleet b1ff chef jibberish upside-down rasterman studly fudd \
4 censor spammer uniencode pirate kenny
5 CFLAGS = -O2 -lfl
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
17
18 all: $(OTHER) $(BUILD)
19
20 install: $(BUILD) $(OTHER)
21 install -d $(PREFIX)/usr/games
22 $(INSTALL_PROGRAM) $(BUILD) $(PREFIX)/usr/games/
23 install $(OTHER) $(PREFIX)/usr/games/
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 && \
27 $(foreach prog,$(BUILD) $(OTHER),ln -s filters.6 $(prog).6;)
28
29 samples: $(BUILD) $(OTHER)
30 -rm -f SAMPLES
31 PATH=.:$$PATH; export PATH; echo $(BUILD) $(OTHER) |xargs -n 1 sh makesample.sh
32
33 clean:
34 $(RM) -f core *.o *~ $(BUILD) *.c SAMPLES
35 cd ky00te.dir && make clean
36 rm -f kraut.dir/lex.yy.c
37 cd nethackify.dir && make clean
38
39 .SUFFIXES: .l
40
41 .l:
42 $(RM) $*.c
43 $(LEX) -t $< > $*.c
44 $(CC) -o $@ $*.c $(CFLAGS)
45 $(RM) $*.c
46
47 .SUFFIXES: .dir
48
49 .dir:
50 cd $<; make
51
52 ky00te:
53 cd ky00te.dir && make
54
55 kraut:
56 cd kraut.dir && lex kraut.l
57 cd kraut.dir && cc kraut.c lex.yy.c -o ../kraut
58
59 nethackify:
60 cd nethackify.dir && make
This page took 0.021574 seconds and 5 git commands to generate.