Makefile revision b905126bab9454b89041f92b3c50bb9efc85e427
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2004
fa9e4066f08beec538e775443c5be79dd423fcabahrens# Year: 2004
5ad820458efd0fdb914baff9c1447c22b819fa23nd# This Makefile will compile the new hetcats system and provides also
fa9e4066f08beec538e775443c5be79dd423fcabahrens# targets for test programs during implementation phases.
fa9e4066f08beec538e775443c5be79dd423fcabahrens# !!! Note: This makefile is written for GNU make !!!
fa9e4066f08beec538e775443c5be79dd423fcabahrens# (gmake on solaris ; make on linux)
fa9e4066f08beec538e775443c5be79dd423fcabahrens####################################################################
fa9e4066f08beec538e775443c5be79dd423fcabahrens## Some varibles, which control the compilation
fa9e4066f08beec538e775443c5be79dd423fcabahrensCOMMONLIB_PATH = Common/Lib:Common/Lib/Parsec:Common/ATerm
fa9e4066f08beec538e775443c5be79dd423fcabahrensCLEAN_PATH = utils/DrIFT-src:utils/GenerateRules:Common:Logic:CASL:CASL/CCC:Syntax:Static:GUI:HasCASL:Haskell:Modal:CoCASL:CspCASL:ATC:ToHaskell:Proofs:Comorphisms:Isabelle:$(INCLUDE_PATH):Haskell/Hatchet
fa9e4066f08beec538e775443c5be79dd423fcabahrens## set ghc imports properly for your system
fa9e4066f08beec538e775443c5be79dd423fcabahrensLINUX_IMPORTS = $(wildcard /home/linux-bkb/ghc/ghc-latest/lib/ghc-*/imports)
fa9e4066f08beec538e775443c5be79dd423fcabahrensDRIFT_ENV = DERIVEPATH='.:ghc:hetcats:${LINUX_IMPORTS}:${GHC_IMPORTS}'
91ebeef555ce7f899b6270a3c2df47b51f7ad59aahrens# override on commandline for other architectures
fa9e4066f08beec538e775443c5be79dd423fcabahrensINSTALLDIR = /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
fa9e4066f08beec538e775443c5be79dd423fcabahrensGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
fa9e4066f08beec538e775443c5be79dd423fcabahrens# -fglasgow-exts comes in via ../uni/uni-package.conf
fa9e4066f08beec538e775443c5be79dd423fcabahrensHC_PACKAGE = -package-conf ../uni/uni-package.conf -package uni-davinci \
fa9e4066f08beec538e775443c5be79dd423fcabahrens### Profiling and Warnings (only for debugging)
fa9e4066f08beec538e775443c5be79dd423fcabahrens### Attention every module must be compiled with profiling or the linker
fa9e4066f08beec538e775443c5be79dd423fcabahrens### cannot link the various .o files properly. So after switching on
fa9e4066f08beec538e775443c5be79dd423fcabahrens### Profiling, do an 'gmake clean; gmake'
fa9e4066f08beec538e775443c5be79dd423fcabahrens### If you need Profiling comment out the following line
fa9e4066f08beec538e775443c5be79dd423fcabahrens#HC_PROF = -prof -auto-all
fa9e4066f08beec538e775443c5be79dd423fcabahrens### list of directories to run checks in
fa9e4066f08beec538e775443c5be79dd423fcabahrensTESTDIRS = Common CASL HasCASL Haskell/Hatchet/examples ToHaskell/test
fa9e4066f08beec538e775443c5be79dd423fcabahrens####################################################################
fa9e4066f08beec538e775443c5be79dd423fcabahrens## sources for hetcats (semi - manually produced with a perl script)
fa9e4066f08beec538e775443c5be79dd423fcabahrensdrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs\
fa9e4066f08beec538e775443c5be79dd423fcabahrens Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
fa9e4066f08beec538e775443c5be79dd423fcabahrensgenrule_files = Common/Lib/Graph.hs Common/Id.hs Common/Result.hs \
fa9e4066f08beec538e775443c5be79dd423fcabahrens Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
fa9e4066f08beec538e775443c5be79dd423fcabahrens Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
fa9e4066f08beec538e775443c5be79dd423fcabahrens CASL/Morphism.hs CASL/Sign.hs CASL/AS_Basic_CASL.der.hs \
#.PRECIOUS: sources_hetcats.mk
$(RM) $@
ghc --make -package-conf /home/luettich/ghc-pkg/package.conf -package WASH-CGI GUI/hets_cgi.hs -o hets.cgi
(cd utils/GenerateRules; \
utils/genRules -r $(rule) -o ATC -h ATC/$(basename $(basename $(notdir $(file)))).header.hs $(file); \
### also delete *.d.bak (dependency file backups)
$(RM) $@
ghci:
$(RM) $@
$(RM) $@
$(RM) $@
$(RM) $@
$(RM) $@
$(RM) $@
$(RM) $@
### ATerm.Lib test system
$(RM) $@
$(RM) $@
$(HC) --make -o $@ $< $(HC_OPTS) -package-conf ../uni/uni-package.conf -package uni-davinci -package uni-server
## two hardcoded dependencies for a correct generation of Version.hs
$(HAPPY) $<
$(INLINEAXIOMS) $< > $@
%.d : %.hs
%.d : %.lhs