3 --- src/Makefile.orig 2011-12-01 21:25:12.000000000 +0000
7 ####### Compiler, tools and options
13 -CFLAGS = -pipe -Wall -W -O2 -fPIC
14 -CXXFLAGS = -pipe -Wall -W -O2 -fPIC
17 INCPATH = -I. -I../include -I../glew/include -I.. -I/usr/X11R6/include
19 -LFLAGS = -shared -Wl,-soname,libopencsg.so.1 -Wl,-rpath,../lib
20 -LIBS = $(SUBLIBS) -L/usr/X11R6/lib -lGLU -lGL -lXmu
21 +LINK = ${LIBTOOL} --mode=link ${CXX}
22 +LFLAGS = -shared -Wl,-soname,libopencsg.so.1 -Wl,-rpath,${X11BASE}/lib
23 +LIBS = $(SUBLIBS) -lGLU -lGL -lXmu
27 @@ -105,7 +101,7 @@ OBJMOC =
29 QMAKE_TARGET = opencsg
31 -TARGET = libopencsg.so.1.3.2
32 +TARGET = libopencsg.la
33 TARGETA = ../lib/libopencsg.a
34 TARGETD = libopencsg.so.1.3.2
35 TARGET0 = libopencsg.so
36 @@ -118,36 +114,27 @@ first: all
37 .SUFFIXES: .c .o .cpp .cc .cxx .C
40 - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
41 + ${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
44 - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
45 + ${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
48 - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
49 + ${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
52 - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
53 + ${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
56 - $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
57 + ${LIBTOOL} --mode=compile $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
61 all: Makefile ../lib/$(TARGET)
63 ../lib/$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS) $(OBJCOMP)
64 - test -d ../lib/ || mkdir -p ../lib/
65 - -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)
66 - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) $(OBJCOMP)
67 - -ln -s $(TARGET) $(TARGET0)
68 - -ln -s $(TARGET) $(TARGET1)
69 - -ln -s $(TARGET) $(TARGET2)
70 - -$(DEL_FILE) ../lib/$(TARGET)
71 - -$(DEL_FILE) ../lib/$(TARGET0)
72 - -$(DEL_FILE) ../lib/$(TARGET1)
73 - -$(DEL_FILE) ../lib/$(TARGET2)
74 - -$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) ../lib/
75 + $(LINK) ${LDFLAGS} -o $(TARGET) $(OBJECTS:.o=.lo) \
76 + -rpath ${PREFIX}/lib -version-info 1:3
80 @@ -272,7 +259,7 @@ stencilManager.o: stencilManager.cpp ope
83 RenderTexture.o: ../RenderTexture/RenderTexture.cpp ../RenderTexture/RenderTexture.h
84 - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o RenderTexture.o ../RenderTexture/RenderTexture.cpp
85 + ${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o RenderTexture.o ../RenderTexture/RenderTexture.cpp