Makefile revision 1094e7435a4c656cac2f107ea23bab6545eef20e
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China# hetcats/Makefile
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2004
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China# This Makefile will compile the new hetcats system and provides also
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China# targets for test programs during implementation phases.
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China# !!! Note: This makefile is written for GNU make !!!
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China# (gmake on solaris ; make on linux)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China####################################################################
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China## Some varibles, which control the compilation
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaINCLUDE_PATH = ghc:hetcats:fgl
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaCOMMONLIB_PATH = Common/Lib:Common/ATerm:fgl/Data/Graph:fgl/Data/Graph/Inductive:fgl/Data/Graph/Inductive/Aux:fgl/Data/Graph/Inductive/Monad:fgl/Data/Graph/Inductive/Query
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaCLEAN_PATH = utils/DrIFT-src:utils/GenerateRules:utils/InlineAxioms:Common:Logic:CASL:CASL/CCC:Syntax:Static:GUI:HasCASL:Haskell:Modal:CoCASL:COL:CspCASL:ATC:ToHaskell:Proofs:Comorphisms:Isabelle:$(INCLUDE_PATH):Haskell/Hatchet:Taxonomy:$(PFE_PATHS)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China## set ghc imports properly for your system
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaLINUX_IMPORTS = $(wildcard /home/linux-bkb/ghc/ghc-latest/lib/ghc-*/imports)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaDRIFT_ENV = DERIVEPATH='.:ghc:hetcats:${LINUX_IMPORTS}:${GHC_IMPORTS}'
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China# the 'replacing spaces' example was taken from the (GNU) Make info manual
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing Chinaspace:= $(empty) $(empty)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China# override on commandline for other architectures
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaINSTALLDIR = /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaDRIFT_deps = utils/DrIFT-src/*hs
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaINLINEAXIOMS_deps = utils/InlineAxioms/*hs $(drifted_files)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaDRIFT = $(DRIFT_ENV) utils/DrIFT
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaINLINEAXIOMS = utils/outlineAxioms
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaHADDOCK = haddock
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaHC_FLAGS = -Wall -fglasgow-exts -fno-monomorphism-restriction
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China# -ddump-minimal-imports
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China# flags also come in via ../uni/uni-package.conf
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China# but added it here in case of compilation without uni
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaHC_INCLUDE = -i$(INCLUDE_PATH)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaUNI_PACKAGE_CONF := $(wildcard ../uni/uni-package.conf)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing Chinaifneq ($(strip $(UNI_PACKAGE_CONF)),)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China -package uni-server -DUNI_PACKAGE
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China# some modules from uni for haddock
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China# if uni/server is included also HaXml sources are needed
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing Chinauni_sources = $(wildcard ../uni/davinci/haddock/*.hs) \
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China $(wildcard ../uni/graphs/haddock/*.hs) \
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China ../uni/htk/toplevel/HTk.hs \
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China $(wildcard ../uni/htk/haddock/*/*.hs) \
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China $(wildcard ../uni/events/haddock/*.hs) \
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China $(wildcard ../uni/reactor/haddock/*.hs) \
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China $(wildcard ../uni/util/haddock/*.hs) \
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China $(wildcard ../uni/posixutil/haddock/*.hs)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaPFE_TOOLDIR := $(wildcard ../programatica/tools)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing Chinaifneq ($(strip $(PFE_TOOLDIR)),)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China base/transforms base/transforms/Deriving hs2html \
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China property/pfe property/syntax property/AST property/transforms \
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China property/TI property/defs property/parse2 property/parse2/Parser \
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China hs2stratego hs2stratego/AST
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaPFE_PATH = $(addprefix -i$(PFE_TOOLDIR)/, $(PFE_DIRS))
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China# add PFE_PATHS to DERIVEPATH if needed
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China# but name clashes currently prevent ATC generation in a single file
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaPFE_PATHS = $(subst $(space),:,$(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS)))
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing Chinapfe_sources = $(wildcard $(subst :,/*hs , $(PFE_PATHS)))
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaPFE_FLAGS = -package data -package text $(PFE_PATH) -DPROGRAMATICA
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China#-fallow-undecidable-instances -fno-monomorphism-restriction
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China### Profiling (only for debugging)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China### Attention every module must be compiled with profiling or the linker
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China### cannot link the various .o files properly. So after switching on
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China### Profiling, do an 'gmake real_clean; gmake'
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China### and comment out HC_PACKAGE variable definition above.
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China### Comment in the following line for switching on profiling.
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China#HC_PROF = -prof -auto-all
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaHCI_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaHC_OPTS = $(HCI_OPTS) $(HC_PROF)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaDRIFT_OPTS = +RTS -K10m -RTS
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China### list of directories to run checks in
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaTESTDIRS = Common CASL HasCASL
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China####################################################################
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing China## sources for hetcats (semi - manually produced with a perl script)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaGHCMAKE_OUTPUT = $(wildcard hetcats-make)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing Chinaifneq ($(strip $(GHCMAKE_OUTPUT)),)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing ChinaSOURCE_PATHS = $(COMMON_LIB_PATH):$(CLEAN_PATH)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing Chinasources = $(wildcard $(subst :,/*hs , $(SOURCE_PATHS))/*hs)
56f9a274cc7ca7f2d6f19959b2db143d94a4e7e0fei feng - Sun Microsystems - Beijing Chinaobjects = $(patsubst %.lhs,%.o,$(sources:%.hs=%.o))
#.PRECIOUS: sources_hetcats.mk
$(RM) $@
$(HC_FLAGS) -O
(cd utils/GenerateRules; \
GenerateRules.hs -o ../genRules && strip ../genRules)
gen_atc_files = \
### also delete *.d.bak (dependency file backups)
$(RM) $@
ghci:
$(RM) $@
$(RM) $@
$(RM) $@
$(happy_files)
$(RM) $@
$(RM) $@
$(RM) $@
$(RM) $@
$(RM) $@
### ATerm.Lib test system
$(RM) $@
$(RM) $@
## two hardcoded dependencies for a correct generation of Version.hs
.SUFFIXES:
$(HAPPY) $<
$(INLINEAXIOMS) $< > $@
%.d : %.hs
%.d : %.lhs
## rule for Modal/ModalSystems.hs needed for ModalLogic Translation