]> git.mxchange.org Git - flightgear.git/blob - Simulator/Makefile
Restructuring make, adding automatic "make dep" support.
[flightgear.git] / Simulator / Makefile
1 #---------------------------------------------------------------------------
2 # Toplevel Project Makefile
3 #
4 # Written by Curtis Olson, started May 1997.
5 #
6 # Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
7 #
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #
22 # $Id$
23 # (Log is kept at end of this file)
24 #---------------------------------------------------------------------------
25
26
27 #---------------------------------------------------------------------------
28 # Choose your weapon
29 #---------------------------------------------------------------------------
30
31 CC = gcc
32 export CC
33
34
35 #---------------------------------------------------------------------------
36 # Global Compile Options
37 #
38 # You may set FG_CFLAGS to include any of the following options depending on 
39 # your environment:
40 #
41 # -g           - Compile with debugging symbols
42 #
43 # -Wall        - Enable full compiler warnings
44 #
45 # -O2          - Enable compiler optimization
46 #
47 # -DUSE_ITIMER - Use setitimer(), getitimer(), and signal() to mimic
48 #                a real time system and call the flight model routines
49 #                at a regular interval, rather than between screen updates
50 #                which can be highly variable.  This can make the flight
51 #                much smoother.
52 #---------------------------------------------------------------------------
53
54 FG_CFLAGS = -g -Wall -DUSE_ITIMER
55 export FG_CFLAGS
56
57
58 #---------------------------------------------------------------------------
59 # Uncomment one of the following sections depending on your system
60 #
61 # You may set FG_GRAPHICS to include any of the following options depending
62 # on your environment:
63 #---------------------------------------------------------------------------
64
65 #---------------------------------------------------------------------------
66 # SGI IRIX with the GLUT toolkit
67 #
68 # INTERFACE_FLAGS = -DGLUT
69 # INTERFACE_LIBS = -lglut
70 # INTERFACE_FILES = GLUTkey.c
71 # GRAPHICS_LIBS = -lGLU -lGL -lXmu -lX11
72 #---------------------------------------------------------------------------
73
74 #---------------------------------------------------------------------------
75 # Linux/Mesa with the GLUT toolkit
76 #
77 INTERFACE_FLAGS = -DGLUT
78 INTERFACE_LIBS = -lglut
79 INTERFACE_FILES = GLUTkey.c
80 MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL
81 X11_LIBS =  -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11
82 GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS)
83 #---------------------------------------------------------------------------
84
85 #---------------------------------------------------------------------------
86 # Windows 95/NT with the GLUT toolkit
87 #
88 # INTERFACE_FLAGS = -DGLUT
89 # INTERFACE_LIBS = -lglut
90 # INTERFACE_FILES = GLUTkey.c
91 # GRAPHICS_LIBS = -lGLU -lGL
92 #---------------------------------------------------------------------------
93
94 export INTERFACE_FLAGS INTERFACE_LIBS GRAPHICS_LIBS
95
96
97 #---------------------------------------------------------------------------
98 # You shouldn't need to modify anything beyond this point
99 #---------------------------------------------------------------------------
100
101 SUBSUBDIRS = Flight/LaRCsim Flight/Slew Scenery/ParseScn Scenery/ParseVrml
102 SUBDIRS = Aircraft Controls Flight mat3 Scenery Timer
103 MAIN = OpenGL
104
105
106 all: 
107         for dir in $(SUBSUBDIRS) $(SUBDIRS); do \
108             ( cd $$dir; $(MAKE) ) ; \
109         done
110         for dir in $(MAIN); do \
111             ( cd $$dir; $(MAKE) ) ; \
112         done
113
114 dep:
115         for dir in $(SUBSUBDIRS) $(SUBDIRS); do \
116             ( cd $$dir; $(MAKE) dep ) ; \
117         done
118         for dir in $(MAIN); do \
119             ( cd $$dir; $(MAKE) dep ) ; \
120         done
121
122 clean:
123         -rm -f *~
124         for dir in $(SUBSUBDIRS) $(SUBDIRS) $(MAIN); do \
125             (cd $$dir; $(MAKE) clean) ; \
126         done
127
128
129 tar: clean
130         (cd ../..; \
131         tar cvf prototype-0.04.tar FlightGear/COPYING FlightGear/Docs \
132         FlightGear/Scenery/mesa-e.scn FlightGear/Src FlightGear/Thanks)
133
134
135 #---------------------------------------------------------------------------
136 # $Log$
137 # Revision 1.10  1997/06/26 19:08:22  curt
138 # Restructuring make, adding automatic "make dep" support.
139 #
140 # Revision 1.9  1997/06/22 21:44:40  curt
141 # Working on intergrating the VRML (subset) parser.
142 #
143 # Revision 1.8  1997/06/21 17:52:22  curt
144 # Continue directory shuffling ... everything should be compilable/runnable
145 # again.
146 #
147 # Revision 1.7  1997/06/21 17:12:38  curt
148 # Capitalized subdirectory names.
149 #
150 # Revision 1.6  1997/06/16 19:32:50  curt
151 # Starting to add general timer support.
152 #
153 # Revision 1.5  1997/05/30 19:26:56  curt
154 # The LaRCsim flight model is starting to look like it is working.
155 #
156 # Revision 1.4  1997/05/29 02:31:43  curt
157 # Update subdirectory structure.
158 #
159 # Revision 1.3  1997/05/23 15:40:04  curt
160 # Added GNU copyright headers.
161 #
162 # Revision 1.2  1997/05/23 00:35:09  curt
163 # Trying to get fog to work ...
164 #
165 # Revision 1.1  1997/05/16 15:51:13  curt
166 # Initial revision.
167 #