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