* Added pirate filter. TODO: copyright, man page integration, makefile int
[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 censor spammer uniencode
4CFLAGS = -O2 -lfl
5INSTALL_PROGRAM = install
6
7# DEB_BUILD_OPTIONS suport, to control binary stripping.
8ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
9INSTALL_PROGRAM += -s
10endif
11
12# And debug building.
13ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
14CFLAGS += -g
15endif
16
17all: $(OTHER) $(BUILD)
18
19install: $(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
28samples: $(BUILD) $(OTHER)
29 -rm -f SAMPLES
30 PATH=.:$$PATH; export PATH; echo $(BUILD) $(OTHER) |xargs -n 1 sh makesample.sh
31
32clean:
33 $(RM) -f core *.o *~ $(BUILD) *.c SAMPLES
34 cd ky00te.dir && make clean
35 rm -f kraut.dir/lex.yy.c
36 cd nethackify.dir && make clean
37
38.SUFFIXES: .l
39
40.l:
41 $(RM) $*.c
42 $(LEX) -t $< > $*.c
43 $(CC) -o $@ $*.c $(CFLAGS)
44 $(RM) $*.c
45
46.SUFFIXES: .dir
47
48.dir:
49 cd $<; make
50
51ky00te:
52 cd ky00te.dir && make
53
54kraut:
55 cd kraut.dir && lex kraut.l
56 cd kraut.dir && cc kraut.c lex.yy.c -o ../kraut
57
58nethackify:
59 cd nethackify.dir && make
This page took 0.009542 seconds and 4 git commands to generate.