summaryrefslogtreecommitdiff
path: root/src/glut/glx/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/glut/glx/Makefile')
-rw-r--r--src/glut/glx/Makefile30
1 files changed, 22 insertions, 8 deletions
diff --git a/src/glut/glx/Makefile b/src/glut/glx/Makefile
index 910c6fa28a..b61d5b0478 100644
--- a/src/glut/glx/Makefile
+++ b/src/glut/glx/Makefile
@@ -36,6 +36,7 @@ SOURCES = \
glut_dstr.c \
glut_event.c \
glut_ext.c \
+ glut_fcb.c \
glut_fullscrn.c \
glut_gamemode.c \
glut_get.c \
@@ -90,25 +91,38 @@ default: $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
# Make the library
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
- $(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \
+ $(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
$(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
+ -id $(INSTALL_LIB_DIR)/lib$(GLUT_LIB).$(GLUT_MAJOR).dylib \
$(GLUT_LIB_DEPS) $(OBJECTS)
-install:
- $(INSTALL) -d $(INSTALL_DIR)/include/GL
- $(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
- $(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(INSTALL_DIR)/include/GL
- $(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(INSTALL_DIR)/$(LIB_DIR)
+# glut pkgconfig file
+pcedit = sed \
+ -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
+ -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
+ -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
+ -e 's,@VERSION@,$(GLUT_MAJOR).$(GLUT_MINOR).$(GLUT_TINY),'
+glut.pc: glut.pc.in
+ $(pcedit) $< > $@
+
+install: glut.pc
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+ $(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_INC_DIR)/GL
+ $(INSTALL) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
clean:
-rm -f *.o *~
-rm -f *.lo
-rm -f *.la
+ -rm -f *.pc
-rm -rf .libs
- -rm -rf depend depend.bak
+ -rm -f depend depend.bak
depend: $(SOURCES)
@@ -116,6 +130,6 @@ depend: $(SOURCES)
@ rm -f depend
@ touch depend
@ $(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(SOURCES) \
- > /dev/null
+ $(X11_INCLUDES) > /dev/null
include depend