Makefile revision 2c46a8a5b3e825d6d49513c691a55729414c2308
97a9a944b5887e91042b019776c41d5dd74557aferikabele
97a9a944b5887e91042b019776c41d5dd74557aferikabele# utils/DrIFT-src/Makefile
97a9a944b5887e91042b019776c41d5dd74557aferikabele# $Id$
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive# Author: Klaus L�ttich
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive# Year: 2002
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive
fe64b2ba25510d8c9dba5560a2d537763566cf40nd# A Makefile to compile DrIFT in comfort way for two plattforms.
fe64b2ba25510d8c9dba5560a2d537763566cf40nd
fe64b2ba25510d8c9dba5560a2d537763566cf40nd####################################################################
fe64b2ba25510d8c9dba5560a2d537763566cf40nd## include The uname variable
fe64b2ba25510d8c9dba5560a2d537763566cf40ndifneq ($(MAKECMDGOALS),install)
fe64b2ba25510d8c9dba5560a2d537763566cf40ndinclude uname.mk
fe64b2ba25510d8c9dba5560a2d537763566cf40ndendif
fe64b2ba25510d8c9dba5560a2d537763566cf40nd####################################################################
fe64b2ba25510d8c9dba5560a2d537763566cf40nd## Some varibles, which control the compilation
fe64b2ba25510d8c9dba5560a2d537763566cf40nd
fe64b2ba25510d8c9dba5560a2d537763566cf40ndHC = ghc
fe64b2ba25510d8c9dba5560a2d537763566cf40ndPERL = perl
fe64b2ba25510d8c9dba5560a2d537763566cf40nd####################################################################
fe64b2ba25510d8c9dba5560a2d537763566cf40nd# source
fe64b2ba25510d8c9dba5560a2d537763566cf40ndsources = DrIFT.lhs
a63f0ab647ad2ab72efc9bea7a66e24e9ebc5cc2nd
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd####################################################################
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd### targets
4aa805f8500255bc52a4c03259fe46df10a1d07cyoshikisolaris: DrIFT.solaris
4aa805f8500255bc52a4c03259fe46df10a1d07cyoshiki
3b3b7fc78d1f5bfc2769903375050048ff41ff26ndlinux: DrIFT.linux
fe64b2ba25510d8c9dba5560a2d537763566cf40nd
fe64b2ba25510d8c9dba5560a2d537763566cf40ndDrIFT.$(UNAME): DrIFT.tmp
fe64b2ba25510d8c9dba5560a2d537763566cf40nd mv DrIFT.tmp $@
fe64b2ba25510d8c9dba5560a2d537763566cf40nd
fe64b2ba25510d8c9dba5560a2d537763566cf40ndinstall: DrIFT.linux DrIFT.solaris
fe64b2ba25510d8c9dba5560a2d537763566cf40nd cp $^ ..
fe64b2ba25510d8c9dba5560a2d537763566cf40nd
117c1f888a14e73cdd821dc6c23eb0411144a41cndDrIFT.tmp: $(sources)
117c1f888a14e73cdd821dc6c23eb0411144a41cnd rm -f DrIFT.tmp
58699879a562774640b95e9eedfd891f336e38c2nd $(HC) --make -o $@ $<
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd rm -f uname.mk
117c1f888a14e73cdd821dc6c23eb0411144a41cnd
117c1f888a14e73cdd821dc6c23eb0411144a41cnd### clean up
117c1f888a14e73cdd821dc6c23eb0411144a41cnd.PHONY : clean clean-bin
117c1f888a14e73cdd821dc6c23eb0411144a41cndclean:
117c1f888a14e73cdd821dc6c23eb0411144a41cnd rm -f DrIFT.tmp uname.mk *.hi *.o
117c1f888a14e73cdd821dc6c23eb0411144a41cnd
117c1f888a14e73cdd821dc6c23eb0411144a41cndclean-bin: clean
117c1f888a14e73cdd821dc6c23eb0411144a41cnd rm -f DrIFT.solaris DrIFT.linux
117c1f888a14e73cdd821dc6c23eb0411144a41cnd#########################################################
117c1f888a14e73cdd821dc6c23eb0411144a41cnduname.mk:
5f86589186bcc15ee13e288a9d73acbeab2409fbdpejesh rm -f $@
117c1f888a14e73cdd821dc6c23eb0411144a41cnd $(PERL) -e '$$un=`uname`;print "UNAME=";\
117c1f888a14e73cdd821dc6c23eb0411144a41cnd $$un =~ m"SunOS" && do {print "solaris"};\
117c1f888a14e73cdd821dc6c23eb0411144a41cnd $$un =~ m"Linux" && do {print "linux"};\
117c1f888a14e73cdd821dc6c23eb0411144a41cnd print "\n"' > $@
117c1f888a14e73cdd821dc6c23eb0411144a41cnd