summaryrefslogtreecommitdiff
path: root/graphics/MesaLib/patches/patch-ad
blob: cccca1cd450fe78534ef2eef69a28d9dc5fc8c5c (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
48
49
50
51
52
53
54
55
56
57
58
$NetBSD: patch-ad,v 1.9 2007/08/12 15:14:48 adam Exp $

--- src/mesa/Makefile.orig	2007-08-01 23:50:00.000000000 +0200
+++ src/mesa/Makefile
@@ -14,13 +14,13 @@ GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$
 .SUFFIXES : .cpp
 
 .c.o:
-	$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
+	${LIBTOOL} --mode=compile $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
 
 .cpp.o:
-	$(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $< -o $@
+	${LIBTOOL} --mode=compile $(CXX) -c $(INCLUDE_DIRS) $(CXXFLAGS) $< -o $@
 
 .S.o:
-	$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
+	${LIBTOOL} --mode=compile $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
 
 
 # Figure out what to make here
@@ -111,24 +111,24 @@ osmesa-only: depend subdirs $(TOP)/$(LIB
 
 # Make the GL library
 $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
-	@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
-		-major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
-		-install $(TOP)/$(LIB_DIR) \
-		$(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS)
+	${LIBTOOL} --mode=link ${CC} -o ${GL_LIB_NAME:.so=.la} \
+		${STAND_ALONE_OBJECTS:.o=.lo} \
+		-rpath ${PREFIX}/lib -version-info ${GL_MAJOR}:${GL_MINOR} \
+		-L${X11BASE}/lib -Wl,-R${X11BASE}/lib ${GL_LIB_DEPS}
 
 # Make the OSMesa library
 # Note: version is kept at 6.5.3 to simplify app/linking issues
 $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS)
 	@ if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
-		$(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
-			-major 6 -minor 5 -patch 3 \
-			-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
-			$(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS) ; \
+		${LIBTOOL} --mode=link ${CC} -o ${OSMESA_LIB_NAME:.so=.la} \
+			${OSMESA16_OBJECTS:.o=.lo} -rpath ${PREFIX}/lib \
+			-version-info ${MESA_MAJOR}:${MESA_MINOR} \
+			${OSMESA_LIB_DEPS:S|-lGL|libGL.la|} ; \
 	else \
-		$(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
-			-major 6 -minor 5 -patch 3 \
-			-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
-			$(OSMESA_LIB_DEPS) $(OSMESA_DRIVER_OBJECTS) ; \
+		${LIBTOOL} --mode=link ${CC} -o ${OSMESA_LIB_NAME:.so=.la} \
+			${OSMESA_DRIVER_OBJECTS:.o=.lo} -rpath ${PREFIX}/lib \
+			-version-info ${MESA_MAJOR}:${MESA_MINOR} \
+			${OSMESA_LIB_DEPS:S|-lGL|libGL.la|} ; \
 	fi