summaryrefslogtreecommitdiff
path: root/graphics/opencsg/patches/patch-src_Makefile
blob: d0f7e4ae623292f27f0aa500184c095a9b333814 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
$NetBSD: patch-src_Makefile,v 1.2 2012/08/31 16:29:49 adam Exp $

--- src/Makefile.orig	2011-12-01 21:25:12.000000000 +0000
+++ src/Makefile
@@ -8,18 +8,14 @@
 
 ####### Compiler, tools and options
 
-CC       = gcc
-CXX      = g++
 LEX      = flex
 YACC     = yacc
-CFLAGS   = -pipe -Wall -W -O2 -fPIC 
-CXXFLAGS = -pipe -Wall -W -O2 -fPIC
 LEXFLAGS = 
 YACCFLAGS= -d
 INCPATH  = -I. -I../include -I../glew/include -I.. -I/usr/X11R6/include
-LINK     = g++
-LFLAGS   =  -shared -Wl,-soname,libopencsg.so.1 -Wl,-rpath,../lib
-LIBS     = $(SUBLIBS) -L/usr/X11R6/lib -lGLU -lGL -lXmu
+LINK     = ${LIBTOOL} --mode=link ${CXX}
+LFLAGS   =  -shared -Wl,-soname,libopencsg.so.1 -Wl,-rpath,${X11BASE}/lib
+LIBS     = $(SUBLIBS) -lGLU -lGL -lXmu
 AR       = ar cqs
 RANLIB   = 
 QMAKE    = qmake
@@ -105,7 +101,7 @@ OBJMOC = 
 DIST	   = src.pro
 QMAKE_TARGET = opencsg
 DESTDIR  = ../lib/
-TARGET   = libopencsg.so.1.3.2
+TARGET   = libopencsg.la
 TARGETA	= ../lib/libopencsg.a
 TARGETD	= libopencsg.so.1.3.2
 TARGET0	= libopencsg.so
@@ -118,36 +114,27 @@ first: all
 .SUFFIXES: .c .o .cpp .cc .cxx .C
 
 .cpp.o:
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+	${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
 
 .cc.o:
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+	${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
 
 .cxx.o:
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+	${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
 
 .C.o:
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+	${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
 
 .c.o:
-	$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
+	${LIBTOOL} --mode=compile $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
 
 ####### Build rules
 
 all: Makefile  ../lib/$(TARGET)
 
 ../lib/$(TARGET):  $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS) $(OBJCOMP)  
-	test -d ../lib/ || mkdir -p ../lib/
-	-$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)
-	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) $(OBJCOMP)
-	-ln -s $(TARGET) $(TARGET0)
-	-ln -s $(TARGET) $(TARGET1)
-	-ln -s $(TARGET) $(TARGET2)
-	-$(DEL_FILE) ../lib/$(TARGET)
-	-$(DEL_FILE) ../lib/$(TARGET0)
-	-$(DEL_FILE) ../lib/$(TARGET1)
-	-$(DEL_FILE) ../lib/$(TARGET2)
-	-$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) ../lib/
+	$(LINK) ${LDFLAGS} -o $(TARGET) $(OBJECTS:.o=.lo) \
+		-rpath ${PREFIX}/lib -version-info 1:3
 
 
 
@@ -272,7 +259,7 @@ stencilManager.o: stencilManager.cpp ope
 		stencilManager.h
 
 RenderTexture.o: ../RenderTexture/RenderTexture.cpp ../RenderTexture/RenderTexture.h
-	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o RenderTexture.o ../RenderTexture/RenderTexture.cpp
+	${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o RenderTexture.o ../RenderTexture/RenderTexture.cpp
 
 ####### Install