OFILES = $(CFILES:.c=.o)
CC = gcc
-CFLAGS = -g -Wall
-# CFLAGS = -O2 -Wall
+CFLAGS = $(FG_CFLAGS)
AR = ar
all: $(TARGET)
+dep:
+ $(CC) -MM *.c > depend
+
clean:
rm -f *.o $(TARGET) lib*.a *~ core
# Secondary Targets
#---------------------------------------------------------------------------
-aircraft.o: aircraft.c aircraft.h
- $(CC) $(CFLAGS) $(INCLUDES) -c aircraft.c
+include depend
-aircraft.h: ../Flight/flight.h ../Controls/controls.h
- touch aircraft.h
+aircraft.o:
+ $(CC) $(CFLAGS) $(INCLUDES) -c aircraft.c
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.5 1997/06/26 19:08:28 curt
+# Restructuring make, adding automatic "make dep" support.
+#
# Revision 1.4 1997/06/25 15:39:44 curt
# Minor changes to compile with rsxnt/win32.
#
OFILES = $(CFILES:.c=.o)
CC = gcc
-CFLAGS = -g -Wall
-# CFLAGS = -O2 -Wall
+CFLAGS = $(FG_CFLAGS)
AR = ar
all: $(TARGET)
+dep:
+ $(CC) -MM *.c > depend
+
clean:
rm -f *.o $(TARGET) lib*.a *~ core
# Secondary Targets
#---------------------------------------------------------------------------
-controls.h: ../limits.h
- touch controls.h
+include depend
-controls.o: controls.c controls.h ../Aircraft/aircraft.h
+controls.o:
$(CC) $(CFLAGS) $(INCLUDES) -c controls.c
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.6 1997/06/26 19:08:29 curt
+# Restructuring make, adding automatic "make dep" support.
+#
# Revision 1.5 1997/06/25 15:39:46 curt
# Minor changes to compile with rsxnt/win32.
#
OFILES = $(CFILES:.c=.o)
CC = gcc
-CFLAGS = -g -Wall
-# CFLAGS = -O2 -Wall
+CFLAGS = $(FG_CFLAGS)
AR = ar
all: $(TARGET)
+dep:
+ $(CC) -MM *.c > depend
+
clean:
rm -f *.o $(TARGET) lib*.a *~ core
# Secondary Targets
#---------------------------------------------------------------------------
-flight.h: Slew/slew.h LaRCsim/ls_interface.h
- touch flight.h
+include depend
-flight.o: flight.c flight.h
+flight.o:
$(CC) $(CFLAGS) $(INCLUDES) -c flight.c
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.6 1997/06/26 19:08:30 curt
+# Restructuring make, adding automatic "make dep" support.
+#
# Revision 1.5 1997/06/25 15:39:46 curt
# Minor changes to compile with rsxnt/win32.
#
OFILES = $(CFILES:.c=.o)
CC = gcc
-CFLAGS = -g
-# CFLAGS = -O2
+CFLAGS = $(FG_CFLAGS)
AR = ar
all: $(TARGET)
+dep:
+ $(CC) -MM *.c > depend
+
clean:
rm -f *.o $(TARGET) *~ core
# Secondary Targets
#---------------------------------------------------------------------------
+include depend
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.4 1997/06/26 19:08:30 curt
+# Restructuring make, adding automatic "make dep" support.
+#
# Revision 1.3 1997/06/21 17:12:50 curt
# Capitalized subdirectory names.
#
#include "gltk.h"
#include "GLTKkey.h"
-#include "../aircraft/aircraft.h"
+#include "../Aircraft/aircraft.h"
/* Handle keyboard events */
/* $Log$
-/* Revision 1.3 1997/06/21 17:12:52 curt
-/* Capitalized subdirectory names.
+/* Revision 1.4 1997/06/26 19:08:32 curt
+/* Restructuring make, adding automatic "make dep" support.
/*
+ * Revision 1.3 1997/06/21 17:12:52 curt
+ * Capitalized subdirectory names.
+ *
* Revision 1.2 1997/05/23 15:40:24 curt
* Added GNU copyright headers.
* Fog now works!
void fgInitTimeDepCalcs() {
/* initialize timer */
+
+#ifdef USE_ITIMER
fgTimerInit( 1.0 / DEFAULT_TIMER_HZ, fgUpdateTimeDepCalcs );
+#endif USE_ITIMER
+
}
f = ¤t_aircraft.flight;
+ printf("Flight Gear: prototype code to test OpenGL, LaRCsim, and VRML\n\n");
+
#ifdef GLUT
/* initialize GLUT */
glutInit(&argc, argv);
/* $Log$
-/* Revision 1.22 1997/06/25 15:39:47 curt
-/* Minor changes to compile with rsxnt/win32.
+/* Revision 1.23 1997/06/26 19:08:33 curt
+/* Restructuring make, adding automatic "make dep" support.
/*
+ * Revision 1.22 1997/06/25 15:39:47 curt
+ * Minor changes to compile with rsxnt/win32.
+ *
* Revision 1.21 1997/06/22 21:44:41 curt
* Working on intergrating the VRML (subset) parser.
*
CC = gcc
-# STD_FLAGS = -O2 -Wall
-STD_CFLAGS = -g -Wall
-
#---------------------------------------------------------------------------
-# Define the high level GL interface library
+# This is overridden in the top level Makefile, if make is run from there.
#---------------------------------------------------------------------------
# For GLUT
#---------------------------------------------------------------------------
# For OpenGL
-GRAPHICS_LIBS = -lGLU -lGL -lXmu -lX11
+# GRAPHICS_LIBS = -lGLU -lGL -lXmu -lX11
# For Mesa
-# MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL
-# X11_LIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11
-# GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS)
+MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL
+X11_LIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11
+GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS)
-CFLAGS = $(STD_CFLAGS) $(INTERFACE_FLAGS)
+CFLAGS = $(FG_CFLAGS) $(INTERFACE_FLAGS)
LIBS = $(INTERFACE_LIBS) $(GRAPHICS_LIBS) -lm -lfl
CFILES = GLmain.c $(INTERFACE_FILES) mesh2GL.c
all: $(TARGET)
+dep:
+ $(CC) -MM *.c > depend
+
clean:
rm -f *.o $(TARGET) lib*.a *~ core
# Secondary Targets
#---------------------------------------------------------------------------
-GLmain.o: GLmain.c GLUTkey.h ../Aircraft/aircraft.h ../Scenery/scenery.h \
- ../Timer/fg_timer.h
- $(CC) $(CFLAGS) $(INCLUDES) -c GLmain.c
+include depend
-GLUTkey.o: GLUTkey.c GLUTkey.h ../Aircraft/aircraft.h
- $(CC) $(CFLAGS) $(INCLUDES) -c GLUTkey.c
+GLmain.o:
+ $(CC) $(CFLAGS) -c GLmain.c
-GLTKkey.o: GLTKkey.c GLTKkey.h ../Aircraft/aircraft.h
- $(CC) $(CFLAGS) $(INCLUDES) -c GLTKkey.c
+GLUTkey.o:
+ $(CC) $(CFLAGS) -c GLUTkey.c
-mesh2GL.o: mesh2GL.c ../Scenery/mesh.h
- $(CC) $(CFLAGS) $(INCLUDES) -c mesh2GL.c
+GLTKkey.o:
+ $(CC) $(CFLAGS) -c GLTKkey.c
+
+mesh2GL.o:
+ $(CC) $(CFLAGS) -c mesh2GL.c
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.16 1997/06/26 19:08:33 curt
+# Restructuring make, adding automatic "make dep" support.
+#
# Revision 1.15 1997/06/25 15:39:47 curt
# Minor changes to compile with rsxnt/win32.
#
OFILES = $(CFILES:.c=.o)
CC = gcc
-CFLAGS = -g -Wall
-# CFLAGS = -O2 -Wall
+CFLAGS = $(FG_CFLAGS)
AR = ar
# Primary Targets
#---------------------------------------------------------------------------
-all: $(TARGET)
-
$(TARGET): $(OFILES) $(HFILES)
$(AR) rv $(TARGET) $(OFILES)
+all: $(TARGET)
+
+dep:
+ $(CC) -MM *.c > depend
+
clean:
rm -f *.o $(TARGET) lib*.a *~ core
# Secondary Targets
#---------------------------------------------------------------------------
-common.o: common.c common.h
+include depend
+
+common.o:
$(CC) $(CFLAGS) -c common.c
-mesh.o: mesh.c mesh.h common.h
+mesh.o:
$(CC) $(CFLAGS) -c mesh.c
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.10 1997/06/26 19:08:34 curt
+# Restructuring make, adding automatic "make dep" support.
+#
# Revision 1.9 1997/06/25 15:39:48 curt
# Minor changes to compile with rsxnt/win32.
#
#---------------------------------------------------------------------------
+#---------------------------------------------------------------------------
+# Choose your weapon
+#---------------------------------------------------------------------------
+
CC = gcc
+export CC
+#---------------------------------------------------------------------------
+# Global Compile Options
+#
+# You may set FG_CFLAGS to include any of the following options depending on
+# your environment:
+#
+# -g - Compile with debugging symbols
+#
+# -Wall - Enable full compiler warnings
+#
+# -O2 - Enable compiler optimization
+#
+# -DUSE_ITIMER - Use setitimer(), getitimer(), and signal() to mimic
+# a real time system and call the flight model routines
+# at a regular interval, rather than between screen updates
+# which can be highly variable. This can make the flight
+# much smoother.
+#---------------------------------------------------------------------------
+
+FG_CFLAGS = -g -Wall -DUSE_ITIMER
+export FG_CFLAGS
+
+
+#---------------------------------------------------------------------------
+# Uncomment one of the following sections depending on your system
+#
+# You may set FG_GRAPHICS to include any of the following options depending
+# on your environment:
+#---------------------------------------------------------------------------
+
+#---------------------------------------------------------------------------
+# SGI IRIX with the GLUT toolkit
+#
+# INTERFACE_FLAGS = -DGLUT
+# INTERFACE_LIBS = -lglut
+# INTERFACE_FILES = GLUTkey.c
+# GRAPHICS_LIBS = -lGLU -lGL -lXmu -lX11
+#---------------------------------------------------------------------------
+
+#---------------------------------------------------------------------------
+# Linux/Mesa with the GLUT toolkit
+#
+INTERFACE_FLAGS = -DGLUT
+INTERFACE_LIBS = -lglut
+INTERFACE_FILES = GLUTkey.c
+MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL
+X11_LIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11
+GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS)
+#---------------------------------------------------------------------------
+
+#---------------------------------------------------------------------------
+# Windows 95/NT with the GLUT toolkit
+#
+# INTERFACE_FLAGS = -DGLUT
+# INTERFACE_LIBS = -lglut
+# INTERFACE_FILES = GLUTkey.c
+# GRAPHICS_LIBS = -lGLU -lGL
+#---------------------------------------------------------------------------
+
+export INTERFACE_FLAGS INTERFACE_LIBS GRAPHICS_LIBS
+
+
+#---------------------------------------------------------------------------
+# You shouldn't need to modify anything beyond this point
+#---------------------------------------------------------------------------
+
SUBSUBDIRS = Flight/LaRCsim Flight/Slew Scenery/ParseScn Scenery/ParseVrml
SUBDIRS = Aircraft Controls Flight mat3 Scenery Timer
MAIN = OpenGL
-all:
- for dir in $(SUBSUBDIRS) $(SUBDIRS) $(MAIN); do \
- ( cd $$dir; make CC=$(CC) ) ; \
+all:
+ for dir in $(SUBSUBDIRS) $(SUBDIRS); do \
+ ( cd $$dir; $(MAKE) ) ; \
done
-
-
-install:
- for dir in $(SUBSUBDIRS) $(SUBDIRS) $(MAIN); do \
- ( cd $$dir; make CC=$(CC) install) ; \
+ for dir in $(MAIN); do \
+ ( cd $$dir; $(MAKE) ) ; \
done
+dep:
+ for dir in $(SUBSUBDIRS) $(SUBDIRS); do \
+ ( cd $$dir; $(MAKE) dep ) ; \
+ done
+ for dir in $(MAIN); do \
+ ( cd $$dir; $(MAKE) dep ) ; \
+ done
clean:
-rm -f *~
for dir in $(SUBSUBDIRS) $(SUBDIRS) $(MAIN); do \
- (cd $$dir; make clean) ; \
+ (cd $$dir; $(MAKE) clean) ; \
done
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.10 1997/06/26 19:08:22 curt
+# Restructuring make, adding automatic "make dep" support.
+#
# Revision 1.9 1997/06/22 21:44:40 curt
# Working on intergrating the VRML (subset) parser.
#
OFILES = $(CFILES:.c=.o)
CC = gcc
-CFLAGS = -g -Wall
-# CFLAGS = -O2 -Wall
+CFLAGS = $(FG_CFLAGS)
AR = ar
all: $(TARGET)
+dep:
+ $(CC) -MM *.c > depend
+
clean:
rm -f *.o $(TARGET) lib*.a *~ core
# Secondary Targets
#---------------------------------------------------------------------------
-slew.o: slew.c slew.h ../../Aircraft/aircraft.h ../../Controls/controls.h
+include depend
+
+slew.o:
$(CC) $(CFLAGS) $(INCLUDES) -c slew.c
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.4 1997/06/26 19:08:31 curt
+# Restructuring make, adding automatic "make dep" support.
+#
# Revision 1.3 1997/06/25 15:39:46 curt
# Minor changes to compile with rsxnt/win32.
#
OFILES = $(CFILES:.c=.o)
CC = gcc
-# CFLAGS = -g -Wall -DUSE_ITIMER
-CFLAGS = -g -Wall
-# CFLAGS = -O2 -Wall
+CFLAGS = $(FG_CFLAGS)
AR = ar
all: $(TARGET)
+dep:
+ $(CC) -MM *.c > depend
+
clean:
rm -f *.o $(TARGET) lib*.a *~ core
# Secondary Targets
#---------------------------------------------------------------------------
-fg_timer.o: fg_timer.c fg_timer.h
+include depend
+
+fg_timer.o:
$(CC) $(CFLAGS) $(INCLUDES) -c fg_timer.c
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.4 1997/06/26 19:08:37 curt
+# Restructuring make, adding automatic "make dep" support.
+#
# Revision 1.3 1997/06/25 17:46:58 curt
# Make itimer support optional.
#
unsigned long int fgSimTime;
-#ifdef HAVE_ITIMER
+#ifdef USE_ITIMER
static struct itimerval t, ot;
static void (*callbackfunc)(int multi_loop);
/* $Log$
-/* Revision 1.4 1997/06/25 15:39:49 curt
-/* Minor changes to compile with rsxnt/win32.
+/* Revision 1.5 1997/06/26 19:08:38 curt
+/* Restructuring make, adding automatic "make dep" support.
/*
+ * Revision 1.4 1997/06/25 15:39:49 curt
+ * Minor changes to compile with rsxnt/win32.
+ *
* Revision 1.3 1997/06/17 16:52:04 curt
* Timer interval stuff now uses gettimeofday() instead of ftime()
*