Subversion Repositories filter_foundry

Rev

Rev 292 | Rev 484 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 292 Rev 439
1
# This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop
1
# This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop
2
# Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.com.au
2
# Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.com.au
3
# Copyright (C) 2018-2019 Daniel Marschall, ViaThinkSoft
3
# Copyright (C) 2018-2019 Daniel Marschall, ViaThinkSoft
4
 
4
 
5
# This program is free software; you can redistribute it and/or modify
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by  
6
# it under the terms of the GNU General Public License as published by  
7
# the Free Software Foundation; either version 2 of the License, or
7
# the Free Software Foundation; either version 2 of the License, or
8
# (at your option) any later version.
8
# (at your option) any later version.
9
 
9
 
10
# This program is distributed in the hope that it will be useful,
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
# GNU General Public License for more details.
13
# GNU General Public License for more details.
14
 
14
 
15
# You should have received a copy of the GNU General Public License  
15
# You should have received a copy of the GNU General Public License  
16
# along with this program; if not, write to the Free Software
16
# along with this program; if not, write to the Free Software
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 
18
 
19
# GNU Makefile
19
# GNU Makefile
20
# builds Win32 DLL and CS2/Mac Mach-O plugin bundle
20
# builds Win32 DLL and CS2/Mac Mach-O plugin bundle
21
 
21
 
22
 
22
 
23
# ---------- variables & flags ----------
23
# ---------- variables & flags ----------
24
 
24
 
25
EXEC = FilterFoundry
25
EXEC = FilterFoundry
26
 
26
 
27
VERSION = $(shell perl -n -e 'm/^.*VERSION_STR[[:blank:]]+\"([^"]*)\"/ && print $$1;' version.h)
27
VERSION = $(shell perl -n -e 'm/^.*VERSION_STR[[:blank:]]+\"([^"]*)\"/ && print $$1;' version.h)
28
 
28
 
29
MINGW_CC = i386-mingw32msvc-gcc
29
MINGW_CC = i386-mingw32msvc-gcc
30
DLLWRAP  = i386-mingw32msvc-dllwrap
30
DLLWRAP  = i386-mingw32msvc-dllwrap
31
WINDRES  = i386-mingw32msvc-windres
31
WINDRES  = i386-mingw32msvc-windres
32
 
32
 
33
# use GNU flex and bison
33
# use GNU flex and bison
34
# these lines can be commented to use system lex and yacc
34
# these lines can be commented to use system lex and yacc
35
# although this may result in a larger overall executable
35
# although this may result in a larger overall executable
36
LEX = flex
36
LEX = flex
37
YACC = bison -y
37
YACC = bison -y
38
YFLAGS = -d
38
YFLAGS = -d
39
 
39
 
40
PSAPI = "photoshop_sdk/pluginsdk/photoshopapi"
40
PSAPI = "photoshop_sdk/pluginsdk/photoshopapi"
41
 
41
 
42
CFLAGS += -O2 -W -Wall -Wno-main -Wno-unused-parameter -Wno-multichar
42
CFLAGS += -O2 -W -Wall -Wno-main -Wno-unused-parameter -Wno-multichar
43
CPPFLAGS += -DYY_SKIP_YYWRAP \
43
CPPFLAGS += -DYY_SKIP_YYWRAP \
44
            -I$(PSAPI)/pica_sp -I$(PSAPI)/photoshop -I$(PSAPI)/general \
44
            -I$(PSAPI)/pica_sp -I$(PSAPI)/photoshop -I$(PSAPI)/general \
45
            -Itelegraphics_common/adobeplugin -Itelegraphics_common/tt
45
            -Itelegraphics_common/adobeplugin -Itelegraphics_common/tt
46
 
46
 
47
 
47
 
48
# ---------- source & object files ----------
48
# ---------- source & object files ----------
49
 
49
 
50
# where to find .c source files
50
# where to find .c source files
51
vpath %.c telegraphics_common/tt telegraphics_common/adobeplugin ../MoreFiles/Sources
51
vpath %.c telegraphics_common/tt telegraphics_common/adobeplugin ../MoreFiles/Sources
52
 
52
 
53
# list of source files
53
# list of source files
54
SRC_COMMON = main.c funcs.c process.c node.c symtab.c \
54
SRC_COMMON = main.c funcs.c process.c node.c symtab.c \
55
	ui.c ui_build.c preview.c read.c save.c make.c obfusc.c \
55
	ui.c ui_build.c preview.c read.c save.c make.c obfusc.c \
56
	scripting.c y.tab.c lex.yy.c str.c
56
	scripting.c y.tab.c lex.yy.c str.c
57
SRC_OSX = dbg_mac.c ui_mac.c make_mac.c load_mac.c ui_compat_mac.c \
57
SRC_OSX = dbg_mac.c ui_mac.c make_mac.c load_mac.c ui_compat_mac.c \
58
	choosefile_nav.c preview_mac.c \
58
	choosefile_nav.c preview_mac.c \
59
	MoreFilesExtras.c MoreFiles.c MoreDesktopMgr.c FileCopy.c Search.c
59
	MoreFilesExtras.c MoreFiles.c MoreDesktopMgr.c FileCopy.c Search.c
60
SRC_W32 = dbg_win.c manifest.c ui_win.c make_win.c versioninfo_modify_win.c load_win.c ui_compat_win.c \
60
SRC_W32 = dbg_win.c manifest.c ui_win.c make_win.c versioninfo_modify_win.c load_win.c ui_compat_win.c \
61
	choosefile_win.c ui_build_win.c compat_string.c compat_win.c \
61
	choosefile_win.c ui_build_win.c compat_string.c compat_win.c \
62
	file_compat_win.c dllmain.c
62
	file_compat_win.c dllmain.c slider_win.c
63
 
63
 
64
# derive lists of object files, separate for each platform
64
# derive lists of object files, separate for each platform
65
OBJ_OSX := $(patsubst %.c, obj/%.o,     $(SRC_COMMON) $(SRC_OSX))
65
OBJ_OSX := $(patsubst %.c, obj/%.o,     $(SRC_COMMON) $(SRC_OSX))
66
OBJ_W32 := $(patsubst %.c, obj_w32/%.o, $(SRC_COMMON) $(SRC_W32)) obj_w32/res.o
66
OBJ_W32 := $(patsubst %.c, obj_w32/%.o, $(SRC_COMMON) $(SRC_W32)) obj_w32/res.o
67
 
67
 
68
 
68
 
69
# ---------- executables ----------
69
# ---------- executables ----------
70
 
70
 
71
# parts of Mac OS X plugin bundle to build
71
# parts of Mac OS X plugin bundle to build
72
# Adobe's plugs use .plugin extension
72
# Adobe's plugs use .plugin extension
73
BUNDLE = $(EXEC).plugin
73
BUNDLE = $(EXEC).plugin
74
PLUGIN_OSX  = $(BUNDLE)/Contents/MacOS/$(EXEC)
74
PLUGIN_OSX  = $(BUNDLE)/Contents/MacOS/$(EXEC)
75
PLUGIN_RSRC = $(BUNDLE)/Contents/Resources/$(EXEC).rsrc
75
PLUGIN_RSRC = $(BUNDLE)/Contents/Resources/$(EXEC).rsrc
76
PLUGIN_PARTS = $(PLUGIN_OSX) $(PLUGIN_RSRC) $(BUNDLE)/Contents/Info.plist $(BUNDLE)/Contents/PkgInfo
76
PLUGIN_PARTS = $(PLUGIN_OSX) $(PLUGIN_RSRC) $(BUNDLE)/Contents/Info.plist $(BUNDLE)/Contents/PkgInfo
77
DISTDMG = $(EXEC)-$(VERSION).dmg
77
DISTDMG = $(EXEC)-$(VERSION).dmg
78
 
78
 
79
$(PLUGIN_OSX) : CPPFLAGS += -DMAC_ENV -DMACMACHO -Dmacintosh \
79
$(PLUGIN_OSX) : CPPFLAGS += -DMAC_ENV -DMACMACHO -Dmacintosh \
80
	-I/Developer/Headers/FlatCarbon \
80
	-I/Developer/Headers/FlatCarbon \
81
	-I../MoreFiles/CHeaders -I../MoreFiles/Sources
81
	-I../MoreFiles/CHeaders -I../MoreFiles/Sources
82
 
82
 
83
# Win32 plugin DLL to build
83
# Win32 plugin DLL to build
84
PLUGIN_W32 = $(EXEC).8bf
84
PLUGIN_W32 = $(EXEC).8bf
85
DISTZIP = $(EXEC)-$(VERSION)-win.zip
85
DISTZIP = $(EXEC)-$(VERSION)-win.zip
86
 
86
 
87
$(PLUGIN_W32) : CPPFLAGS += -DWIN_ENV
87
$(PLUGIN_W32) : CPPFLAGS += -DWIN_ENV
88
 
88
 
89
 
89
 
90
# ---------- targets ----------
90
# ---------- targets ----------
91
 
91
 
92
# build everything
92
# build everything
93
all : dll osx
93
all : dll osx
94
 
94
 
95
dll : $(PLUGIN_W32)
95
dll : $(PLUGIN_W32)
96
 
96
 
97
osx fat : $(BUNDLE) $(PLUGIN_PARTS)
97
osx fat : $(BUNDLE) $(PLUGIN_PARTS)
98
 
98
 
99
# See: https://web.archive.org/web/20101224050959/http://developer.apple.com/library/mac/#documentation/Porting/Conceptual/PortingUnix/intro/intro.html
99
# See: https://web.archive.org/web/20101224050959/http://developer.apple.com/library/mac/#documentation/Porting/Conceptual/PortingUnix/intro/intro.html
100
fat : CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
100
fat : CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
101
fat : LDFLAGS += -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
101
fat : LDFLAGS += -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
102
fat : REZFLAGS += -arch ppc -arch i386
102
fat : REZFLAGS += -arch ppc -arch i386
103
 
103
 
104
$(BUNDLE) :
104
$(BUNDLE) :
105
	mkdir -p $@
105
	mkdir -p $@
106
	/Developer/Tools/SetFile -a B $@
106
	/Developer/Tools/SetFile -a B $@
107
 
107
 
108
# insert correct executable name and version string in bundle's Info.plist
108
# insert correct executable name and version string in bundle's Info.plist
109
$(BUNDLE)/Contents/Info.plist : Info.plist $(BUNDLE) version.h
109
$(BUNDLE)/Contents/Info.plist : Info.plist $(BUNDLE) version.h
110
	mkdir -p $(dir $@)
110
	mkdir -p $(dir $@)
111
	V=`sed -n -E 's/^.*VERSION_STR[[:blank:]]+\"([^"]*)\"/\1/p' version.h` ;\
111
	V=`sed -n -E 's/^.*VERSION_STR[[:blank:]]+\"([^"]*)\"/\1/p' version.h` ;\
112
		sed -e s/VERSION_STR/$$V/ -e s/EXEC/$(EXEC)/ $< > $@
112
		sed -e s/VERSION_STR/$$V/ -e s/EXEC/$(EXEC)/ $< > $@
113
 
113
 
114
$(BUNDLE)/Contents/PkgInfo : $(BUNDLE)
114
$(BUNDLE)/Contents/PkgInfo : $(BUNDLE)
115
	mkdir -p $(dir $@)
115
	mkdir -p $(dir $@)
116
	echo -n 8BFM8BIM > $@
116
	echo -n 8BFM8BIM > $@
117
 
117
 
118
clean :
118
clean :
119
	rm -fr *.[ox] $(OBJ_OSX) $(OBJ_W32) $(PLUGIN_W32) $(BUNDLE) \
119
	rm -fr *.[ox] $(OBJ_OSX) $(OBJ_W32) $(PLUGIN_W32) $(BUNDLE) \
120
	       lex.yy.[ch] y.tab.[ch] temp
120
	       lex.yy.[ch] y.tab.[ch] temp
121
 
121
 
122
 
122
 
123
dmg : $(DISTDMG)
123
dmg : $(DISTDMG)
124
 
124
 
125
# create an Apple disk image (dmg) archive of the distribution kit
125
# create an Apple disk image (dmg) archive of the distribution kit
126
$(DISTDMG) : $(PLUGIN_PARTS) README.md LICENSE_GPLv3.html LICENSE_GPLv2.txt
126
$(DISTDMG) : $(PLUGIN_PARTS) README.md LICENSE_GPLv3.html LICENSE_GPLv2.txt
127
	@ DIR=`mktemp -d $(EXEC)-XXXX`; \
127
	@ DIR=`mktemp -d $(EXEC)-XXXX`; \
128
	cp -Rp README.md LICENSE_GPLv3.html LICENSE_GPLv2.txt $(BUNDLE) $$DIR; \
128
	cp -Rp README.md LICENSE_GPLv3.html LICENSE_GPLv2.txt $(BUNDLE) $$DIR; \
129
	mkdir -p $$DIR/examples; \
129
	mkdir -p $$DIR/examples; \
130
	cp examples/*.afs $$DIR/examples; \
130
	cp examples/*.afs $$DIR/examples; \
131
	/Developer/Tools/SetFile -t TEXT -c ttxt $$DIR/examples/*; \
131
	/Developer/Tools/SetFile -t TEXT -c ttxt $$DIR/examples/*; \
132
	hdiutil create -srcfolder $$DIR -ov -volname "$(EXEC) $(VERSION)" $@; \
132
	hdiutil create -srcfolder $$DIR -ov -volname "$(EXEC) $(VERSION)" $@; \
133
	rm -fr $$DIR
133
	rm -fr $$DIR
134
	@ ls -l $@
134
	@ ls -l $@
135
 
135
 
136
 
136
 
137
zip : $(DISTZIP)
137
zip : $(DISTZIP)
138
 
138
 
139
$(DISTZIP) : $(PLUGIN_W32) README.md LICENSE_GPLv3.html LICENSE_GPLv2.txt examples/*.afs
139
$(DISTZIP) : $(PLUGIN_W32) README.md LICENSE_GPLv3.html LICENSE_GPLv2.txt examples/*.afs
140
	T=`mktemp -d`; \
140
	T=`mktemp -d`; \
141
		D=$$T/FilterFoundry-$(VERSION); \
141
		D=$$T/FilterFoundry-$(VERSION); \
142
		mkdir -p $$D/examples; \
142
		mkdir -p $$D/examples; \
143
		cp $^ $$D; \
143
		cp $^ $$D; \
144
		mv $$D/*.afs $$D/examples; \
144
		mv $$D/*.afs $$D/examples; \
145
		cd $$T; \
145
		cd $$T; \
146
		zip -9 -r temp.zip FilterFoundry-$(VERSION); \
146
		zip -9 -r temp.zip FilterFoundry-$(VERSION); \
147
		mv temp.zip $(PWD)/$@; \
147
		mv temp.zip $(PWD)/$@; \
148
		rm -fr $$T
148
		rm -fr $$T
149
	ls -l $@
149
	ls -l $@
150
 
150
 
151
 
151
 
152
# ---------- compile rules ----------
152
# ---------- compile rules ----------
153
 
153
 
154
obj/%.o : %.c
154
obj/%.o : %.c
155
	$(CC) -o $@ -c $< $(CFLAGS) $(CPPFLAGS) -fpascal-strings
155
	$(CC) -o $@ -c $< $(CFLAGS) $(CPPFLAGS) -fpascal-strings
156
obj_w32/%.o : %.c
156
obj_w32/%.o : %.c
157
	$(MINGW_CC) -o $@ -c $< $(CFLAGS) $(CPPFLAGS)
157
	$(MINGW_CC) -o $@ -c $< $(CFLAGS) $(CPPFLAGS)
158
 
158
 
159
# note dependencies on version.h:
159
# note dependencies on version.h:
160
 
160
 
161
obj_w32/res.o : win_res.rc PiPL.rc PiPL_body.rc manifest.rc version_win.rc ui_win.rc caution.ico ui.h version.h
161
obj_w32/res.o : win_res.rc PiPL.rc PiPL_body.rc manifest.rc version_win.rc ui_win.rc caution.ico ui.h version.h
162
	$(WINDRES) -o $@ -i $< --language=0 $(CPPFLAGS)
162
	$(WINDRES) -o $@ -i $< --language=0 $(CPPFLAGS)
163
 
163
 
164
lex.yy.c : lexer.l y.tab.h
164
lex.yy.c : lexer.l y.tab.h
165
	$(LEX) --never-interactive $<
165
	$(LEX) --never-interactive $<
166
y.tab.c y.tab.h : parser.y
166
y.tab.c y.tab.h : parser.y
167
	$(YACC) $< $(YFLAGS)
167
	$(YACC) $< $(YFLAGS)
168
 
168
 
169
obj_w32/funcs.o : ff.h funcs.h symtab.h ui.h PARM.h y.tab.h
169
obj_w32/funcs.o : ff.h funcs.h symtab.h ui.h PARM.h y.tab.h
170
obj_w32/lex.yy.o : node.h symtab.h y.tab.h
170
obj_w32/lex.yy.o : node.h symtab.h y.tab.h
171
obj_w32/load_win.o : ff.h funcs.h symtab.h ui.h PARM.h
171
obj_w32/load_win.o : ff.h funcs.h symtab.h ui.h PARM.h
172
obj_w32/main.o : ff.h funcs.h symtab.h ui.h PARM.h node.h scripting.h y.tab.h 
172
obj_w32/main.o : ff.h funcs.h symtab.h ui.h PARM.h node.h scripting.h y.tab.h 
173
obj_w32/make.o : ff.h funcs.h symtab.h ui.h PARM.h
173
obj_w32/make.o : ff.h funcs.h symtab.h ui.h PARM.h
174
obj_w32/obfusc.o : ff.h funcs.h symtab.h ui.h PARM.h
174
obj_w32/obfusc.o : ff.h funcs.h symtab.h ui.h PARM.h
-
 
175
obj_w32/slider.c : ff.h
175
obj_w32/make_win.o : ff.h funcs.h symtab.h ui.h PARM.h
176
obj_w32/make_win.o : ff.h funcs.h symtab.h ui.h PARM.h
176
obj_w32/versioninfo_modify_win.o : ff.h funcs.h symtab.h ui.h PARM.h
177
obj_w32/versioninfo_modify_win.o : ff.h funcs.h symtab.h ui.h PARM.h
177
obj_w32/node.o : node.h y.tab.h funcs.h symtab.h ui.h PARM.h
178
obj_w32/node.o : node.h y.tab.h funcs.h symtab.h ui.h PARM.h
178
obj_w32/y.tab.o : node.h y.tab.h
179
obj_w32/y.tab.o : node.h y.tab.h
179
obj_w32/preview.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h
180
obj_w32/preview.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h
180
obj_w32/process.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h
181
obj_w32/process.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h
181
obj_w32/read.o : ff.h funcs.h symtab.h ui.h PARM.h
182
obj_w32/read.o : ff.h funcs.h symtab.h ui.h PARM.h
182
obj_w32/save.o : ff.h funcs.h symtab.h ui.h PARM.h
183
obj_w32/save.o : ff.h funcs.h symtab.h ui.h PARM.h
183
obj_w32/scripting.o : ff.h funcs.h symtab.h ui.h PARM.h scripting.h
184
obj_w32/scripting.o : ff.h funcs.h symtab.h ui.h PARM.h scripting.h
184
obj_w32/symtab.o : symtab.h
185
obj_w32/symtab.o : symtab.h
185
obj_w32/ui.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h
186
obj_w32/ui.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h
186
obj_w32/ui_build.o : ff.h funcs.h symtab.h ui.h PARM.h
187
obj_w32/ui_build.o : ff.h funcs.h symtab.h ui.h PARM.h
187
obj_w32/ui_build_win.o : ff.h funcs.h symtab.h ui.h PARM.h version.h
188
obj_w32/ui_build_win.o : ff.h funcs.h symtab.h ui.h PARM.h version.h
188
obj_w32/ui_win.o : ff.h funcs.h symtab.h ui.h PARM.h version.h
189
obj_w32/ui_win.o : ff.h funcs.h symtab.h ui.h PARM.h version.h
189
obj_w32/manifest.o : manifest.h
190
obj_w32/manifest.o : manifest.h
190
 
191
 
191
obj/funcs.o : ff.h funcs.h symtab.h ui.h PARM.h y.tab.h
192
obj/funcs.o : ff.h funcs.h symtab.h ui.h PARM.h y.tab.h
192
obj/lex.yy.o : node.h symtab.h y.tab.h
193
obj/lex.yy.o : node.h symtab.h y.tab.h
193
obj/load_mac.o : ff.h funcs.h symtab.h ui.h PARM.h
194
obj/load_mac.o : ff.h funcs.h symtab.h ui.h PARM.h
194
obj/main.o : ff.h funcs.h symtab.h ui.h PARM.h node.h scripting.h y.tab.h 
195
obj/main.o : ff.h funcs.h symtab.h ui.h PARM.h node.h scripting.h y.tab.h 
195
obj/make.o : ff.h funcs.h symtab.h ui.h PARM.h
196
obj/make.o : ff.h funcs.h symtab.h ui.h PARM.h
196
obj/obfusc.o : ff.h funcs.h symtab.h ui.h PARM.h
197
obj/obfusc.o : ff.h funcs.h symtab.h ui.h PARM.h
197
obj/make_mac.o : ff.h funcs.h symtab.h ui.h PARM.h
198
obj/make_mac.o : ff.h funcs.h symtab.h ui.h PARM.h
198
obj/node.o : node.h y.tab.h funcs.h symtab.h ui.h PARM.h
199
obj/node.o : node.h y.tab.h funcs.h symtab.h ui.h PARM.h
199
obj/y.tab.o : node.h symtab.h y.tab.h
200
obj/y.tab.o : node.h symtab.h y.tab.h
200
obj/preview.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h
201
obj/preview.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h
201
obj/process.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h
202
obj/process.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h
202
obj/read.o : ff.h funcs.h symtab.h ui.h PARM.h
203
obj/read.o : ff.h funcs.h symtab.h ui.h PARM.h
203
obj/save.o : ff.h funcs.h symtab.h ui.h PARM.h
204
obj/save.o : ff.h funcs.h symtab.h ui.h PARM.h
204
obj/scripting.o : ff.h funcs.h symtab.h ui.h PARM.h scripting.h
205
obj/scripting.o : ff.h funcs.h symtab.h ui.h PARM.h scripting.h
205
obj/symtab.o : symtab.h
206
obj/symtab.o : symtab.h
206
obj/ui.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h
207
obj/ui.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h
207
obj/ui_build.o : ff.h funcs.h symtab.h ui.h PARM.h
208
obj/ui_build.o : ff.h funcs.h symtab.h ui.h PARM.h
208
obj/ui_mac.o : ff.h funcs.h symtab.h ui.h PARM.h
209
obj/ui_mac.o : ff.h funcs.h symtab.h ui.h PARM.h
209
 
210
 
210
# compile Mac resources (into data fork of .rsrc file)
211
# compile Mac resources (into data fork of .rsrc file)
211
$(PLUGIN_RSRC) : $(BUNDLE) PiPL_macho.r ui_mac.r scripting.r ui.h version.h
212
$(PLUGIN_RSRC) : $(BUNDLE) PiPL_macho.r ui_mac.r scripting.r ui.h version.h
212
	mkdir -p $(dir $@)
213
	mkdir -p $(dir $@)
213
	/Developer/Tools/Rez -o $@ -useDF $(REZFLAGS) $(filter %.r,$^) \
214
	/Developer/Tools/Rez -o $@ -useDF $(REZFLAGS) $(filter %.r,$^) \
214
		-i /Developer/Headers/FlatCarbon \
215
		-i /Developer/Headers/FlatCarbon \
215
		-i $(PSAPI)/Resources \
216
		-i $(PSAPI)/Resources \
216
		-i $(PSAPI)/Photoshop
217
		-i $(PSAPI)/Photoshop
217
	ls -l $@
218
	ls -l $@
218
 
219
 
219
 
220
 
220
# ---------- link rules ----------
221
# ---------- link rules ----------
221
 
222
 
222
# link OS X Mach-O executable
223
# link OS X Mach-O executable
223
$(PLUGIN_OSX) : $(BUNDLE) exports.exp $(OBJ_OSX)
224
$(PLUGIN_OSX) : $(BUNDLE) exports.exp $(OBJ_OSX)
224
	mkdir -p $(dir $@)
225
	mkdir -p $(dir $@)
225
	$(CC) -bundle -o $@ $(OBJ_OSX) \
226
	$(CC) -bundle -o $@ $(OBJ_OSX) \
226
		$(LDFLAGS) -exported_symbols_list exports.exp \
227
		$(LDFLAGS) -exported_symbols_list exports.exp \
227
		-framework Carbon -framework System
228
		-framework Carbon -framework System
228
	ls -l $@
229
	ls -l $@
229
	file $@
230
	file $@
230
 
231
 
231
# link Win32 DLL
232
# link Win32 DLL
232
$(PLUGIN_W32) : exports.def $(OBJ_W32)
233
$(PLUGIN_W32) : exports.def $(OBJ_W32)
233
	$(DLLWRAP) -o $@ -def $^ -mwindows -s
234
	$(DLLWRAP) -o $@ -def $^ -mwindows -s
234
	ls -l $@
235
	ls -l $@
235
 
236
 
236
 
237
 
237
# --------------------
238
# --------------------