Search:

Return to previous page

Contents of file 'magbragg/Makefile':



    1   #
    2   # Makefile designed for use with ctangle, cweave, gcc, and plain TeX.
    3   #
    4   # Copyright (C) 2002-2006, Fredrik Jonsson <fj@phys.soton.ac.uk>
    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  = magbragg
   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   
   35   $(PROJECT): $(PROJECT).o
   36   	$(CC) $(CCOPTS) -o $(PROJECT) $(PROJECT).o $(LNOPTS)
   37   
   38   $(PROJECT).o: $(PROJECT).w
   39   	$(CTANGLE) $(PROJECT)
   40   	$(CC) $(CCOPTS) -c $(PROJECT).c
   41   
   42   $(PROJECT).pdf: $(PROJECT).ps
   43   	$(PS2PDF) $(PROJECT).ps $(PROJECT).pdf
   44   
   45   $(PROJECT).ps: $(PROJECT).dvi
   46   	$(DVIPS) $(DVIPSOPT) $(PROJECT).dvi -o $(PROJECT).ps
   47   
   48   $(PROJECT).dvi: $(PROJECT).w
   49   	make -C figures/
   50   	$(CWEAVE) $(PROJECT)
   51   	$(TEX) $(PROJECT).tex
   52   
   53   clean:
   54   	make clean -ik -C figures/
   55   	-rm -Rf $(PROJECT) *~ *.c *.o *.exe *.dat *.tgz *.pdf
   56   	-rm -Rf *.tex *.aux *.log *.toc *.idx *.scn *.dvi *.ps
   57   
   58   archive:
   59   	make -ik clean
   60   	tar --gzip --directory=../ -cf ../$(PROJECT).tar.gz $(PROJECT)
   61   

Return to previous page

Generated by ::viewsrc::

Last modified Wednesday 15 Feb 2023