X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=examples%2FMakefile;h=c9a0cb46ba39f1b268ed3fc0067d33098fc50e4d;hb=b7d905bb9034a4f21fa3889e83abff918c43cb58;hp=02537764fcd3680dc614a616c4316848c5decab0;hpb=7b141208b4c741de208ec147eff6b2462ce26e80;p=Lucu.git diff --git a/examples/Makefile b/examples/Makefile index 0253776..c9a0cb4 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,14 +1,35 @@ -build: MiseRafturai.hs - ghc --make HelloWorld -threaded -O3 - ghc --make Implanted -threaded -O3 +TARGETS = \ + HelloWorld \ + Implanted \ + ImplantedSmall \ + Multipart \ + SSL \ + $(NULL) + +IMPLANT ?= ../dist/build/lucu-implant-file/lucu-implant-file + +build: $(TARGETS) + +SSL: SSL.hs + -ghc -Wall --make $@ -threaded -O3 -idist -odir dist -hidir dist + +%: %.hs + ghc -Wall --make $@ -threaded -O3 -idist -odir dist -hidir dist run: build ./HelloWorld clean: - rm -f HelloWorld Implanted MiseRafturai.hs *.hi *.o + rm -rf $(TARGETS) dist + +Implanted.hs: dist/MiseRafturai.hs +dist/MiseRafturai.hs: mise-rafturai.html $(IMPLANT) + mkdir -p dist + $(IMPLANT) -m MiseRafturai -o $@ $< || (rm -f $@; exit 1) -MiseRafturai.hs: mise-rafturai.html - lucu-implant-file -m MiseRafturai -o $@ $< +ImplantedSmall.hs: dist/SmallFile.hs +dist/SmallFile.hs: small-file.txt $(IMPLANT) + mkdir -p dist + $(IMPLANT) -m SmallFile -t "text/plain; charset=\"UTF-8\"" -o $@ $< || (rm -f $@; exit 1) -.PHONY: build run clean \ No newline at end of file +.PHONY: build run clean