glut_shapes.c \
glut_teapot.c \
glut_vidresize.c \
- glut_util.c
+ glut_util.c \
+ glut_ext.c
OBJECTS = \
$(CPP_SOURCES:.cpp=.o) \
-I- \
-I$(TOP)/include
-DEFINES += -DGLUT_API_VERSION=4
-
# Rules
.cpp.o:
# ---- TARGETS
-default: $(LIB_DIR) $(LIB_DIR)/$(GLUT_LIB_NAME)
+default: $(TOP)/$(LIB_DIR) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
# Create the lib directory if missing
-$(LIB_DIR):
- mkdir $(LIB_DIR)
+$(TOP)/$(LIB_DIR):
+ mkdir $(TOP)/$(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)
+$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
+ @$(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
+ -install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
+ $(GLUT_LIB_DEPS) $(OBJECTS)
clean:
-rm -f *.o
depend: $(SOURCES)
+ rm -f depend
touch depend
- $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null 2>&1
+ $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null
include depend