# $Id: Makefile,v 1.2 2005/03/03 12:51:19 rahn Exp $ ############################################################################### # # # CONFIGURE HERE # # # ############################################################################### export BIN_GHC = ghc-6.4 export BIN_GHCI = ghci export BIN_LATEX = latex \\nonstopmode\\input export BIN_BIBTEX = bibtex export BIN_DVIPS = dvips -D 600 export BIN_RMF = rm -f export BIN_CONVERT = convert export BIN_GNUPLOT = gnuplot export CC = gcc -Wall -O6 -std=c99 export SH = sh ############################################################################### # # # NO CONFIG BELOW THIS LINE NEEDED # # # ############################################################################### GZIP = gzip GZIP_EXT = gz TAR = tar -cv $(addprefix --exclude=,$(DIST_EXCL)) \ --use-compress-program=$(GZIP) -f DIST_EXCL = $(DIST) '*CVS*' DIR_MAIN = diplom DIR_PROG = prog DIR_PAPER = paper DIR_FOIL = foil DIR_DATA = data SUBS = $(DIR_PAPER) $(DIR_PROG) $(DIR_DATA) $(DIR_FOIL) MAKE_SUB = $(MAKE) $(3) -C $(1) $(2) MAKE_ALL = $(foreach SUB,$(SUBS),$(call MAKE_SUB,$(SUB),$(1),) ; ) DIST = $(DIR_MAIN).tar.$(GZIP_EXT) export ASSERT_ON = ASSERT_ON ############################################################################### .PHONY: default paper foil prog all default: paper prog paper: $(call MAKE_SUB,$(DIR_PAPER),default,) foil: $(call MAKE_SUB,$(DIR_FOIL),default,) prog: $(call MAKE_SUB,$(DIR_PROG),default,) all: $(call MAKE_SUB,$(DIR_PAPER),all,) $(call MAKE_SUB,$(DIR_PROG),all,ASSERT=) $(call MAKE_SUB,$(DIR_PROG),all,ASSERT=$(ASSERT_ON)) ############################################################################### .PHONY: distclean dist clean clean: @$(call MAKE_ALL,clean) @$(BIN_RMF) *~ distclean: @$(call MAKE_ALL,distclean) @$(BIN_RMF) *~ #dist: distclean dist: clean $(TAR) $(DIST) -C .. $(DIR_MAIN)/ ############################################################################### data.%: $(call MAKE_SUB,$(DIR_DATA),$*) %: $(call MAKE_SUB,$(DIR_PROG),$*)