Rev 52 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 52 | Rev 64 | ||
---|---|---|---|
Line 34... | Line 34... | ||
34 | # although this may result in a larger overall executable |
34 | # although this may result in a larger overall executable |
35 | LEX = flex |
35 | LEX = flex |
36 | YACC = bison -y |
36 | YACC = bison -y |
37 | YFLAGS = -d |
37 | YFLAGS = -d |
38 | 38 | ||
39 | PSAPI = ../PhotoshopAPI |
39 | PSAPI = "../Adobe Photoshop CS3 Public Beta SDK/photoshopapi" |
- | 40 | # in CS3(CS2?), PiPL FormatFlags added a 'fmtCannotCreateThumbnail' bit |
|
- | 41 | # older SDKs don't have this, so comment out this define if using them |
|
- | 42 | REZFLAGS = -d CS3SDK |
|
40 | 43 | ||
41 | CFLAGS += -O2 -W -Wall -Wno-main -Wno-unused-parameter -Wno-multichar |
44 | CFLAGS += -O2 -W -Wall -Wno-main -Wno-unused-parameter -Wno-multichar |
42 | CPPFLAGS += -I$(PSAPI)/Pica_sp -I$(PSAPI)/Photoshop -I$(PSAPI)/General \ |
45 | CPPFLAGS += -I$(PSAPI)/Pica_sp -I$(PSAPI)/Photoshop -I$(PSAPI)/General \ |
43 | -I../common/adobeplugin -I../common/tt |
46 | -I../common/adobeplugin -I../common/tt |
44 | 47 | ||
Line 85... | Line 88... | ||
85 | # build everything |
88 | # build everything |
86 | all : dll osx |
89 | all : dll osx |
87 | 90 | ||
88 | dll : $(PLUGIN_W32) |
91 | dll : $(PLUGIN_W32) |
89 | 92 | ||
90 | osx : $(BUNDLE) $(PLUGIN_OSX) $(PLUGIN_RSRC) $(BUNDLE)/Contents/Info.plist |
93 | osx fat : $(BUNDLE) $(PLUGIN_OSX) $(PLUGIN_RSRC) $(BUNDLE)/Contents/Info.plist |
- | 94 | ||
- | 95 | # See: http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/compiling/chapter_4_section_3.html#//apple_ref/doc/uid/TP40002850-BAJCFEBA |
|
- | 96 | fat : CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 |
|
- | 97 | fat : LDFLAGS += -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 |
|
- | 98 | fat : REZFLAGS += -arch ppc -arch i386 |
|
91 | 99 | ||
92 | $(BUNDLE) : |
100 | $(BUNDLE) : |
93 | mkdir -p $@ |
101 | mkdir -p $@ |
- | 102 | /Developer/Tools/SetFile -a B $(@) |
|
94 | /Developer/Tools/SetFile -t TEXT -c ttxt dist/examples/*.afs |
103 | /Developer/Tools/SetFile -t TEXT -c ttxt dist/examples/*.afs |
95 | /Developer/Tools/SetFile -a B $(BUNDLE) |
- | |
96 | 104 | ||
97 | # insert correct executable name and version string in bundle's Info.plist |
105 | # insert correct executable name and version string in bundle's Info.plist |
98 | $(BUNDLE)/Contents/Info.plist : Info.plist version.h |
106 | $(BUNDLE)/Contents/Info.plist : $(BUNDLE) Info.plist version.h |
- | 107 | mkdir -p $(dir $@) |
|
99 | V=`sed -n -E 's/^.*VERSION_STR[[:blank:]]+\"([^"]*)\"/\1/p' version.h` ;\ |
108 | V=`sed -n -E 's/^.*VERSION_STR[[:blank:]]+\"([^"]*)\"/\1/p' version.h` ;\ |
100 | sed -e s/VERSION_STR/$$V/ -e s/EXEC/$(EXEC)/ $< > $@ |
109 | sed -e s/VERSION_STR/$$V/ -e s/EXEC/$(EXEC)/ $< > $@ |
101 | 110 | ||
102 | clean : |
111 | clean : |
103 | rm -fr *.[ox] obj/* obj_w32/* $(PLUGIN_W32) $(BUNDLE) \ |
112 | rm -fr *.[ox] obj/* obj_w32/* $(PLUGIN_W32) $(BUNDLE) \ |
Line 171... | Line 180... | ||
171 | 180 | ||
172 | gentab : gentab.c funcs.h ; $(CC) -o $@ $< -lm |
181 | gentab : gentab.c funcs.h ; $(CC) -o $@ $< -lm |
173 | trigtab.c : gentab ; ./gentab > $@ |
182 | trigtab.c : gentab ; ./gentab > $@ |
174 | 183 | ||
175 | # compile Mac resources (into data fork of .rsrc file) |
184 | # compile Mac resources (into data fork of .rsrc file) |
176 | $(PLUGIN_RSRC) : PiPL_macho.r ui_mac.r scripting.r ui.h version.h |
185 | $(PLUGIN_RSRC) : $(BUNDLE) PiPL_macho.r ui_mac.r scripting.r ui.h version.h |
177 | mkdir -p $(dir $@) |
186 | mkdir -p $(dir $@) |
178 | /Developer/Tools/Rez -o $@ -useDF $(filter %.r,$^) \ |
187 | /Developer/Tools/Rez -o $@ -useDF $(REZFLAGS) $(filter %.r,$^) \ |
179 | -i /Developer/Headers/FlatCarbon \ |
188 | -i /Developer/Headers/FlatCarbon \ |
180 | -i $(PSAPI)/Resources \ |
189 | -i $(PSAPI)/Resources \ |
181 | -i $(PSAPI)/Photoshop |
190 | -i $(PSAPI)/Photoshop |
182 | ls -l $@ |
191 | ls -l $@ |
183 | 192 | ||
184 | 193 | ||
185 | # ---------- link rules ---------- |
194 | # ---------- link rules ---------- |
186 | 195 | ||
187 | # link OS X Mach-O executable |
196 | # link OS X Mach-O executable |
188 | $(PLUGIN_OSX) : exports.exp $(OBJ_OSX) $(PLUGIN_RSRC) |
197 | $(PLUGIN_OSX) : $(BUNDLE) exports.exp $(OBJ_OSX) $(PLUGIN_RSRC) |
189 | mkdir -p $(dir $@) |
198 | mkdir -p $(dir $@) |
- | 199 | $(CC) -bundle -o $@ $(OBJ_OSX) \ |
|
190 | $(CC) -bundle -o $@ $(OBJ_OSX) -exported_symbols_list exports.exp \ |
200 | $(LDFLAGS) -exported_symbols_list exports.exp \ |
191 | -framework Carbon -framework System |
201 | -framework Carbon -framework System |
192 | ls -l $@ |
202 | ls -l $@ |
- | 203 | file $@ |
|
193 | 204 | ||
194 | # link Win32 DLL |
205 | # link Win32 DLL |
195 | $(PLUGIN_W32) : exports.def $(OBJ_W32) obj_w32/res.o |
206 | $(PLUGIN_W32) : exports.def $(OBJ_W32) obj_w32/res.o |
196 | $(DLLWRAP) -o $@ -def $^ -mwindows -s |
207 | $(DLLWRAP) -o $@ -def $^ -mwindows -s |
197 | ls -l $@ |
208 | ls -l $@ |