Mac shell script makefile problem

debug

macrumors newbie
Original poster
Nov 18, 2009
4
0
Hello-

I've been trying to compile a plugin for nuke, it comes shipped with a makefile however it doesn't appear to work, i've no idea about shell scripting but I've checked all the paths and they are all correct, any ideas what might be going wrong?

NDKDIR ?= /Applications/Nuke5.2v1.app/Contents/MacOS
CXX ?= g++
LINK ?= g++
CXXFLAGS ?= -g -c -DUSE_GLEW -I$(NDKDIR)/include -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
LINKFLAGS ?= -L$(NDKDIR) -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
LIBS ?= -lDDImage -lGLEW
LINKFLAGS += -bundle

FRAMEWORKS ?= -framework QuartzCore -framework IOKit -framework CoreFoundation -framework Carbon -framework ApplicationServices -framework OpenGL -framework AGL -framework Quicktime
all: Add.dylib AddChannels.dylib AppendClip.dylib Assert.dylib Blocky.dylib CheckerBoard2.dylib ColorLookup.dylib Constant.dylib Convolve.dylib CornerPin2D.dylib Difference.dylib Dilate.dylib IDistort.dylib Grade.dylib Keymix.dylib Mirror.dylib Noise.dylib Position.dylib Rectangle.dylib Remove.dylib Saturation.dylib Socket.dylib TemporalMedian.dylib Sphere.dylib LogGeo.dylib Phong.dylib SimpleAxis.dylib UVProject.dylib crwReader.dylib dpxReader.dylib dpxWriter.dylib movReader.dylib movWriter.dylib iffReader.dylib psdReader.dylib yuvReader.dylib yuvWriter.dylib GPUFileShader.dylib Draw2D.dylib Draw3D.dylib Handle.dylib
.PRECIOUS : %.os
%.os: %.cpp
$(CXX) $(CXXFLAGS) -o $(@) $<
%.dylib: %.os
$(LINK) $(LINKFLAGS) $(LIBS) $(FRAMEWORKS) -o $(@) $<
clean:
rm -rf *.os Add.dylib AddChannels.dylib AppendClip.dylib Assert.dylib Blocky.dylib CheckerBoard2.dylib ColorLookup.dylib Constant.dylib Convolve.dylib CornerPin2D.dylib Difference.dylib Dilate.dylib IDistort.dylib Grade.dylib Keymix.dylib Mirror.dylib Noise.dylib Position.dylib Rectangle.dylib Remove.dylib Saturation.dylib Socket.dylib TemporalMedian.dylib Sphere.dylib LogGeo.dylib Phong.dylib SimpleAxis.dylib UVProject.dylib crwReader.dylib dpxReader.dylib dpxWriter.dylib movReader.dylib movWriter.dylib iffReader.dylib psdReader.dylib yuvReader.dylib yuvWriter.dylib GPUFileShader.dylib Draw2D.dylib Draw3D.dylib Handle.dylib

and this is what the terminal outputs when i double click on the makefile:

/Applications/Nuke5.2v1/Documentation/NDK/examples/Makefile ; exit;
/Applications/Nuke5.2v1/Documentation/NDK/examples/Makefile: line 8: NDKDIR: command not found
/Applications/Nuke5.2v1/Documentation/NDK/examples/Makefile: line 9: CXX: command not found
LINK: ?=: No such file or directory
/Applications/Nuke5.2v1/Documentation/NDK/examples/Makefile: line 11: NDKDIR: command not found
/Applications/Nuke5.2v1/Documentation/NDK/examples/Makefile: line 11: CXXFLAGS: command not found
/Applications/Nuke5.2v1/Documentation/NDK/examples/Makefile: line 12: NDKDIR: command not found
/Applications/Nuke5.2v1/Documentation/NDK/examples/Makefile: line 12: LINKFLAGS: command not found
/Applications/Nuke5.2v1/Documentation/NDK/examples/Makefile: line 13: LIBS: command not found
/Applications/Nuke5.2v1/Documentation/NDK/examples/Makefile: line 14: LINKFLAGS: command not found
/Applications/Nuke5.2v1/Documentation/NDK/examples/Makefile: line 16: FRAMEWORKS: command not found
/Applications/Nuke5.2v1/Documentation/NDK/examples/Makefile: line 17: all:: command not found
/Applications/Nuke5.2v1/Documentation/NDK/examples/Makefile: line 18: .PRECIOUS: command not found
/Applications/Nuke5.2v1/Documentation/NDK/examples/Makefile: line 19: fg: no job control
/Applications/Nuke5.2v1/Documentation/NDK/examples/Makefile: line 20: syntax error near unexpected token `newline'
/Applications/Nuke5.2v1/Documentation/NDK/examples/Makefile: line 20: ` $(CXX) $(CXXFLAGS) -o $(@) $<'
any help in getting this to work would be great, thanks!
 

debug

macrumors newbie
Original poster
Nov 18, 2009
4
0
I've been running makefile.. that was wrong wasn't it :p

I ran make as root and its working now, thanks!

dom
 

debug

macrumors newbie
Original poster
Nov 18, 2009
4
0
What would be the best way to link this to an xcode project?

thanks again
 

Similar threads

Register on MacRumors! This sidebar will go away, and you'll see fewer ads.