Skip to content

Commit

Permalink
Makefile uses Cabal, version can be displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmikus committed Feb 7, 2008
1 parent 9687214 commit 523a858
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion LambdaHack.cabal
@@ -1,6 +1,6 @@
cabal-version: >= 1.2
name: LambdaHack
version: 0.1
version: 0.1.20070207
license: GPL
author: Andres Loeh <mail@andres-loeh.de>
maintainer: Andres Loeh <mail@andres-loeh.de>
Expand Down
7 changes: 7 additions & 0 deletions LambdaHack.hs
Expand Up @@ -7,13 +7,17 @@ import Data.List as L
import Data.Map as M
import Data.Set as S
import Data.Char
import Data.Version
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LBS
import System.Random
import Control.Monad
import Control.Exception as E hiding (handle)
import Codec.Compression.Zlib as Z

-- Cabal
import qualified Paths_LambdaHack as Self (version)

import State
import Geometry
import Level
Expand Down Expand Up @@ -186,10 +190,13 @@ handle session (lvl@(Level nm sz ms smap lmap))
"Alt_R" -> h

"period" -> loop session nlvl state ""

"V" -> handle session nlvl (toggleVision state) oldmsg
"N" -> handle session nlvl (toggleSmell state) oldmsg
"O" -> handle session nlvl (toggleOmniscient state) oldmsg

"v" -> displayCurrent ("version " ++ showVersion Self.version) >> h

s -> displayCurrent ("unknown command (" ++ s ++ ")") >> h
h

Expand Down
14 changes: 7 additions & 7 deletions Makefile
@@ -1,11 +1,11 @@
default :
ghc -O --make -cpp LambdaHack.hs
default : dist/setup-config
runghc Setup build

%.hs : %.hsc
hsc2hs -Icbits/ Curses.hsc
dist/setup-config :
runghc Setup configure -f-gtk --user

configure : dist/setup-config

Curses.o : Curses.hs
ghc -ffi -c -Icbits/ Curses.hs

clean :
rm -f *.o *.hi Curses.hs
runghc Setup clean

0 comments on commit 523a858

Please sign in to comment.