1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-19 03:52:17 +00:00
freebsd-ports/graphics/ayam/files/patch-Makefile.shared
Mathieu Arnold 193379f492 Update to 1.23.
PR:		206248
Submitted by:	tkato432 yahoo com
Sponsored by:	Absolight
2016-03-08 16:04:15 +00:00

228 lines
7.1 KiB
Plaintext

--- Makefile.shared.orig 2016-01-13 20:09:57 UTC
+++ Makefile.shared
@@ -7,7 +7,7 @@
# You can also use "wish ayamConf.tcl" to create a Makefile.
# Choose an installation prefix.
-PREFIX = /usr/local/ayam
+#PREFIX = /usr/local/ayam
#PREFIX = /opt/ayam
#PREFIX = /home/user/ayam
@@ -25,14 +25,14 @@ SCNDIR = $(PREFIX)/scn
INSTALL = ./ninstall
#INSTALL = install
-MKDIR = mkdir -p
+#MKDIR = mkdir -p
# the C compiler
-#CC = cc
+CC ?= cc
#CC = gcc
# the C++ compiler (just in use for the AyCSG and onio plugin)
-#CXX = CC
+CXX ?= c++
#CXX = g++
# the linker
@@ -77,7 +77,10 @@ LD = $(CXX)
# the default configuration is to build with Affine as RIB writer without
# any shader parsing library (i.e. you will have to build and load a
# plugin for shader parsing)
-CFLAGS = -O -DAYUSEAFFINE
+#CFLAGS = -O -DAYUSEAFFINE
+
+# make amd64 happy with fPIC
+CFLAGS += -fPIC -DAYUSESLXARGS -DAYUSEAQSISRIB -DAYENABLEWAIT
# simple configuration using BMRT
#CFLAGS = -O -DAYUSESLCARGS -DAYUSEBMRTRIBOUT
@@ -114,9 +117,9 @@ LDSWDYNAMIC = -dynamic
# extra ld flags needed to compile Ayam
# (gcc needs -rdynamic to allow shared objects access to global symbols)
# IRIX:
-EXLDFLAGS =
+#EXLDFLAGS =
# Linux:
-#EXLDFLAGS = -rdynamic
+EXLDFLAGS = -Wl,-export-dynamic
# MacOSX (X11):
#EXLDFLAGS = -flat_namespace -undefined suppress
# MacOSX (Aqua):
@@ -133,7 +136,7 @@ TOGLOBJECT = togl/togl.o
# OpenGL
# OpenGL includes
-GLINC = -I/usr/X11R6/include/
+GLINC = -I${LOCALBASE}/include/
# MacOSX (Aqua):
#GLINC =
# link options for linking with OpenGL libraries
@@ -143,24 +146,26 @@ GLLIBS = -lGLU -lGL
# TIFF
# TIFF includes
-TIFFINC = -I/usr/include/
+TIFFINC = -I${LOCALBASE}/include/
# link options for linking with TIFF library
TIFFLIB = -ltiff
# Tcl/Tk
# Tcl directory
-TCLDIR = ../../tcl8.4.19
+#TCLDIR = ../../tcl8.4.19
#TCLDIR = ../../tcl8.0
# Tcl includes
-TCLINC = -I$(TCLDIR)/generic
+#TCLINC = -I$(TCLDIR)/generic
+TCLINC = -I${TCL_INCLUDEDIR}/generic -I${TCL_INCLUDEDIR}
# MacOSX (Aqua):
#TCLINC =
# Tcl library
# link options for linking with Tcl library
-TCLLIB = -L$(TCLDIR)/unix -ltcl8.4
+#TCLLIB = -L$(TCLDIR)/unix -ltcl8.4
#TCLLIB = -L$(TCLDIR)/unix -ltcl8.0
+TCLLIB = -L${LOCALBASE}/lib -ltcl${TCL_SHLIB_VER}
# if you have an installed Tcl/Tk, you probably just want:
#TCLLIB = -ltcl
# MacOSX (Aqua):
@@ -168,18 +173,20 @@ TCLLIB = -L$(TCLDIR)/unix -ltcl8.4
# Tk sources directory
# Note: You really need the Tk _sources_ in order to compile Ayam!
-TKDIR = ../../tk8.4.19
+#TKDIR = ../../tk8.4.19
#TKDIR = ../../tk8.0
# Tk includes
-TKINC = -I$(TKDIR)/generic -I$(TKDIR)/unix
+#TKINC = -I$(TKDIR)/generic -I$(TKDIR)/unix
+TKINC = -I${TK_INCLUDEDIR}/generic -I${TK_INCLUDEDIR}
# MacOSX (Aqua):
#TKINC = -I$(TKDIR)/generic -I$(TKDIR)/macosx -I$(TKDIR)/xlib
# Tk library
# link options for linking with Tk library
-TKLIB = -L$(TKDIR)/unix -ltk8.4
+#TKLIB = -L$(TKDIR)/unix -ltk8.4
#TKLIB = -L$(TKDIR)/unix -ltk8.0
+TKLIB = -L${LOCALBASE}/lib -ltk${TK_SHLIB_VER}
# if you have an installed Tcl/Tk, you probably just want:
#TKLIB = -ltk
# MacOSX (Aqua):
@@ -187,11 +194,11 @@ TKLIB = -L$(TKDIR)/unix -ltk8.4
# X11
# X11 includes
-X11INC = -I/usr/X11R6/include
+X11INC = -I${LOCALBASE}/include
# MacOSX (Aqua):
#X11INC =
# link options for linking with X11
-X11LIBS = -L/usr/X11R6/lib -lXmu -lXext -lX11
+X11LIBS = -L${LOCALBASE}/lib -lXmu -lXext -lX11
#X11LIBS = -L/usr/X11R6/lib -lXmu -lXext -lX11
# MacOSX (Aqua):
#X11LIBS =
@@ -202,23 +209,25 @@ X11LIBS = -L/usr/X11R6/lib -lXmu -lXext
AFFINEINC = -Iaffine/include
# if you use Affine as BMRT libribout replacement
# (also add -DAYUSEAFFINE to CFLAGS!):
-AFFINEOBJS = ./affine/src/write.o ./affine/src/constant.o
+#AFFINEOBJS = ./affine/src/write.o ./affine/src/constant.o
# if you do not use Affine as BMRT libribout replacement:
-#AFFINEOBJS =
+AFFINEOBJS =
# Aqsis
-AQSISDIR = /usr/local/aqsis
-AQSISINC = -I$(AQSISDIR)/include
+AQSISDIR = ${LOCALBASE}
+AQSISINC = -I$(AQSISDIR)/include/aqsis -I$(AQSISDIR)/include/aqsis/ri
AQSISLIBDIR = $(AQSISDIR)/lib
# if you do not use Aqsis libslxargs as libslcargs replacement:
-AQSISOBJS =
+#AQSISOBJS =
# if you use Aqsis libslxargs (add -DAYUSESLXARGS to CFLAGS!):
#AQSISOBJS = $(AQSISLIBDIR)/rcdummy.o $(AQSISLIBDIR)/libshadervm.so $(AQSISLIBDIR)/libshaderexecenv.so $(AQSISLIBDIR)/libslxargs.so $(AQSISLIBDIR)/libaqsistypes.so -L /usr/local/lib -llog4cpp
+AQSISOBJS = $(AQSISDIR)/lib/libaqsis_core.so $(AQSISLIBDIR)/libaqsis_shadervm.so $(AQSISLIBDIR)/libaqsis_slxargs.so -L${AQSISLIBDIR}
+
# if you do not use Aqsis libri2rib as BMRT libribout replacement:
-AQSISRI2RIB =
+#AQSISRI2RIB =
# if you use Aqsis libri2rib (add -DAYUSEAQSISRIB to CFLAGS above!):
-#AQSISRI2RIB = $(AQSISLIBDIR)/libri2rib.so -L /usr/local/lib -llog4cpp
+AQSISRI2RIB = $(AQSISLIBDIR)/libaqsis_ri2rib.so -L${AQSISLIBDIR} -pthread
# BMRT
@@ -246,9 +255,9 @@ SLCARGSLIB =
# IRIX, Solaris, (MacOSX<10.4: get libdl from Fink!):
#DL = -ldl
# Linux:
-DL = -ldl -lpthread
+#DL = -ldl -lpthread
# NetBSD/MacOSX (Aqua):
-#DL =
+DL =
# linker flags to produce shared modules:
@@ -267,8 +276,9 @@ AFFINEDIR = ../../affine0008
RRIBLIBS = -L$(AFFINEDIR)/lib -lribrdr -lribhash -lribnop -lm
# Ayslx Plugin (Aqsis)
-AYSLXINCDIR = $(AQSISDIR)/include
-AYSLXLIBS = $(AQSISDIR)/lib/rcdummy.o $(AQSISDIR)/lib/libshadervm.so $(AQSISDIR)/lib/libshaderexecenv.so $(AQSISDIR)/lib/libslxargs.so $(AQSISDIR)/lib/libaqsistypes.so -L/usr/local/lib -llog4cpp
+AYSLXINCDIR = ${AQSISDIR}/include -I${AQSISDIR}/include/aqsis -I${AQSISDIR}/include/aqsis/ri
+AYSLXLIBS = -L${AQSISLIBDIR} $(AQSISDIR)/lib/libaqsis_core.so $(AQSISDIR)/lib/libaqsis_shadervm.so $(AQSISDIR)/lib/libaqsis_slxargs.so -L${LOCALBASE}/lib
+
# Ayslc Plugin (BMRT)
AYSLCINCDIR = $(BMRTDIR)/include
@@ -536,9 +546,9 @@ RRIBOBJS = plugins/rrib.o
.cpp.o:
$(CXX) -c $(CFLAGS) $*.cpp -o $@ $(OPENCSGINC) $(AYINC) -Iplugins
-all: ayamsh
+all: ayamsh plugins
-plugins: csphere.so sfcurve.so mfio.so metaobj.so mopsi.so
+plugins: ayslx.so csphere.so sfcurve.so mfio.so metaobj.so mopsi.so
ayamsh: $(AYAMOBJS) $(TOGLOBJECT) $(AFFINEOBJS)
$(LD) $(AYAMOBJS) $(TOGLOBJECT) $(EXLDFLAGS) -o ayamsh $(TKLIB) $(TCLLIB) $(GLLIBS) $(X11LIBS) $(RIBOUTLIB) $(AQSISRI2RIB) $(SLCARGSLIB) $(AFFINEOBJS) $(AQSISOBJS) $(TIFFLIB) -lm $(DL)
@@ -591,7 +601,7 @@ idr.so: $(IDROBJS)
$(CC) $(SHLFLAGS) $(IDROBJS) -o plugins/idr.so $(TIFFLIB)
mf3d:
- cd MF3D; make -f Makefile.mf3d
+ cd MF3D; $(MAKE) -f Makefile.mf3d
mfio.so: plugins/mfio.o mf3d
$(CC) $(SHLFLAGS) $(MF3DOBJS) plugins/mfio.o -o plugins/mfio.so
@@ -657,7 +667,7 @@ sdnpatch.so:
$(CXX) $(SHLFLAGS) plugins/sdnpatch.o -o plugins/sdnpatch.so $(SDNPATCHLIB)
libsub:
- cd plugins/subdivide/src;make -f $(SUBDIVMK)
+ cd plugins/subdivide/src;$(MAKE) -f $(SUBDIVMK)
subdiv.so: libsub
$(CXX) -c $(CFLAGS) plugins/subdiv.cpp -o plugins/subdiv.o $(AYINC) $(SUBDIVINC)
@@ -695,7 +705,7 @@ mostlyclean:
clean: mostlyclean
-rm -f $(AFFINEOBJS)
- -cd MF3D; make -f Makefile.mf3d clean
+ -cd MF3D; $(MAKE) -f Makefile.mf3d clean
DOCFILES = ../Setup.txt ../Changes.txt ../License.txt ../doc/refcard.tcl\
../doc/refcard.pdf ../doc/ayam.pdf