Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / graphics / opencsg / patches / patch-src_Makefile
blobef6bceb66e0aa42e9fedbaae3010e61091a2a086
1 $NetBSD$
3 --- src/Makefile.orig   2011-12-01 21:25:12.000000000 +0000
4 +++ src/Makefile
5 @@ -8,18 +8,14 @@
6  
7  ####### Compiler, tools and options
8  
9 -CC       = gcc
10 -CXX      = g++
11  LEX      = flex
12  YACC     = yacc
13 -CFLAGS   = -pipe -Wall -W -O2 -fPIC 
14 -CXXFLAGS = -pipe -Wall -W -O2 -fPIC
15  LEXFLAGS = 
16  YACCFLAGS= -d
17  INCPATH  = -I. -I../include -I../glew/include -I.. -I/usr/X11R6/include
18 -LINK     = g++
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
24  AR       = ar cqs
25  RANLIB   = 
26  QMAKE    = qmake
27 @@ -105,7 +101,7 @@ OBJMOC = 
28  DIST      = src.pro
29  QMAKE_TARGET = opencsg
30  DESTDIR  = ../lib/
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
39  .cpp.o:
40 -       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
41 +       ${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
43  .cc.o:
44 -       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
45 +       ${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
47  .cxx.o:
48 -       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
49 +       ${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
51  .C.o:
52 -       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
53 +       ${LIBTOOL} --mode=compile $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
55  .c.o:
56 -       $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
57 +       ${LIBTOOL} --mode=compile $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
59  ####### Build rules
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
81                 stencilManager.h
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
87  ####### Install