From d3e50ab004d80943e456aee8e425f69ca3d01d5d Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 9 Mar 2010 02:00:21 +0100 Subject: Migrated from Make to Cabal --- .gitignore | 7 +------ HTanks.hs | 14 +++++++------- Makefile | 13 ------------- Setup.lhs | 3 +++ htanks.cabal | 17 +++++++++++++++++ 5 files changed, 28 insertions(+), 26 deletions(-) delete mode 100644 Makefile create mode 100644 Setup.lhs create mode 100644 htanks.cabal diff --git a/.gitignore b/.gitignore index 74f3efd..733412c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,2 @@ -*.hi -*.o *~ -*.chs.h -Bindings/*.hs - -HTanks +dist diff --git a/HTanks.hs b/HTanks.hs index 1937693..5e980fc 100644 --- a/HTanks.hs +++ b/HTanks.hs @@ -165,13 +165,13 @@ simulationStep = do shootingtanks = map (\(tank, _, n) -> (tank, n)) $ filter (\(tank, shoot, _) -> shoot && (shootsLeft tank) > 0) $ ts newtanks = map (\(tank, shoot, _) -> if shoot then tank {shootsLeft = (shootsLeft tank) - 1} else tank) $ ts newshoots = map (\(tank, n) -> Shoot - { shootX = posx tank - , shootY = posy tank - , shootDir = aim tank - , shootSpeed = tankShootSpeed tank - , bouncesLeft = tankShootBounces tank - , shootTank = n - }) shootingtanks + { shootX = posx tank + , shootY = posy tank + , shootDir = aim tank + , shootSpeed = tankShootSpeed tank + , bouncesLeft = tankShootBounces tank + , shootTank = n + }) shootingtanks modify $ \state -> state {players = p} diff --git a/Makefile b/Makefile deleted file mode 100644 index 8cb0488..0000000 --- a/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -HSCFILES = Bindings/GLX.hsc Bindings/GLPng.hsc -HSFILES = $(HSCFILES:%.hsc=%.hs) GLDriver.hs GLX.hs Texture.hs Player.hs DefaultPlayer.hs CPUPlayer.hs Level.hs Game.hs Render.hs HTanks.hs - -all: HTanks - -HTanks : $(HSFILES) - ghc -threaded --make HTanks -lGL -lglpng - -%.hs : %.hsc - hsc2hs $< - -clean : - rm -f HTanks $(HSFILES:%.hs=%.o) $(HSFILES:%.hs=%.hi) $(HSCFILES:%.hsc=%.hs) diff --git a/Setup.lhs b/Setup.lhs new file mode 100644 index 0000000..5bde0de --- /dev/null +++ b/Setup.lhs @@ -0,0 +1,3 @@ +#!/usr/bin/env runhaskell +> import Distribution.Simple +> main = defaultMain diff --git a/htanks.cabal b/htanks.cabal new file mode 100644 index 0000000..18572b6 --- /dev/null +++ b/htanks.cabal @@ -0,0 +1,17 @@ +name: htanks +version: 0.0 +synopsis: +description: +category: Game +license: GPL-3 +license-file: LICENSE +author: Matthias Schiffer +maintainer: matthias@gamezock.de +build-depends: base >= 4, syb, containers, mtl, time, X11, OpenGL +build-type: Simple + +executable: HTanks +main-is: HTanks.hs +other-modules: Bindings.GLX, Bindings.GLPng +ghc-options: -threaded +extra-libraries: glpng -- cgit v1.2.3