1 # emacs make tag: -*- Mode: Makefile -*-
3 #---------------------------------------------------------------------------
5 #---------------------------------------------------------------------------
9 FG_VERSION = $(FG_VERSION_MAJOR).$(FG_VERSION_MINOR)
12 #---------------------------------------------------------------------------
14 #---------------------------------------------------------------------------
23 BISON = bison -v --no-lines
32 #---------------------------------------------------------------------------
33 # Global Compile Options
35 # You may set FG_CFLAGS to include any of the following options depending on
38 # -g - Compile with debugging symbols
39 # -Wall - Enable full compiler warnings
40 # -O2 - Enable compiler optimization
42 # Other potential compiler optimization flags:
44 # -O3 -fPIC -funroll-loops -mpentium -malign-loops=2
45 # -malign-jumps=2 -malign-functions=2 -fexpensive-optimizations
46 # -pedantic -ffast-math
48 #---------------------------------------------------------------------------
50 GLOBAL_CFLAGS = -Wall -DVERSION=\"$(FG_VERSION)\"
53 #---------------------------------------------------------------------------
54 # Platform specific compile options, these should be set with FG_CFLAGS
55 # below. These have been predefined for the supported platforms below.
57 # -DUSE_ITIMER - Use setitimer(), getitimer(), and signal() to mimic
58 # a real time system and call the flight model routines
59 # at a regular interval, rather than between screen updates
60 # which can be highly variable. This can make the flight
61 # model calculations much smoother.
63 # -DUSE_FTIME - Use ftime() to get an accurate current time instead of
66 # -DUSE_RAND - Use rand() instead of random()
68 #---------------------------------------------------------------------------
71 #---------------------------------------------------------------------------
74 # Uncomment the following two lines to enable OpenGL function call tracing.
75 # This mechanism is provided courtesy of Steve Baker <sbaker@link.com>
76 #---------------------------------------------------------------------------
78 # FG_DEBUG_FLAGS = -DXGL_TRACE
79 # FG_DEBUG_LIBS = ../XGL/libXGL.a
82 #---------------------------------------------------------------------------
83 # Uncomment one of the following sections depending on your system
85 # You may set FG_GRAPHICS to include any of the following options depending
86 # on your environment:
87 #---------------------------------------------------------------------------
89 #---------------------------------------------------------------------------
92 INTERFACE_LIBS = -lglut
93 MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL
94 X11_LIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11
95 GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS)
96 FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS)
98 #---------------------------------------------------------------------------
100 #---------------------------------------------------------------------------
102 # (Surprisingly, this also works on our SunOS 4.x machine with the
103 # way we have Mesa & Glut installed.)
105 # INTERFACE_LIBS = -lglut
106 # GRAPHICS_LIBS = -lGLU -lGL -lXmu -lX11
107 # FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS)
110 #---------------------------------------------------------------------------
112 #---------------------------------------------------------------------------
115 # VERSION=\"$(VERSION)\"
116 # INTERFACE_LIBS = -lglut
117 # GRAPHICS_LIBS = -L/opt/X11R6/lib -lGLU -lGL -lXext -lXmu -lXi -lX11 -lsocket
118 # FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS)
121 #---------------------------------------------------------------------------
123 #---------------------------------------------------------------------------
124 # Cygnus Win32 (gcc based) compiled against SGI's opengl and a dynamic GLUT
126 # -*- Experimental -*-
128 # Currently builds without fatal error, but can't seem to run correctly.
129 # Eventually may also work for compiling against IHV OpenGL drivers
131 # INTERFACE_LIBS = -lglut
132 # GRAPHICS_LIBS = -lglu -lopengl -luser32 -lgdi32
133 # FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS) -I$(FG_ROOT)/Win32/include \
135 # LLDFLAGS = -L$(FG_ROOT)/Win32/lib
138 #---------------------------------------------------------------------------
140 #---------------------------------------------------------------------------
141 # Cygnus Win32 (gcc based) with a static version of the GLUT toolkit
142 # with MSOpenGL95.exe ...
144 # INTERFACE_LIBS = ../Win32/libglut.a
145 # GRAPHICS_LIBS = -lglu32 -lopengl32 -luser32 -lgdi32
146 # FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS) -DWIN32 -DUSE_RAND
149 #---------------------------------------------------------------------------
152 #---------------------------------------------------------------------------
153 # do not modify anything below this line
154 #---------------------------------------------------------------------------
156 OBJECTS = $(CFILES:.c=.o) $(CXXFILES:.cxx=.o)
157 # DEPENDS = $(CFILES:.c=.d) $(CXXFILES:.cxx=.d)
159 MAKEDEPENDFILE = depend
162 CFLAGS = $(FG_CFLAGS) -I$(FG_ROOT_SRC) $(LCFLAGS)
164 CXXDEFS = $(LCXXDEFS)
165 CXXFLAGS = $(FG_CFLAGS) $(LCXXFLAGS)
168 LDFLAGS = $(LLDFLAGS) -L$(FG_ROOT_LIB)
172 VPATH = $(FG_ROOT_LIB)
174 COMMONRULES = $(FG_ROOT_SRC)/commonrules