]> git.mxchange.org Git - flightgear.git/blob - Triangle/Makefile
Restructured to split 1deg x 1deg dem's into 64 subsections.
[flightgear.git] / Triangle / Makefile
1 # makefile for Triangle and Show Me
2 #
3 # Type "make" to compile Triangle and Show Me.
4 #
5 # After compiling, type "triangle -h" and "showme -h" to read instructions
6 #   for using each of these programs.
7 #
8 # Type "make trilibrary" to compile Triangle as an object file (triangle.o).
9 #
10 # Type "make distclean" to delete all executable files.
11
12 # SRC is the directory in which the C source files are, and BIN is the
13 #   directory where you want to put the executable programs.  By default,
14 #   both are the current directory.
15
16 SRC = ./
17 BIN = ./
18
19 # CC should be set to the name of your favorite C compiler.
20
21 CC = cc
22
23 # CSWITCHES is a list of all switches passed to the C compiler.  I strongly
24 #   recommend using the best level of optimization.  I also strongly
25 #   recommend timing each level of optimization to see which is the
26 #   best.  For instance, on my DEC Alpha using DEC's optimizing compiler,
27 #   the -O2 switch generates a notably faster version of Triangle than the
28 #   -O3 switch.  Go figure.
29 #
30 # By default, Triangle and Show Me use double precision floating point
31 #   numbers.  If you prefer single precision, use the -DSINGLE switch.
32 #   Double precision uses more memory, but improves the resolution of
33 #   the meshes you can generate with Triangle.  It also reduces the
34 #   likelihood of a floating exception due to overflow.  Also, it is
35 #   much faster than single precision on 64-bit architectures like the
36 #   DEC Alpha.  I recommend double precision unless you want to generate
37 #   a mesh for which you do not have enough memory to use double precision.
38 #
39 # If yours is not a Unix system, use the -DNO_TIMER switch to eliminate the
40 #   Unix-specific timer code.
41 #
42 # If you are modifying Triangle, I recommend using the -DSELF_CHECK switch
43 #   while you are debugging.  Defining the SELF_CHECK symbol causes
44 #   Triangle to include self-checking code.  Triangle will execute more
45 #   slowly, however, so be sure to remove this switch before compiling a
46 #   production version.
47 #
48 # If the size of the Triangle binary is important to you, you may wish to
49 #   generate a reduced version of Triangle.  The -DREDUCED switch gets rid
50 #   of all features that are primarily of research interest.  Specifically,
51 #   defining the REDUCED symbol eliminates the -i, -F, -s, and -C switches.
52 #   The -DCDT_ONLY switch gets rid of all meshing algorithms above and beyond
53 #   constrained Delaunay triangulation.  Specifically, defining the CDT_ONLY
54 #   symbol eliminates the -r, -q, -a, -S, and -s switches.  The REDUCED and
55 #   CDT_ONLY symbols may be particularly attractive when Triangle is called
56 #   by another program that does not need all of Triangle's features; in
57 #   this case, these switches should appear as part of "TRILIBDEFS" below.
58 #
59 # On some systems, you may need to include -I/usr/local/include and/or
60 #   -L/usr/local/lib in the compiler options to ensure that the X include
61 #   files and libraries that Show Me needs are found.  If you get errors
62 #   like "Can't find include file X11/Xlib.h", you need the former switch.
63 #   Try compiling without them first; add them if that fails.
64 #
65 # An example CSWITCHES line is:
66 #
67 #   CSWITCHES = -O -DNO_TIMER -I/usr/local/include -L/usr/local/lib
68
69 CSWITCHES = -O
70
71 # TRILIBDEFS is a list of definitions used to compile an object code version
72 #   of Triangle (triangle.o) to be called by another program.  The file
73 #   "triangle.h" contains detailed information on how to call triangle.o.
74 #
75 # The -DTRILIBRARY should always be used when compiling Triangle into an
76 #   object file.
77 #
78 # An example TRILIBDEFS line is:
79 #
80 #   TRILIBDEFS = -DTRILIBRARY -DREDUCED -DCDT_ONLY
81
82 TRILIBDEFS = -DTRILIBRARY
83
84 # RM should be set to the name of your favorite rm (file deletion program).
85
86 RM = /bin/rm -f
87
88 # The action starts here.
89
90 all: $(BIN)triangle $(BIN)showme
91
92 trilibrary: $(BIN)triangle.o $(BIN)tricall
93
94 $(BIN)triangle: $(SRC)triangle.c
95         $(CC) $(CSWITCHES) -o $(BIN)triangle $(SRC)triangle.c -lm
96
97 $(BIN)tricall: $(BIN)tricall.c $(BIN)triangle.o
98         $(CC) $(CSWITCHES) -o $(BIN)tricall $(SRC)tricall.c \
99                 $(BIN)triangle.o -lm
100
101 $(BIN)triangle.o: $(SRC)triangle.c $(SRC)triangle.h
102         $(CC) $(CSWITCHES) $(TRILIBDEFS) -c -o $(BIN)triangle.o \
103                 $(SRC)triangle.c
104
105 $(BIN)showme: $(SRC)showme.c
106         $(CC) $(CSWITCHES) -o $(BIN)showme $(SRC)showme.c -L/usr/X11R6/lib -lX11
107
108 clean: distclean
109
110 distclean:
111         $(RM) $(BIN)triangle $(BIN)triangle.o $(BIN)showme