--- Makefile.shared.orig 2010-12-23 21:04:42.000000000 +0100 +++ Makefile.shared 2011-01-05 10:49:15.000000000 +0100 @@ -4,7 +4,7 @@ # Makefile for Ayam (shared version) # Choose an installation prefix. -PREFIX = /usr/local/ayam +#PREFIX = /usr/local/ayam #PREFIX = /opt/ayam # if you use one of the following, be sure to change LIBDIR # and DOCDIR to a more suitable (Ayam specific) path @@ -31,14 +31,14 @@ 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 = ${CC} #CXX = g++ # the linker @@ -82,7 +82,10 @@ # 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 += -O -fPIC -DAYUSESLXARGS -DAYUSEAQSISRIB -DAYENABLEWAIT # simple configuration using BMRT #CFLAGS = -O -DAYUSESLCARGS -DAYUSEBMRTRIBOUT @@ -96,7 +99,7 @@ # MacOSX with Aqua: #CFLAGS = -O -DAYWITHAQUA -DAYUSEAFFINE -DAYENABLEFEXIT -DUSE_NON_CONST # MacOSX with Aqua (universal binary, support for older MacOSX): -CFLAGS = -O -DAYWITHAQUA -DAYUSEAFFINE -DAYENABLEFEXIT -DUSE_NON_CONST -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.2 +#CFLAGS = -O -DAYWITHAQUA -DAYUSEAFFINE -DAYENABLEFEXIT -DUSE_NON_CONST -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.2 # MacOSX with X11: #CFLAGS = -O -DAYUSEAFFINE -DAYENABLEFEXIT @@ -121,9 +124,9 @@ # 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 = -rdynamic # MacOSX (X11): #EXLDFLAGS = -flat_namespace -undefined suppress # MacOSX (Aqua): @@ -140,7 +143,7 @@ # OpenGL # OpenGL includes -GLINC = -I/usr/X11R6/include/ +GLINC = -I${LOCALBASE}/include/ # MacOSX (Aqua): #GLINC = # link options for linking with OpenGL libraries @@ -150,24 +153,26 @@ # 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.2.2 +#TCLDIR = ../../tcl9.2.2 #TCLDIR = ../../tcl8.0 # Tcl includes -TCLINC = -I$(TCLDIR)/generic +#TCLINC = -I$(TCLDIR)/generic +TCLINC = -I%%TCL_INCLUDEDIR%% # MacOSX (Aqua): #TCLINC = # Tcl library # link options for linking with Tcl library -TCLLIB = -L$(TCLDIR)/unix -ltcl8.2 +#TCLLIB = -L$(TCLDIR)/unix -ltcl9.2 #TCLLIB = -L$(TCLDIR)/unix -ltcl8.0 +TCLLIB = -L%%TCL_LIBDIR%% -ltcl%%USE_TCL%% # if you have an installed Tcl/Tk, you probably just want: #TCLLIB = -ltcl # MacOSX (Aqua): @@ -175,7 +180,7 @@ # Tk sources directory # Note: You really need the Tk _sources_ in order to compile Ayam! -TKDIR = ../../tk8.2.2 +TKDIR = %%TK_INCLUDEDIR%% #TKDIR = ../../tk8.0 # Tk includes @@ -185,8 +190,9 @@ # Tk library # link options for linking with Tk library -TKLIB = -L$(TKDIR)/unix -ltk8.2 +#TKLIB = -L$(TKDIR)/unix -ltk8.2 #TKLIB = -L$(TKDIR)/unix -ltk8.0 +TKLIB = -L%%TK_LIBDIR%% -ltk%%USE_TK%% # if you have an installed Tcl/Tk, you probably just want: #TKLIB = -ltk # MacOSX (Aqua): @@ -194,11 +200,11 @@ # 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 = @@ -209,23 +215,25 @@ 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} -lstdc++ + # 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} -lstdc++ ${PTHREAD_LIBS} # BMRT @@ -253,9 +261,9 @@ # 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: @@ -274,8 +282,9 @@ 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 @@ -520,9 +529,9 @@ .cpp.o: $(CXX) -c $(CFLAGS) $*.cpp -o $@ $(AYINC) $(OPENCSGINC) -Iplugins -all: ayamsh +all: ayamsh plugins -plugins: csphere.so mfio.so metaobj.so mopsi.so +plugins: csphere.so mfio.so metaobj.so mopsi.so ayslx.so ayamsh: $(AYAMOBJS) $(TOGLOBJECT) $(AFFINEOBJS) $(LD) $(AYAMOBJS) $(TOGLOBJECT) $(EXLDFLAGS) -o ayamsh $(TKLIB) $(TCLLIB) $(GLLIBS) $(X11LIBS) $(RIBOUTLIB) $(AQSISRI2RIB) $(SLCARGSLIB) $(AFFINEOBJS) $(AQSISOBJS) $(TIFFLIB) -lm $(DL)