Ticket #28276: patch-ARB-makefile.3.diff

File patch-ARB-makefile.3.diff, 2.5 KB (added by matt.cottrell@…, 14 years ago)

Fixes the libpng 1.4 runtime error (look in PREFIX for XINCLUDES)

  • Makefile

    old new  
    3131#                       configurable in config.makefile
    3232#
    3333# -----------------------------------------------------
     34
    3435# Read configuration
    3536include config.makefile
    3637
    3738ifeq ($(LD_LIBRARY_PATH),'')
    38 LD_LIBRARY_PATH:=${ARBHOME}/lib
     39        LD_LIBRARY_PATH:=${ARBHOME}/lib
    3940endif
    4041
    4142FORCEMASK = umask 002
     
    4647GPP:=g++
    4748CPPreal:=cpp
    4849
    49 
    50 
    5150# ---------------------- compiler version detection
    5251
    5352# supported compiler versions:
     
    7170#---------------------- define special directories for non standard builds
    7271
    7372ifdef DARWIN
    74 OSX_SDK:=/Developer/SDKs/MacOSX10.5.sdk
     73OSX_SDK:=
    7574OSX_FW:=/System/Library/Frameworks
    7675OSX_FW_OPENGL:=$(OSX_FW)/OpenGL.framework/Versions/A/Libraries
    7776OSX_FW_IMAGEIO:=$(OSX_FW)/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources
     
    200199#---------------------- X11 location
    201200
    202201XHOME:=/usr/X11R6
    203 XINCLUDES:=-I$(XHOME)/include
    204202
    205203ifdef 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
     204        XINCLUDES := -I$(PREFIX)/include -I$(OSX_FW)/OpenGL.framework/Headers -I$(OSX_SDK)/usr/X11/include -I$(OSX_SDK)/usr/include/krb5 -I$(OSX_FW)/GLUT.framework/Headers
     205else
     206    XINCLUDES:=-I$(XHOME)/include
    207207endif
    208208
    209209ifdef DARWIN
    210         XLIBS := -L/usr/OpenMotif/lib -lXm -L$(XHOME)/lib -lpng -lXt -lX11 -lXext -lXp -lc -lXmu -lXi
     210        XLIBS := -L$(PREFIX)/lib -lXm -lpng -lz -lXt -lX11 -lXext -lXp -lXmu -lXi
    211211        XLIBS += -lGLU -lGL -Wl,-dylib_file,$(OSX_FW_OPENGL)/libGL.dylib:$(OSX_FW_OPENGL)/libGL.dylib
    212212else
    213213        XLIBS:=-L$(XHOME)/$(CROSS_LIB) -lXm -lXpm -lXp -lXt -lXext -lX11
     
    226226
    227227GL_PNGLIBS := -L$(ARBHOME)/GL/glpng -lglpng_arb -lpng
    228228
    229  ifdef DARWIN
    230         GLEWLIB := -L/usr/lib -lGLEW -L$(OSX_SDK)/usr/X11/lib -lGLw
    231         GLUTLIB := -L$(XHOME)/lib -lglut
    232  else
    233         GLEWLIB := -lGLEW -lGLw
    234         GLUTLIB := -lglut
    235  endif
    236 
     229GLEWLIB := -lGLEW -lGLw
     230GLUTLIB := -lglut
     231 
    237232GL_LIBS := $(GL_LIB) $(GLEWLIB) $(GLUTLIB) $(GL_PNGLIBS)
    238233
    239234#XLIBS += $(GL_LIB)
     
    248243
    249244#---------------------- tiff lib:
    250245
    251 ifdef DARWIN
    252         TIFFLIBS := -L/usr/local/lib -ltiff -L$(OSX_FW_IMAGEIO) -lTIFF 
    253 else
    254         TIFFLIBS := -ltiff
    255 endif
     246TIFFLIBS := -ltiff
    256247
    257248#---------------------- basic libs:
    258249
     
    319310
    320311CTAGS := etags
    321312ifdef DARWIN
    322         XMKMF := /usr/X11/bin/xmkmf
     313        XMKMF := $(PREFIX)/bin/xmkmf
    323314else
    324315        XMKMF := /usr/bin/X11/xmkmf
    325316endif