File: Makefile

package info (click to toggle)
filters 2.22
  • links: PTS
  • area: main
  • in suites: woody
  • size: 252 kB
  • ctags: 145
  • sloc: lex: 1,868; perl: 269; makefile: 81; sh: 6
file content (45 lines) | stat: -rw-r--r-- 969 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
# Various dialect translators.

LEX	 = flex

BUILD	 = jethro kraut cockney jive nyc ken ky00te newspeak
OTHER	 = eleet b1ff chef jibberish upside-down rasterman studly fudd

all:	$(OTHER) $(BUILD)

install:	$(BUILD) $(OTHER)
	install -d $(PREFIX)/usr/games
	install $(BUILD) $(OTHER) $(PREFIX)/usr/games/
	install -d $(PREFIX)/usr/share/man/man6
	install -m 0644 filters.6 $(PREFIX)/usr/share/man/man6
	cd $(PREFIX)/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

.SUFFIXES: .l

.l:
	$(RM) $*.c
	$(LEX) -t $< > $*.c
	$(CC) -O -o $@ $*.c -lfl -g
#	strip $@
	$(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