X-Git-Url: http://git.ieval.ro/?p=filters.git;a=blobdiff_plain;f=Makefile;h=ed7923f0b403d6e33093e22f5c78edfeaee4e011;hp=68a3588793991e13a2aa54f3b5cdf64730e618a7;hb=HEAD;hpb=bc19f2cfc3041990d9457165ccdfbe8b6b7c76e6 diff --git a/Makefile b/Makefile index 68a3588..ed7923f 100644 --- a/Makefile +++ b/Makefile @@ -1,26 +1,32 @@ -# Various dialect translators. - -LEX = flex - -ALL = jethro kraut cockney jive nyc ken ky00te -OTHER = eleet b1ff chef jibberish upside-down rasterman - -all: $(OTHER) $(ALL) - -install: $(ALL) $(OTHER) - install -d $(PREFIX)/usr/games - install $(ALL) $(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,$(ALL) $(OTHER),ln -s filters.6 $(prog).6;) - -samples: $(ALL) $(OTHER) - -rm -f SAMPLES - PATH=. echo $(ALL) $(OTHER) |xargs -n 1 sh makesample.sh +LEX = flex +BUILD = jethro kraut cockney jive nyc ken ky00te newspeak nethackify scramble +OTHER = eleet b1ff chef jibberish upside-down rasterman studly fudd \ + censor spammer uniencode pirate kenny scottish fanboy LOLCAT +ifndef CFLAGS +CFLAGS = -O2 +endif +CFLAGS += $(CPPFLAGS) +export CFLAGS +INSTALL_PROGRAM = install + +# DEB_BUILD_OPTIONS suport, to control binary stripping. +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) +INSTALL_PROGRAM += -s +endif + +all: $(OTHER) $(BUILD) + +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;) clean: - $(RM) -f core *.o *~ $(ALL) *.c SAMPLES + $(RM) -f core *.o *~ $(BUILD) cd ky00te.dir && make clean .SUFFIXES: .l @@ -28,18 +34,13 @@ clean: .l: $(RM) $*.c $(LEX) -t $< > $*.c - $(CC) -O -o $@ $*.c -lfl -g -# strip $@ + $(CC) -o $@ $*.c $(CFLAGS) -lfl $(LDFLAGS) $(RM) $*.c .SUFFIXES: .dir -.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: nethackify.c +scramble: scramble.c