$NetBSD: patch-ag,v 1.12 2009/06/05 11:10:35 wiz Exp $ --- src/glut/glx/Makefile.orig 2009-03-13 05:28:49 +0200 +++ src/glut/glx/Makefile 2009-05-17 20:34:53 +0300 @@ -81,9 +81,8 @@ OBJECTS = $(SOURCES:.c=.o) ##### RULES ##### .c.o: - $(CC) -c -I$(TOP)/include $(X11_INCLUDES) $(CFLAGS) $(GLUT_CFLAGS) $< - - + $(LIBTOOL) --mode=compile --tag=CC $(CC) -c -I$(TOP)/include \ + $(X11_INCLUDES) $(CFLAGS) $(GLUT_CFLAGS) -o $(@:.o=.lo) $< ##### TARGETS ##### @@ -92,11 +91,11 @@ default: $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NA # Make the library $(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) \ - $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \ - -id $(INSTALL_LIB_DIR)/lib$(GLUT_LIB).$(GLUT_MAJOR).dylib \ - $(GLUT_LIB_DEPS) $(OBJECTS) + $(LIBTOOL) --mode=link $(CC) \ + -o $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME:.so=.la) $(LDFLAGS) \ + -rpath $(PREFIX)/lib $(GLUT_LIB_DEPS) \ + -version-info $(GLUT_MAJOR):$(GLUT_MINOR):$(GLUT_TINY) \ + $(GLUT_LIB_DEPS) $(OBJECTS:.o=.lo) # glut pkgconfig file @@ -112,12 +111,14 @@ 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 + $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/include/GL + $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/lib + $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/lib/pkgconfig + $(BSD_INSTALL_DATA) $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_DIR)/include/GL + $(LIBTOOL) --mode=install \ + $(BSD_INSTALL_LIB) $(TOP)/$(LIB_DIR)/libglut.la \ + $(DESTDIR)$(INSTALL_DIR)/lib + $(BSD_INSTALL_DATA) glut.pc $(DESTDIR)$(INSTALL_DIR)/lib/pkgconfig clean: