-# specify the resource files to use
-# full path or a relative path to the resource file can be used.
-RSRCS=
-
-# specify additional libraries to link against
-# there are two acceptable forms of library specifications
-# - if your library follows the naming pattern of:
-# libXXX.so or libXXX.a you can simply specify XXX
-# library: libbe.so entry: be
-#
-# - if your library does not follow the standard library
-# naming scheme you need to specify the path to the library
-# and it's name
-# library: my_lib.a entry: my_lib.a or path/my_lib.a
-LIBS= GL GLU be
-
-# specify additional paths to directories following the standard
-# libXXX.so or libXXX.a naming scheme. You can specify full paths
-# or paths relative to the makefile. The paths included may not
-# be recursive, so include all of the paths where libraries can
-# be found. Directories where source files are found are
-# automatically included.
-LIBPATHS= ../lib
-
-# additional paths to look for system headers
-# thes use the form: #include <header>
-# source file directories are NOT auto-included here
-SYSTEM_INCLUDE_PATHS = ../../../include /boot/develop/headers/be/opengl
-
-# additional paths to look for local headers
-# thes use the form: #include "header"
-# source file directories are automatically included
-LOCAL_INCLUDE_PATHS =
-
-# specify the level of optimization that you desire
-# NONE, SOME, FULL
-OPTIMIZE= FULL
-
-# specify any preprocessor symbols to be defined. The symbols
-# will be set to a value of 1. For example specify DEBUG if you want
-# DEBUG=1 to be set when compiling.
-DEFINES=
-
-# specify special warning levels
-# if unspecified default warnings will be used
-# NONE = supress all warnings
-# ALL = enable all warnings
-WARNINGS = ALL
-
-# specify whether image symbols will be created
-# so that stack crawls in the debugger are meaningful
-# if TRUE symbols will be created
-SYMBOLS =
-
-# specify debug settings
-# if TRUE will allow application to be run from
-# a source-level debugger
-DEBUGGER =
-
-# specify additional compiler flags for all files
-COMPILER_FLAGS =
-
-# specify additional linker flags
-LINKER_FLAGS =
-
-
-## include the makefile-engine
-include /boot/develop/etc/makefile-engine
+C_SOURCES = \
+ glut_8x13.c \
+ glut_9x15.c \
+ glut_bitmap.c \
+ glut_bwidth.c \
+ glut_hel10.c \
+ glut_hel12.c \
+ glut_hel18.c \
+ glut_tr10.c \
+ glut_tr24.c \
+ glut_mroman.c \
+ glut_roman.c \
+ glut_stroke.c \
+ glut_swidth.c \
+ glut_shapes.c \
+ glut_teapot.c \
+ glut_vidresize.c \
+ glut_util.c
+
+OBJECTS = \
+ $(CPP_SOURCES:.cpp=.o) \
+ $(C_SOURCES:.c=.o)
+
+INCLUDES = \
+ -I. \
+ -I- \
+ -I$(TOP)/include
+
+DEFINES += -DGLUT_API_VERSION=4
+
+# Rules
+
+.cpp.o:
+ $(CC) -c $< $(INCLUDES) $(CFLAGS) $(GLUT_CFLAGS) -o $@
+
+.c.o:
+ $(CC) -c $< $(INCLUDES) $(CFLAGS) $(GLUT_CFLAGS) -o $@
+
+
+# ---- TARGETS
+
+default: $(LIB_DIR) $(LIB_DIR)/$(GLUT_LIB_NAME)
+
+# Create the lib directory if missing
+$(LIB_DIR):
+ mkdir $(LIB_DIR)
+
+# Make the library
+$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
+ $(TOP)/bin/mklib -o $(GLUT_LIB) -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
+ -install $(LIB_DIR) $(MKLIB_OPTIONS) $(GLUT_LIB_DEPS) \
+ $(OBJECTS)
+
+clean:
+ -rm -f *.o
+
+depend: $(SOURCES)
+ touch depend
+ $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null 2>&1