]> gitweb @ CieloNegro.org - Lucu.git/commitdiff
Makefiles
authorpho <pho@cielonegro.org>
Sat, 14 Apr 2007 04:28:36 +0000 (13:28 +0900)
committerpho <pho@cielonegro.org>
Sat, 14 Apr 2007 04:28:36 +0000 (13:28 +0900)
darcs-hash:20070414042836-62b54-94a58b76037d8a8944f5dca94767474bae347a31.gz

Lucu.cabal
Makefile
examples/Makefile [new file with mode: 0644]

index 4ff675df0ef1f5f871b49a8692e1fe0f7e624652..e17c470fba1db3d44ec5f1b49bcfad640a594447 100644 (file)
@@ -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
index ee4aa8edaadd6b9a6de72e52a3cc365da48bf45e..bbd831f5a1da11896879449dcacae8955c3115eb 100644 (file)
--- 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 (file)
index 0000000..e1c2c5a
--- /dev/null
@@ -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