Ticket #33756: patch-ARB-makefile.2.diff

File patch-ARB-makefile.2.diff, 3.4 KB (added by matt.cottrell@…, 13 years ago)

Resolves problem with patch not applying

  • Makefile

    old new  
    4242
    4343# ---------------------- [unconditionally used options]
    4444
    45 GCC:=gcc
    46 GPP:=g++
    47 CPPreal:=cpp
    48 
     45ifdef DARWIN
     46        #GCC:=gccÊ Ê Ê <Now set in the Portfile>
     47        #GPP:=g++Ê Ê Ê <Now set in the Portfile>
     48        #CPPreal:=cppÊ <Now set in the Portfile>
     49else
     50        GCC:=gcc
     51        GPP:=g++
     52        CPPreal:=cpp
     53endif
    4954
    5055
    5156# ---------------------- compiler version detection
     
    7176#---------------------- define special directories for non standard builds
    7277
    7378ifdef DARWIN
    74 OSX_SDK:=/Developer/SDKs/MacOSX10.5.sdk
    75 OSX_FW:=/System/Library/Frameworks
    76 OSX_FW_OPENGL:=$(OSX_FW)/OpenGL.framework/Versions/A/Libraries
    77 OSX_FW_IMAGEIO:=$(OSX_FW)/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources
     79        OSX_FW:=/System/Library/Frameworks
     80        OSX_FW_OPENGL:=$(OSX_FW)/OpenGL.framework/Versions/A/Libraries
     81        OSX_FW_GLUT:=$(OSX_FW)/GLUT.framework/Versions/A/Libraries
     82        OSX_FW_IMAGEIO:=$(OSX_FW)/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources
    7883endif
    7984
    8085#----------------------
     
    186191dflags += -D$(MACH) # define machine
    187192
    188193ifdef DARWIN
    189         cflags += -no-cpp-precomp
    190194        shared_cflags += -fno-common
    191195else
    192196        dflags +=  $(shell getconf LFS_CFLAGS)
     
    199203
    200204#---------------------- X11 location
    201205
    202 XHOME:=/usr/X11R6
     206ifdef DARWIN
     207        XHOME:=$(PREFIX)
     208else
     209        XHOME:=/usr/X11R6
     210endif
     211
     212
    203213XINCLUDES:=-I$(XHOME)/include
    204214
    205215ifdef DARWIN
    206         XINCLUDES := -I/sw/include -I$(OSX_SDK)/usr/X11/include -I$(OSX_SDK)/usr/include/krb5 -I/usr/OpenMotif/include #Snow Leopard couldn't find OpenMotif
     216        XINCLUDES += -I$(OSX_FW)/GLUT.framework/Headers -I$(OSX_FW)/OpenGL.framework/Headers -I$(OSX_SDK)/usr/include/krb5
    207217endif
    208218
    209219ifdef DARWIN
    210         XLIBS := -L/usr/OpenMotif/lib -lXm -L$(XHOME)/lib -lpng -lXt -lX11 -lXext -lc -lXmu -lXi
    211         XLIBS += -lGLU -lGL -Wl,-dylib_file,$(OSX_FW_OPENGL)/libGL.dylib:$(OSX_FW_OPENGL)/libGL.dylib
     220        XLIBS := -L$(XHOME)/lib -lXm -lpng -lz -lXt -lX11 -lXext -lXp -lXmu -lXi
     221        XLIBS += -Wl,-dylib_file,$(OSX_FW_OPENGL)/libGL.dylib:$(OSX_FW_OPENGL)/libGL.dylib
     222        XLIBS += -Wl,-dylib_file,$(OSX_FW_OPENGL)/libGLU.dylib:$(OSX_FW_OPENGL)/libGLU.dylib
    212223else
    213224        XLIBS:=-L$(XHOME)/$(CROSS_LIB) -lXm -lXpm -lXt -lXext -lX11
    214225endif
     
    226237
    227238GL_PNGLIBS := -L$(ARBHOME)/GL/glpng -lglpng_arb -lpng
    228239
    229  ifdef DARWIN
    230         GLEWLIB := -L/usr/lib -lGLEW -L$(OSX_SDK)/usr/X11/lib -lGLw
    231         GLUTLIB := -L$(XHOME)/lib -lglut
    232  else
    233240        GLEWLIB := -lGLEW -lGLw
    234         GLUTLIB := -lglut
    235  endif
     241        GLUTLIB := -glut
    236242
    237243GL_LIBS := $(GL_LIB) $(GLEWLIB) $(GLUTLIB) $(GL_PNGLIBS)
    238244
     
    248254
    249255#---------------------- tiff lib:
    250256
    251 ifdef DARWIN
    252         TIFFLIBS := -L/usr/local/lib -ltiff -L$(OSX_FW_IMAGEIO) -lTIFF 
    253 else
    254         TIFFLIBS := -ltiff
    255 endif
     257TIFFLIBS := -ltiff
    256258
    257259#---------------------- basic libs:
    258260
     
    318320# other used tools
    319321
    320322CTAGS := etags
     323
    321324ifdef DARWIN
    322         XMKMF := /usr/X11/bin/xmkmf
     325        XMKMF := $(PREFIX)/bin/xmkmf
    323326else
    324327        XMKMF := /usr/bin/X11/xmkmf
    325328endif
     329
    326330MAKEDEPEND_PLAIN = makedepend
    327331
    328332MAKEDEPEND = $(FORCEMASK);$(MAKEDEPEND_PLAIN)
     
    532536ARBDBPP_LIB=-lARBDBPP
    533537
    534538LIBS = $(ARBDB_LIB) $(SYSLIBS)
    535 GUI_LIBS = $(LIBS) -lAW -lAWT $(XLIBS)
     539
     540ifdef DARWIN
     541        GUI_LIBS = -framework GLUT -framework OpenGL $(LIBS) -lAW -lAWT $(XLIBS)
     542else
     543        GUI_LIBS = $(LIBS) -lAW -lAWT $(XLIBS)
     544endif
    536545
    537546LIBPATH = -L$(ARBHOME)/LIBLINK
    538547