summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2010-02-25 15:48:47 +0100
committerMatthias Schiffer <matthias@gamezock.de>2010-02-25 15:48:47 +0100
commitb9b5f03a321b570dc34f28f0f3d41c38aee869f1 (patch)
treee6c90df78f9159270417e7d1bacd3b6491fae236
parentbbed5806538a47b184d3bde8a2be8d54c5400e7e (diff)
downloadhtanks-b9b5f03a321b570dc34f28f0f3d41c38aee869f1.tar
htanks-b9b5f03a321b570dc34f28f0f3d41c38aee869f1.zip
Tidied up makefile and added clean target
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d8a62ca..8de3dc4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,13 @@
+HSCFILES = Bindings/GLX.hsc Bindings/GLPng.hsc
+HSFILES = $(HSCFILES:%.hsc=%.hs) GLDriver.hs GLX.hs Texture.hs Tank.hs Level.hs Game.hs Render.hs HTanks.hs
+
all: HTanks
-HTanks : Bindings/GLX.hs Bindings/GLPng.hs GLDriver.hs GLX.hs Texture.hs Tank.hs Level.hs Game.hs Render.hs HTanks.hs
+HTanks : $(HSFILES)
ghc -threaded --make HTanks -lGL -lglpng
%.hs : %.hsc
hsc2hs $<
+
+clean :
+ rm -f HTanks $(HSFILES:%.hs=%.o) $(HSFILES:%.hs=%.hi) $(HSCFILES:%.hsc=%.hs) \ No newline at end of file