Search:

Return to previous page

Contents of file 'boxcount/Makefile':



    1   #
    2   # Makefile designed for use with ctangle, cweave, gcc, and plain TeX.
    3   #
    4   # Copyright (C) 2002-2011, Fredrik Jonsson <http://jonsson.eu>
    5   #
    6   # The CTANGLE program converts a CWEB source document into a C program which
    7   # may be compiled in the usual way. The output file includes #line specifica-
    8   # tions so that debugging can be done in terms of the CWEB source file.
    9   #
   10   # The CWEAVE program converts the same CWEB file into a TeX file that may be
   11   # formatted and printed in the usual way. It takes appropriate care of typo-
   12   # graphic details like page layout and the use of indentation, italics,
   13   # boldface, etc., and it supplies extensive cross-index information that it
   14   # gathers automatically.
   15   #
   16   # CWEB allows you to prepare a single document containing all the information
   17   # that is needed both to produce a compilable C program and to produce a well-
   18   # formatted document describing the program in as much detail as the writer
   19   # may desire.  The user of CWEB ought to be familiar with TeX as well as C.
   20   #
   21   PROJECT  = boxcount
   22   CTANGLE  = ctangle
   23   CWEAVE   = cweave
   24   CC       = gcc
   25   CCOPTS   = -O2 -Wall -ansi -std=iso9899:1990 -pedantic
   26   LNOPTS   = -lm
   27   TEX      = tex
   28   DVIPS    = dvips
   29   DVIPSOPT = -ta4 -D1200
   30   METAPOST = mp
   31   PS2PDF   = ps2pdf
   32   
   33   all: $(PROJECT) $(PROJECT).pdf
   34   	@echo "==============================================================="
   35   	@echo " To verify the execution performance of the BOXCOUNT program"
   36   	@echo " on the Koch snowflake fractal, run 'make verification'."
   37   	@echo "==============================================================="
   38   
   39   $(PROJECT): $(PROJECT).o
   40   	$(CC) $(CCOPTS) -o $(PROJECT) $(PROJECT).o $(LNOPTS)
   41   
   42   $(PROJECT).o: $(PROJECT).w
   43   	$(CTANGLE) $(PROJECT)
   44   	$(CC) $(CCOPTS) -c $(PROJECT).c
   45   
   46   $(PROJECT).pdf: $(PROJECT).ps
   47   	$(PS2PDF) $(PROJECT).ps $(PROJECT).pdf
   48   
   49   $(PROJECT).ps: $(PROJECT).dvi
   50   	$(DVIPS) $(DVIPSOPT) $(PROJECT).dvi -o $(PROJECT).ps
   51   
   52   $(PROJECT).dvi: $(PROJECT).w
   53   	@make -C figures/
   54   	@make -C kochxmpl/
   55   	@make verification
   56   	$(CWEAVE) $(PROJECT)
   57   	$(TEX) $(PROJECT).tex
   58   
   59   verification:
   60   	@echo "==============================================================="
   61   	@echo " Verifying the performance of the $(PROJECT) program on the Koch"
   62   	@echo " snowflake fractal of iteration order 11."
   63   	@echo "==============================================================="
   64   	make koch -C koch/
   65   	make kochgraphs -C koch/
   66   	make fractaldimension -C koch/
   67   
   68   tidy:
   69   	make -ik clean -C figures/
   70   	make -ik clean -C koch/
   71   	make -ik clean -C kochxmpl/
   72   	-rm -Rf *~ *.o *.exe *.dat *.tgz *.trj *.aux *.log *.idx *.scn *.dvi
   73   
   74   clean:
   75   	make -ik tidy
   76   	-rm -Rf $(PROJECT) *.c *.pdf *mp *.toc *.tex *.ps
   77   
   78   archive:
   79   	make -ik tidy
   80   	tar --gzip --directory=../ -cf ../$(PROJECT).tar.gz $(PROJECT)
   81   

Return to previous page

Generated by ::viewsrc::

Last modified Wednesday 15 Feb 2023