]> git.mxchange.org Git - flightgear.git/blob - Main/Makefile
Working on Makefile structure.
[flightgear.git] / Main / Makefile
1 #---------------------------------------------------------------------------
2 # 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 TARGET=fgfs0
28
29 CC = gcc
30
31
32 #---------------------------------------------------------------------------
33 # This is overridden in the top level Makefile, if make is run from there.
34 #---------------------------------------------------------------------------
35
36 # For GLUT
37 INTERFACE_FLAGS = -DGLUT
38 INTERFACE_LIBS = -lglut
39 INTERFACE_FILES = GLUTkey.c
40
41 # For MESA_TK (Tk interface to Mesa)
42 # INCLUDES = -I/usr/include/mesa
43 # INTERFACE_FLAGS = -DMESA_TK
44 # INTERFACE_LIBS = -L/usr/lib/mesa -lMesatk
45 # INTERFACE_FILES = GLTKkey.c
46
47
48 #---------------------------------------------------------------------------
49 # Define main GL libraries
50 #---------------------------------------------------------------------------
51
52 # For OpenGL
53 # GRAPHICS_LIBS = -lGLU -lGL -lXmu -lX11
54
55 # For Mesa
56 MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL
57 X11_LIBS =  -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11
58 GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS)
59
60
61 CFLAGS = $(FG_CFLAGS) $(INTERFACE_FLAGS)
62 LIBS =  $(INTERFACE_LIBS) $(GRAPHICS_LIBS) -lm -lfl
63
64 CFILES = GLmain.c $(INTERFACE_FILES) mesh2GL.c
65 OFILES = $(CFILES:.c=.o)
66 AFILES = ../Aircraft/libAircraft.a ../Controls/libControls.a \
67         ../Flight/libFlight.a ../Flight/LaRCsim/libLaRCsim.a \
68         ../Flight/Slew/libSlew.a ../mat3/libmat3.a \
69         ../Scenery/ParseVRML/libParseVRML.a ../Scenery/libScenery.a \
70         ../Timer/libTimer.a
71
72
73 #---------------------------------------------------------------------------
74 # Primary Targets
75 #---------------------------------------------------------------------------
76
77 $(TARGET): $(OFILES) $(AFILES)
78         $(CC) -o $(TARGET) $(OFILES) $(AFILES) $(LIBS)
79
80 all: $(TARGET)
81
82 # depend:
83 #       $(CC) -MM *.c > depend
84
85 clean:
86         rm -f *.o $(TARGET) lib*.a *~ core
87
88
89 #---------------------------------------------------------------------------
90 # Secondary Targets
91 #---------------------------------------------------------------------------
92
93 include depend
94
95 GLmain.o:
96         $(CC) $(CFLAGS) -c GLmain.c
97
98 GLUTkey.o:
99         $(CC) $(CFLAGS) -c GLUTkey.c
100
101 GLTKkey.o:
102         $(CC) $(CFLAGS) -c GLTKkey.c
103
104 mesh2GL.o:
105         $(CC) $(CFLAGS) -c mesh2GL.c
106
107
108 #---------------------------------------------------------------------------
109 # $Log$
110 # Revision 1.18  1997/06/27 20:03:36  curt
111 # Working on Makefile structure.
112 #
113 # Revision 1.17  1997/06/26 22:14:54  curt
114 # Beginning work on a scenery management system.
115 #
116 # Revision 1.16  1997/06/26 19:08:33  curt
117 # Restructuring make, adding automatic "make dep" support.
118 #
119 # Revision 1.15  1997/06/25 15:39:47  curt
120 # Minor changes to compile with rsxnt/win32.
121 #
122 # Revision 1.14  1997/06/21 17:52:23  curt
123 # Continue directory shuffling ... everything should be compilable/runnable
124 # again.
125 #
126 # Revision 1.13  1997/06/21 17:12:54  curt
127 # Capitalized subdirectory names.
128 #
129 # Revision 1.12  1997/06/16 19:32:51  curt
130 # Starting to add general timer support.
131 #
132 # Revision 1.11  1997/05/31 19:16:25  curt
133 # Elevator trim added.
134 #
135 # Revision 1.10  1997/05/31 04:13:53  curt
136 # WE CAN NOW FLY!!!
137 #
138 # Continuing work on the LaRCsim flight model integration.
139 # Added some MSFS-like keyboard input handling.
140 #
141 # Revision 1.9  1997/05/30 23:26:19  curt
142 # Added elevator/aileron controls.
143 #
144 # Revision 1.8  1997/05/30 19:27:02  curt
145 # The LaRCsim flight model is starting to look like it is working.
146 #
147 # Revision 1.7  1997/05/29 22:39:50  curt
148 # Working on incorporating the LaRCsim flight model.
149 #
150 # Revision 1.6  1997/05/29 02:33:23  curt
151 # Updated to reflect changing interfaces in other "modules."
152 #
153 # Revision 1.5  1997/05/27 17:44:32  curt
154 # Renamed & rearranged variables and routines.   Added some initial simple
155 # timer/alarm routines so the flight model can be updated on a regular interval.
156 #
157 # Revision 1.4  1997/05/23 15:40:26  curt
158 # Added GNU copyright headers.
159 # Fog now works!
160 #
161 # Revision 1.3  1997/05/23 00:35:13  curt
162 # Trying to get fog to work ...
163 #
164 # Revision 1.2  1997/05/21 15:57:52  curt
165 # Renamed due to added GLUT support.
166 #
167 # Revision 1.1  1997/05/16 16:05:51  curt
168 # Initial revision.
169 #