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 # -DNO_PRINTF - Disable all printf()'s. Works by replacing the printf
54 # fuction with an empty function.
56 # -DUSE_ITIMER - Use setitimer(), getitimer(), and signal() to mimic
57 # a real time system and call the flight model routines
58 # at a regular interval, rather than between screen updates
59 # which can be highly variable. This can make the flight
60 # model calculations much smoother.
62 # -DUSE_FTIME - Use ftime() to get an accurate current time instead of
65 # -DUSE_RAND - Use rand() instead of random()
67 #---------------------------------------------------------------------------
70 #---------------------------------------------------------------------------
73 # Uncomment the following two lines to enable OpenGL function call tracing.
74 # This mechanism is provided courtesy of Steve Baker <sbaker@link.com>
75 #---------------------------------------------------------------------------
77 # FG_DEBUG_FLAGS = -DXGL_TRACE
78 # FG_DEBUG_LIBS = ../XGL/libXGL.a
81 #---------------------------------------------------------------------------
82 # Uncomment one of the following sections depending on your system
84 # You may set FG_GRAPHICS to include any of the following options depending
85 # on your environment:
86 #---------------------------------------------------------------------------
88 #---------------------------------------------------------------------------
89 # Linux/Mesa with the GLUT toolkit
91 INTERFACE_FLAGS = -DGLUT
92 INTERFACE_LIBS = -lglut
93 INTERFACE_FILES = GLUTmain.c GLUTkey.c
94 MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL
95 X11_LIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11
96 GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS)
97 FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS)
99 #---------------------------------------------------------------------------
101 #---------------------------------------------------------------------------
102 # SGI IRIX with the GLUT toolkit
103 # (Surprisingly, this also works on our SunOS 4.x machine with the
104 # way we have Mesa & Glut installed.)
106 # INTERFACE_FLAGS = -DGLUT
107 # INTERFACE_LIBS = -lglut
108 # INTERFACE_FILES = GLUTmain.c GLUTkey.c
109 # GRAPHICS_LIBS = -lGLU -lGL -lXmu -lX11
110 # FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS)
112 #---------------------------------------------------------------------------
114 #---------------------------------------------------------------------------
115 # Sun/Solaris with the GLUT toolkit
117 # VERSION=\"$(VERSION)\"
118 # INTERFACE_FLAGS = -DGLUT
119 # INTERFACE_LIBS = -lglut
120 # INTERFACE_FILES = GLUTmain.c GLUTkey.c
121 # GRAPHICS_LIBS = -L/opt/X11R6/lib -lGLU -lGL -lXext -lXmu -lXi -lX11 -lsocket
122 # 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
135 #---------------------------------------------------------------------------
138 #---------------------------------------------------------------------------
139 # do not modify anything below this line
140 #---------------------------------------------------------------------------
142 OBJECTS = $(CFILES:.c=.o) $(CXXFILES:.cxx=.o)
143 DEPENDS = $(CFILES:.c=.d) $(CXXFILES:.cxx=.d)
145 MAKEDEPENDFILE = depend
148 CFLAGS = $(FG_CFLAGS) -I$(FG_ROOT_SRC) $(LCFLAGS)
150 CXXDEFS = $(LCXXDEFS)
151 CXXFLAGS = $(FG_CFLAGS) $(LCXXFLAGS)
154 LDFLAGS = $(LLDFLAGS) -L$(FG_ROOT_LIB)
158 VPATH = $(FG_ROOT_LIB)
160 COMMONRULES = $(FG_ROOT_SRC)/commonrules