From: pho Date: Sat, 14 Apr 2007 04:28:36 +0000 (+0900) Subject: Makefiles X-Git-Tag: RELEASE-0_2_1~56 X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=453cecf83e146e1ec23545fb371f7b91ab6adea7;p=Lucu.git Makefiles darcs-hash:20070414042836-62b54-94a58b76037d8a8944f5dca94767474bae347a31.gz --- diff --git a/Lucu.cabal b/Lucu.cabal index 4ff675d..e17c470 100644 --- a/Lucu.cabal +++ b/Lucu.cabal @@ -34,9 +34,9 @@ Exposed-Modules: Network.HTTP.Lucu.ResponseWriter Network.HTTP.Lucu.StaticFile Network.HTTP.Lucu.Utils -ghc-options: -threaded -fglasgow-exts -O3 +ghc-options: -fglasgow-exts -O3 --Executable: HelloWorld --Main-Is: HelloWorld.hs --Hs-Source-Dirs: ., examples ---ghc-options: -threaded -fglasgow-exts \ No newline at end of file +--ghc-options: -threaded -fglasgow-exts -O3 \ No newline at end of file diff --git a/Makefile b/Makefile index ee4aa8e..bbd831f 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,16 @@ CABAL_FILE = Lucu.cabal GHC = ghc -WHAT_TO_RUN = ./dist/build/HelloWorld/HelloWorld + +build: .setup-config Setup + ./Setup build run: build @echo ".:.:. Let's go .:.:." $(WHAT_TO_RUN) - -build: .setup-config Setup - ./Setup build + $(MAKE) -C examples run .setup-config: $(CABAL_FILE) Setup - ./Setup configure + ./Setup configure -p Setup: Setup.hs $(GHC) --make Setup @@ -18,6 +18,7 @@ Setup: Setup.hs clean: rm -rf dist Setup Setup.o Setup.hi .setup-config find . -name '*~' -exec rm -f {} \; + $(MAKE) -C examples clean doc: ./Setup haddock @@ -25,4 +26,4 @@ doc: install: build ./Setup install -.PHONY: run build clean install doc \ No newline at end of file +.PHONY: build run clean install doc \ No newline at end of file diff --git a/examples/Makefile b/examples/Makefile new file mode 100644 index 0000000..e1c2c5a --- /dev/null +++ b/examples/Makefile @@ -0,0 +1,10 @@ +build: + ghc --make HelloWorld -threaded -fglasgow-exts -O3 + +run: build + ./HelloWorld + +clean: + rm -f HelloWorld *.hi *.o + +.PHONY: build run clean \ No newline at end of file