Makefile revision dc929508a3bd3c666e9b0182d56898fcafb5d66f
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2004
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# This Makefile will compile the new hetcats system and provides also
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# targets for test programs during implementation phases.
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# !!! Note: This makefile is written for GNU make !!!
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# (gmake on solaris ; make on linux)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster####################################################################
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster## Some varibles, which control the compilation
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterCOMMONLIB_PATH = Common/Lib:Common/Lib/Parsec:Common/ATerm
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterCLEAN_PATH = utils/DrIFT-src:utils/GenerateRules:Common:Logic:CASL:CASL/CCC:Syntax:Static:GUI:HasCASL:Haskell:Modal:CspCASL:ATC:ToHaskell:Proofs:Comorphisms:Isabelle:$(INCLUDE_PATH):Haskell/Hatchet
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster## set ghc imports properly for your system
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterLINUX_IMPORTS = $(wildcard /home/linux-bkb/ghc/ghc-latest/lib/ghc-*/imports)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterDRIFT_ENV = DERIVEPATH='.:ghc:hetcats:${LINUX_IMPORTS}:${GHC_IMPORTS}'
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster# -fglasgow-exts comes in via ../uni/uni-package.conf
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterHC_PACKAGE = -package-conf ../uni/uni-package.conf -package uni-davinci \
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster### Profiling and Warnings (only for debugging)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster### Attention every module must be compiled with profiling or the linker
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster### cannot link the various .o files properly. So after switching on
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster### Profiling, do an 'gmake clean; gmake'
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster### If you need Profiling comment out the following line
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster#HC_PROF = -prof -auto-all
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterHCI_OPTS = $(HC_FLAGS) $(HC_PACKAGE) $(HC_INCLUDE)
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster### list of directories to run checks in
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan FosterTESTDIRS = Common CASL HasCASL Haskell/Hatchet/examples
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster####################################################################
4fe4e4f798a84a46e567f64ceadd3648eb0582d4Allan Foster## sources for hetcats (semi - manually produced with a perl script)
#.PRECIOUS: sources_hetcats.mk
$(RM) $@
(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