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
41 # -O3 -fomit-frame-pointer -funroll-all-loops -ffast-math
42 # - Other potential compiler optimization flags
44 #---------------------------------------------------------------------------
46 GLOBAL_CFLAGS = -Wall -DVERSION=\"$(FG_VERSION)\"
49 #---------------------------------------------------------------------------
50 # Platform specific compile options, these should be set with FG_CFLAGS
51 # below. These have been predefined for the supported platforms below.
53 # -DUSE_ITIMER - Use setitimer(), getitimer(), and signal() to mimic
54 # a real time system and call the flight model routines
55 # at a regular interval, rather than between screen updates
56 # which can be highly variable. This can make the flight
57 # model calculations much smoother.
59 # -DUSE_FTIME - Use ftime() to get an accurate current time instead of
62 # -DUSE_RAND - Use rand() instead of random()
64 #---------------------------------------------------------------------------
67 #---------------------------------------------------------------------------
70 # Uncomment the following two lines to enable OpenGL function call tracing.
71 # This mechanism is provided courtesy of Steve Baker <sbaker@link.com>
72 #---------------------------------------------------------------------------
74 # FG_DEBUG_FLAGS = -DXGL_TRACE
75 # FG_DEBUG_LIBS = ../XGL/libXGL.a
78 #---------------------------------------------------------------------------
79 # Uncomment one of the following sections depending on your system
81 # You may set FG_GRAPHICS to include any of the following options depending
82 # on your environment:
83 #---------------------------------------------------------------------------
85 #---------------------------------------------------------------------------
86 # Linux/Mesa with the GLUT toolkit
88 INTERFACE_FLAGS = -DGLUT
89 INTERFACE_LIBS = -lglut
90 INTERFACE_FILES = GLUTmain.c GLUTkey.c
91 MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL
92 X11_LIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11
93 GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS)
94 FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS)
97 #---------------------------------------------------------------------------
99 #---------------------------------------------------------------------------
100 # SGI IRIX with the GLUT toolkit
101 # (Surprisingly, this also works on our SunOS 4.x machine with the
102 # way we have Mesa & Glut installed.)
104 # INTERFACE_FLAGS = -DGLUT
105 # INTERFACE_LIBS = -lglut
106 # INTERFACE_FILES = GLUTmain.c GLUTkey.c
107 # GRAPHICS_LIBS = -lGLU -lGL -lXmu -lX11
108 # FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS)
111 #---------------------------------------------------------------------------
113 #---------------------------------------------------------------------------
114 # Sun/Solaris with the GLUT toolkit
116 # VERSION=\"$(VERSION)\"
117 # INTERFACE_FLAGS = -DGLUT
118 # INTERFACE_LIBS = -lglut
119 # INTERFACE_FILES = GLUTmain.c GLUTkey.c
120 # GRAPHICS_LIBS = -L/opt/X11R6/lib -lGLU -lGL -lXext -lXmu -lXi -lX11 -lsocket
121 # FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS)
124 #---------------------------------------------------------------------------
126 #---------------------------------------------------------------------------
127 # Cygnus Win32 (gcc based) with a static version of the GLUT toolkit
129 # INTERFACE_FLAGS = -DGLUT
130 # INTERFACE_LIBS = ../Win32/libglut.a
131 # INTERFACE_FILES = GLUTmain.c GLUTkey.c
132 # GRAPHICS_LIBS = -lglu32 -lopengl32 -luser32 -lgdi32
133 # FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS) -DWIN32 -DUSE_RAND
136 #---------------------------------------------------------------------------
139 #---------------------------------------------------------------------------
140 # do not modify anything below this line
141 #---------------------------------------------------------------------------
143 OBJECTS = $(CFILES:.c=.o) $(CXXFILES:.cxx=.o)
144 DEPENDS = $(CFILES:.c=.d) $(CXXFILES:.cxx=.d)
146 MAKEDEPENDFILE = depend
149 CFLAGS = $(FG_CFLAGS) -I$(FG_ROOT_SRC) $(LCFLAGS)
151 CXXDEFS = $(LCXXDEFS)
152 CXXFLAGS = $(FG_CFLAGS) $(LCXXFLAGS)
155 LDFLAGS = $(LLDFLAGS) -L$(FG_ROOT_LIB)
159 VPATH = $(FG_ROOT_LIB)
161 COMMONRULES = $(FG_ROOT_SRC)/commonrules