0

以下代码是 NUKE 插件 makefile。(Mirrior.cpp -> Mirrior.dylib)

我只想在我的 makefile 中添加“header.h”和“header.cpp”。

应该去哪里改???

# Compiler Info ('g++-4.0 --version')
# i686-apple-darwin10-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5494)
# Copyright (C) 2005 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions.  There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# End Compiler Info Output
NDKDIR ?= /Applications/Nuke8.0v2/Nuke8.0v2.app/Contents/MacOS
MYCXX ?= g++-4.0
LINK ?= g++-4.0
CXXFLAGS ?= -g -c -DUSE_GLEW -I$(NDKDIR)/include -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch x86_64
LINKFLAGS ?= -L$(NDKDIR) -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk -arch x86_64
LIBS ?= -lDDImage -lGLEW
LINKFLAGS += -bundle
FRAMEWORKS ?= -framework QuartzCore -framework IOKit -framework CoreFoundation -framework Carbon -framework ApplicationServices -framework OpenGL -framework AGL 

all: Mirror.dylib 

.PRECIOUS : %.os

%.os: %.cpp
    $(MYCXX) $(CXXFLAGS) -o $(@) $<
%.dylib: %.os
    $(LINK) $(LINKFLAGS) $(LIBS) $(FRAMEWORKS) -o $(@) $<

clean:
    rm -rf *.os Mirror.dylib
4

1 回答 1

0

你的问题有点模棱两可,但我认为这会做你想要的:

Mirrior.dylib: header.os

%.dylib: %.os
    $(LINK) $(LINKFLAGS) $(LIBS) $(FRAMEWORKS) -o $(@) $^
于 2014-04-07T12:16:52.187 回答