Permalink
Browse files

cabalized

  • Loading branch information...
1 parent 26bd845 commit 6b6d253ad7a881724f60977b2ab0f437ed8657a7 @kosmikus kosmikus committed Jan 31, 2008
Showing with 31 additions and 1 deletion.
  1. +23 −0 LambdaHack.cabal
  2. +4 −0 Main.hs → LambdaHack.hs
  3. +1 −1 Makefile
  4. +3 −0 Setup.hs
View
@@ -0,0 +1,23 @@
+cabal-version: >= 1.2
+name: LambdaHack
+version: 0.1
+license: GPL
+author: Andres Loeh <mail@andres-loeh.de>
+maintainer: Andres Loeh <mail@andres-loeh.de>
+description: a small roguelike game
+
+flag gtk
+ description: enable gtk support
+ default: True
+
+executable LambdaHack
+ main-is: LambdaHack.hs
+ build-depends: base >= 3, containers >= 0.1, binary >= 0.4,
+ random >= 1, zlib >= 0.4, bytestring >= 0.9,
+ directory >= 1
+ extensions: CPP
+ if flag(gtk)
+ build-depends: gtk >= 0.9.12
+ ghc-options: -DGTK
+ else
+ build-depends: vty >= 3
@@ -17,7 +17,11 @@ import Codec.Compression.Zlib as Z
import Level
import Dungeon
import FOV
+#ifdef GTK
import Display.Gtk
+#else
+import Display.Vty
+#endif
savefile = "HHack2.save"
View
@@ -1,5 +1,5 @@
default :
- ghc -O -o HHack2 --make Main.hs
+ ghc -O --make LambdaHack.hs
%.hs : %.hsc
hsc2hs -Icbits/ Curses.hsc
View
@@ -0,0 +1,3 @@
+import Distribution.Simple
+
+main = defaultMain

0 comments on commit 6b6d253

Please sign in to comment.