2006-07-31 14:24:21 +00:00
|
|
|
# subset glut
|
|
|
|
|
|
|
|
|
|
TOP = ../../..
|
|
|
|
|
include $(TOP)/configs/current
|
|
|
|
|
|
|
|
|
|
GLX_SHARED = $(TOP)/src/glut/glx
|
2006-08-18 10:38:15 +00:00
|
|
|
MINI_SHARED = $(TOP)/src/glut/mini
|
2006-07-31 14:24:21 +00:00
|
|
|
|
2006-08-18 10:38:15 +00:00
|
|
|
GLUT_MAJOR = 3
|
|
|
|
|
GLUT_MINOR = 7
|
2006-07-31 14:24:21 +00:00
|
|
|
GLUT_TINY = 1
|
|
|
|
|
|
|
|
|
|
INCLUDES = -I$(TOP)/include -I$(GLX_SHARED)
|
|
|
|
|
|
|
|
|
|
CORE_SOURCES = \
|
2006-08-05 08:24:29 +00:00
|
|
|
fbdev.c \
|
|
|
|
|
colormap.c \
|
|
|
|
|
cursor.c \
|
|
|
|
|
menu.c \
|
|
|
|
|
overlay.c \
|
|
|
|
|
ext.c \
|
|
|
|
|
state.c \
|
|
|
|
|
input.c \
|
|
|
|
|
callback.c \
|
2006-08-10 10:21:17 +00:00
|
|
|
gamemode.c \
|
2006-08-18 10:38:15 +00:00
|
|
|
vidresize.c \
|
|
|
|
|
bitmap.c \
|
|
|
|
|
stroke.c
|
2006-07-31 14:24:21 +00:00
|
|
|
|
|
|
|
|
GLX_SHARED_SOURCES = \
|
|
|
|
|
$(GLX_SHARED)/glut_8x13.c \
|
|
|
|
|
$(GLX_SHARED)/glut_9x15.c \
|
|
|
|
|
$(GLX_SHARED)/glut_hel10.c \
|
|
|
|
|
$(GLX_SHARED)/glut_hel12.c \
|
|
|
|
|
$(GLX_SHARED)/glut_hel18.c \
|
|
|
|
|
$(GLX_SHARED)/glut_tr10.c \
|
|
|
|
|
$(GLX_SHARED)/glut_tr24.c \
|
|
|
|
|
$(GLX_SHARED)/glut_mroman.c \
|
|
|
|
|
$(GLX_SHARED)/glut_roman.c \
|
|
|
|
|
|
2006-08-18 10:38:15 +00:00
|
|
|
MINI_SHARED_SOURCES = \
|
|
|
|
|
$(MINI_SHARED)/models.c \
|
|
|
|
|
$(MINI_SHARED)/teapot.c
|
|
|
|
|
|
|
|
|
|
SOURCES = $(CORE_SOURCES) $(GLX_SHARED_SOURCES) $(MINI_SHARED_SOURCES)
|
2006-07-31 14:24:21 +00:00
|
|
|
|
|
|
|
|
OBJECTS = $(SOURCES:.c=.o)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##### RULES #####
|
|
|
|
|
|
|
|
|
|
.c.o:
|
2006-08-18 10:38:15 +00:00
|
|
|
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
2006-07-31 14:24:21 +00:00
|
|
|
|
|
|
|
|
.S.o:
|
|
|
|
|
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
##### TARGETS #####
|
|
|
|
|
|
|
|
|
|
default: depend $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Make the library
|
|
|
|
|
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
2008-07-11 13:54:48 -07:00
|
|
|
$(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
2006-07-31 14:24:21 +00:00
|
|
|
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
|
|
|
|
|
$(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
|
|
|
|
|
$(MKLIB_OPTIONS) $(OBJECTS)
|
|
|
|
|
|
2006-08-18 10:38:15 +00:00
|
|
|
install:
|
2008-07-03 09:17:44 -07:00
|
|
|
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL
|
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
|
|
|
|
|
$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_INC_DIR)/GL
|
|
|
|
|
$(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_LIB_DIR)
|
2006-08-18 10:38:15 +00:00
|
|
|
|
2006-07-31 14:24:21 +00:00
|
|
|
# Run 'make -f Makefile.solo dep' to update the dependencies if you change
|
|
|
|
|
# what's included by any source file.
|
|
|
|
|
depend: $(SOURCES)
|
|
|
|
|
touch depend
|
|
|
|
|
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null
|
|
|
|
|
|
|
|
|
|
# Emacs tags
|
|
|
|
|
tags:
|
|
|
|
|
etags `find . -name \*.[ch]` `find ../include`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Remove .o and backup files
|
|
|
|
|
clean: depend
|
2008-05-06 14:00:43 -07:00
|
|
|
-rm -f depend depend.bak
|
2006-07-31 14:24:21 +00:00
|
|
|
-rm -f *.o *~ *.o *~ *.so libglut.so.3.7
|
|
|
|
|
|
|
|
|
|
include depend
|