summaryrefslogtreecommitdiff
path: root/graphics/MesaLib/patches/patch-ab
blob: 363edc604a748641460ee103a1a15860d1f11e6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
$NetBSD: patch-ab,v 1.17 2009/06/05 11:10:35 wiz Exp $

--- src/glu/sgi/Makefile.orig	2008-08-25 17:46:42 +0300
+++ src/glu/sgi/Makefile	2009-05-17 16:59:39 +0300
@@ -8,7 +8,8 @@ include $(TOP)/configs/current
 
 GLU_MAJOR = 1
 GLU_MINOR = 3
-GLU_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
+GLU_TINY= 0 # What is the point of having such a strange versioning scheme?
+	    # It breaks libtool, but I hate to say it: libtool is right!
 
 INCDIRS = -I$(TOP)/include -Iinclude -Iinternals -Ilibnurbs/internals -Ilibnurbs/interface -Ilibnurbs/nurbtess
 
@@ -115,10 +116,12 @@ OBJECTS = $(C_OBJECTS) $(CC_OBJECTS)
 ##### RULES #####
 
 .c.o:
-	$(CC) -c $(INCDIRS) $(CFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@
+	$(LIBTOOL) --mode=compile --tag=CC $(CC) -c $(INCDIRS) \
+		$(CFLAGS) $(COPTS) -DNDEBUG -DLIBRARYBUILD $< -o $(@:.o=.lo)
 
 .cc.o:
-	$(CXX) -c $(INCDIRS) $(CXXFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@
+	$(LIBTOOL) --mode=compile --tag=CXX $(CXX) -c $(INCDIRS) \
+		$(CXXFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $(@:.o=.lo)
 
 
 ##### TARGETS #####
@@ -136,12 +139,11 @@ $(TOP)/$(LIB_DIR):
 
 # Make the library:
 $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
-	$(MKLIB) -o $(GLU_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
-		-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
-		-cplusplus $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
-		-exports glu.exports -id $(INSTALL_LIB_DIR)/lib$(GLU_LIB).$(GLU_MAJOR).dylib \
-		$(GLU_LIB_DEPS) $(OBJECTS)
-
+	$(LIBTOOL) --mode=link $(CXX) \
+		-o $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME:.so=.la) $(LDFLAGS) \
+		-rpath $(PREFIX)/lib $(GLU_LIB_DEPS) $(OBJECTS:.o=.lo) \
+		-version-info $(GLU_MAJOR):$(GLU_MINOR):$(GLU_TINY) \
+		-export-symbols glu.exports
 
 clean:
 	-rm -f *.o */*.o */*/*.o