File: Makefile

package info (click to toggle)
filters 2.45
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 240 kB
  • ctags: 40
  • sloc: lex: 1,869; perl: 941; makefile: 76; ansic: 69; sh: 6
file content (61 lines) | stat: -rw-r--r-- 1,435 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
LEX	= flex
BUILD	= jethro kraut cockney jive nyc ken ky00te newspeak nethackify
OTHER	= eleet b1ff chef jibberish upside-down rasterman studly fudd \
	  censor spammer uniencode pirate kenny scottish fanboy
CFLAGS	= -O2 -lfl
export CFLAGS
INSTALL_PROGRAM = install

# DEB_BUILD_OPTIONS suport, to control binary stripping.
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif

# And debug building.
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif

all:	$(OTHER) $(BUILD) samples

install:	$(BUILD) $(OTHER)
	install -d $(DESTDIR)/usr/games
	$(INSTALL_PROGRAM) $(BUILD) $(DESTDIR)/usr/games/
	install $(OTHER) $(DESTDIR)/usr/games/
	install -d $(DESTDIR)/usr/share/man/man6
	install -m 0644 filters.6 $(DESTDIR)/usr/share/man/man6
	cd $(DESTDIR)/usr/share/man/man6 && \
		$(foreach prog,$(BUILD) $(OTHER),ln -s filters.6 $(prog).6;)

samples:	$(BUILD) $(OTHER)
	-rm -f SAMPLES
	PATH=.:$$PATH; export PATH; echo $(BUILD) $(OTHER) |xargs -n 1 sh makesample.sh

clean:
	$(RM) -f core *.o *~ $(BUILD) *.c SAMPLES
	cd ky00te.dir && make clean
	rm -f kraut.dir/lex.yy.c
	cd nethackify.dir && make clean

.SUFFIXES: .l

.l:
	$(RM) $*.c
	$(LEX) -t $< > $*.c
	$(CC) -o $@ $*.c $(CFLAGS)
	$(RM) $*.c

.SUFFIXES: .dir

.dir:	
	cd $<; make

ky00te:
	cd ky00te.dir && make

kraut:
	cd kraut.dir && lex kraut.l
	cd kraut.dir && $(CC) kraut.c lex.yy.c -o ../kraut

nethackify:
	cd nethackify.dir && make