diff options
Diffstat (limited to 'src/glut/mini')
-rw-r--r-- | src/glut/mini/Makefile | 24 | ||||
-rw-r--r-- | src/glut/mini/glut.pc.in | 11 |
2 files changed, 32 insertions, 3 deletions
diff --git a/src/glut/mini/Makefile b/src/glut/mini/Makefile index 980306d0e2..7e7afc3533 100644 --- a/src/glut/mini/Makefile +++ b/src/glut/mini/Makefile @@ -55,7 +55,7 @@ default: depend $(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) \ $(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \ $(MKLIB_OPTIONS) $(OBJECTS) @@ -73,9 +73,27 @@ tags: etags `find . -name \*.[ch]` `find ../include` +# 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)/libglut* $(DESTDIR)$(INSTALL_LIB_DIR) + $(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig + + # Remove .o and backup files clean: depend - -rm -f depend - -rm -f *.o *~ *.o *~ *.so libglut.so.3.7 + -rm -f depend depend.bak + -rm -f *.o *~ *.o *~ *.so *.pc libglut.so.3.7 include depend diff --git a/src/glut/mini/glut.pc.in b/src/glut/mini/glut.pc.in new file mode 100644 index 0000000000..e8638fe148 --- /dev/null +++ b/src/glut/mini/glut.pc.in @@ -0,0 +1,11 @@ +prefix=@INSTALL_DIR@ +exec_prefix=${prefix} +libdir=@INSTALL_LIB_DIR@ +includedir=@INSTALL_INC_DIR@ + +Name: glut +Description: Mesa OpenGL Utility Toolkit library +Requires: gl glu +Version: @VERSION@ +Libs: -L${libdir} -lglut +Cflags: -I${includedir} |