Makefile revision 857992065be4ed40a72c6296b6c0aec62ab4c5b9
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington# Author: Klaus L�ttich
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington# This Makefile will compile the new hetcats system and provides also
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington# targets for test programs during implementation phases.
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington# !!! Note: This makefile is written for GNU make !!!
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington# (gmake on solaris ; make on linux)
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington####################################################################
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington## Some varibles, which control the compilation
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill CunningtonCOMMONLIB_PATH = Common/Lib:Common/Lib/Parsec:Common/ATerm
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill CunningtonCLEAN_PATH = Common:Logic:CASL:Syntax:Static:GUI:HasCASL:Haskell:Haskell/Language:Modal:CspCASL:ATC:ToHaskell:Proofs:Comorphisms:$(INCLUDE_PATH):Haskell/Hatchet
0fb4093da08d574d3d1b661d4425dfbac8e02aabJames PhillpottsDRIFT_ENV = DERIVEPATH='.:ghc:hetcats:/home/linux-bkb/ghc/ghc-latest/lib/ghc-6.0.1/imports'
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill CunningtonHC_FLAGS = -fglasgow-exts -fallow-overlapping-instances -Wall
5b2db69e215078c268a3e690d144373baebbf17bJames Phillpotts# please remove '-O2' if compilation lasts to long on your system
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington# but please don't commit to cvs server
0fb4093da08d574d3d1b661d4425dfbac8e02aabJames PhillpottsHC_PACKAGE = -package-conf ../uni/uni-package.conf -package uni-davinci \
017f2a315e042a2e011816323855b7e435c585b9James Phillpotts### Profiling and Warnings (only for debugging)
017f2a315e042a2e011816323855b7e435c585b9James Phillpotts### Attention every module must be compiled with profiling or the linker
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington### cannot link the various .o files properly. So after switching on
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington### Profiling, do an 'gmake clean; gmake'
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington### If you need Profiling comment out the following line
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington#HC_PROF = -prof -auto-all
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill CunningtonHCI_OPTS = $(HC_FLAGS) $(HC_PACKAGE) $(HC_INCLUDE)
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington### list of directories to run checks in
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington####################################################################
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington## sources for hetcats (semi - manually produced with a perl script)
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunningtonobjects = $(patsubst %.lhs,%.o,$(sources:%.hs=%.o))
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunningtondrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs\
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunningtongenrule_header_files = $(wildcard ATC/*.header.hs)
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunningtongenrule_files = Common/Lib/Graph.hs Common/Id.hs Common/Result.hs \
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington Common/AS_Annotation.der.hs Common/Named.hs \
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
5b2db69e215078c268a3e690d144373baebbf17bJames Phillpotts CASL/Morphism.hs CASL/StaticAna.hs CASL/AS_Basic_CASL.der.hs \
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington HasCASL/Le.hs HasCASL/As.hs HasCASL/Symbol.hs \
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington Haskell/Hatchet/Class.hs Haskell/Hatchet/KindInference.hs \
017f2a315e042a2e011816323855b7e435c585b9James Phillpottsgendrifted_files = ATC/Graph.hs ATC/Id.hs ATC/Result.hs ATC/AS_Annotation.hs \
017f2a315e042a2e011816323855b7e435c585b9James Phillpotts ATC/AS_Library.hs ATC/GlobalAnnotations.hs \
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington ATC/AS_Structured.hs ATC/AS_Architecture.hs \
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington HasCASL/ATC_HasCASL.hs CspCASL/ATC_CspCASL.hs
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunningtongenerated_rule_files = $(patsubst %.hs,%.der.hs,$(gendrifted_files))
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunningtonhappy_files = Haskell/Language/Parser.hs Haskell/Hatchet/HsParser.hs
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington# this variable holds the modules that should be documented
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington# the imported parsec library is not included!
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunningtondoc_sources = $(filter-out Nothing/Nothing% ,$(sources))
756d4b8bce5a58e5bd8fe686688b6c42d2e7052bPhill Cunnington####################################################################
#.PRECIOUS: sources_hetcats.mk
$(RM) $@
--read-interface=http://www.haskell.org/ghc/docs/latest/html/libraries/base,/home/linux-bkb/ghc/ghc-6.0.1/share/ghc-6.0.1/html/base/base.haddock \
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) $<
#%.hs: %.ag.hs
$(DRIFT) $< > $@
%.d : %.hs
%.d : %.lhs