Search:

Return to previous page

Contents of file 'boxcount/koch/Makefile':




Deprecated: Function split() is deprecated in /storage/content/45/2011745/jonsson.eu/public_html/php/htmlicise.php on line 46
    1   #
    2   # Makefile designed for use with gcc, MetaPost and plain TeX.
    3   #
    4   # Copyright (C) 2002-2006, Fredrik Jonsson <fj@phys.soton.ac.uk>
    5   #
    6   CC       = gcc
    7   CCOPTS   = -O2 -Wall -ansi -std=iso9899:1990 -pedantic
    8   LNOPTS   = -lm
    9   TEX      = tex
   10   DVIPS    = dvips
   11   METAPOST = mpost
   12   BOXCOUNTPATH = ../
   13   BOXCOUNT = $(BOXCOUNTPATH)/boxcount
   14   
   15   all: koch
   16   	@echo "==============================================================="
   17   	@echo " Run 'make kochgraphs' to generate Encapsulated PostScript"
   18   	@echo " graphs of Koch snowflake fractal of iteration orders up to"
   19   	@echo " and including n=6."
   20   	@echo " Run 'make fractaldimension' to estimate the fractal dimension."
   21   	@echo "==============================================================="
   22   
   23   koch: koch.o
   24   	$(CC) $(CCOPTS) -o koch koch.o $(LNOPTS)
   25   
   26   koch.o: koch.c
   27   	$(CC) $(CCOPTS) -c koch.c
   28   
   29   kochgraphs:
   30   	make koch
   31   	for k in 1 2 3 4 5 6 ; do \
   32   	./koch $$k > kochgraph-$$k.dat ;\
   33   	echo "input graph;"\
   34   	   "beginfig(1);"\
   35   	   "w:=42mm; h:=42mm;"\
   36   	   "draw begingraph(w,h);"\
   37   	   "pickup pencircle scaled .5pt;"\
   38   	   "setrange(-1.1,-1.1,1.1,1.1);"\
   39   	   "pickup pencircle scaled .5pt;"\
   40   	   "gdraw \"kochgraph-"$$k".dat\";"\
   41   	   "autogrid(itick bot,itick lft);"\
   42   	   "glabel.llft(btex $$ n="$$k" $$ etex,(0.9,0.9));"\
   43   	   "if ("$$k"=1): glabel.lrt(btex intiator etex,(-1.0,0.9)); fi;"\
   44   	   "if ("$$k"=2): glabel.lrt(btex generator etex,(-1.0,0.9)); fi;"\
   45   	   "if (0=1): glabel.bot(btex $$ x $$ etex,OUT); fi;"\
   46   	   "if (0=1): glabel.lft(btex $$ y $$ etex,OUT); fi;"\
   47   	   "endgraph;"\
   48   	   "endfig;"\
   49   	   "end">kochgraph-$$k.mp;\
   50   	$(METAPOST) kochgraph-$$k.mp;\
   51   	$(TEX) -jobname=kochgraph-$$k '\input epsf\nopagenumbers\
   52   	   \centerline{\epsfxsize=120mm\epsfbox{kochgraph-'$$k'.1}}\bye';\
   53   	$(DVIPS) -D1200 -E kochgraph-$$k -o kochgraph-$$k.eps;\
   54   	done
   55   
   56   fractaldimension:
   57   	make koch
   58   	make boxcount -C ../
   59   	./koch 10 > koch.trj
   60   	@$(BOXCOUNT) --minlevel 6 --maxlevel 12 \
   61   	   --trajectoryfile koch.trj --outputfile overwrite koch
   62   
   63   clean:
   64   	-rm -Rf koch *~ *.o *.exe *.dat *.mp *.mpx *.trj
   65   	-rm -Rf *.tex *.aux *.log *.toc *.idx *.scn *.dvi *.1 *.eps
   66   
   67   archive:
   68   	make -ik clean
   69   	tar --gzip --directory=../ -cf koch.tgz koch
   70   

Return to previous page

Generated by ::viewsrc::

Last modified Saturday 10 Dec 2011