Rev 192 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 192 | Rev 536 | ||
---|---|---|---|
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.net |
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 | ## MPW Makefile |
19 | ## MPW Makefile |
20 | 20 | ||
21 | EXEC = FilterFoundry |
21 | EXEC = FilterFoundry |
22 | 22 | ||
23 | EXEC_UNI = :dist:{EXEC} |
23 | EXEC_UNI = :dist:{EXEC} |
24 | 24 | ||
25 | # Macintosh type/creator code for plugin file |
25 | # Macintosh type/creator code for plugin file |
26 | PLUGINTYPE = 8BFM |
26 | PLUGINTYPE = 8BFM |
27 | PLUGINCREATOR = 8BIM |
27 | PLUGINCREATOR = 8BIM |
28 | FILETYPE = -t ¶'{PLUGINTYPE}¶' -c ¶'{PLUGINCREATOR}¶' |
28 | FILETYPE = -t ¶'{PLUGINTYPE}¶' -c ¶'{PLUGINCREATOR}¶' |
29 | 29 | ||
30 | # variables controlling fat build |
30 | # variables controlling fat build |
31 | PLUGIN68K = #68k.rsrc # uncomment this VALUE (after =) to build 68K (fat) |
31 | PLUGIN68K = #68k.rsrc # uncomment this VALUE (after =) to build 68K (fat) |
32 | BUILD68K = #-d BUILD68K # uncomment this VALUE (after =) to build 68K (fat) |
32 | BUILD68K = #-d BUILD68K # uncomment this VALUE (after =) to build 68K (fat) |
33 | 33 | ||
34 | # these two variables reflect my personal directory layout |
34 | # these two variables reflect my personal directory layout |
35 | # and are not used by distribution |
35 | # and are not used by distribution |
36 | COMMONA = ::common:adobeplugin: |
36 | COMMONA = ::common:adobeplugin: |
37 | COMMONT = ::common:tt: |
37 | COMMONT = ::common:tt: |
38 | 38 | ||
39 | # where the Photoshop API header files are located |
39 | # where the Photoshop API header files are located |
40 | PSAPI = ::PhotoshopAPI: |
40 | PSAPI = ::PhotoshopAPI: |
41 | PSHEADERS = {PSAPI}Photoshop:,{PSAPI}Pica_sp:,{PSAPI}Resources: |
41 | PSHEADERS = {PSAPI}Photoshop:,{PSAPI}Pica_sp:,{PSAPI}Resources: |
42 | REZHEADERS = -i {PSAPI}Photoshop: -i {PSAPI}Resources: |
42 | REZHEADERS = -i {PSAPI}Photoshop: -i {PSAPI}Resources: |
43 | 43 | ||
44 | # list object files in project |
44 | # list object files in project |
45 | # each kind of object file (Classic, Carbon, 68K) has its own list, |
45 | # each kind of object file (Classic, Carbon, 68K) has its own list, |
46 | # of the same series of input files, but with the respective extension (.cl.x, .ca.x, .o) to differentiate |
46 | # of the same series of input files, but with the respective extension (.cl.x, .ca.x, .o) to differentiate |
47 | # "implicit" rules are used to build these object files from corresponding .c source; see below |
47 | # "implicit" rules are used to build these object files from corresponding .c source; see below |
48 | 48 | ||
49 | OBJ_CLASSIC = main.cl.x ui_mac.cl.x ui.cl.x ui_build.cl.x ¶ |
49 | OBJ_CLASSIC = main.cl.x ui_mac.cl.x ui.cl.x ui_build.cl.x ¶ |
50 | preview.cl.x read.cl.x save.cl.x preview_mac.cl.x make_mac.cl.x load_mac.cl.x make.cl.x scripting.cl.x ¶ |
50 | preview.cl.x read.cl.x save.cl.x preview_mac.cl.x make_mac.cl.x load_mac.cl.x make.cl.x scripting.cl.x ¶ |
51 | y.tab.cl.x lex.yy.cl.x node.cl.x symtab.cl.x funcs.cl.x process.cl.x ¶ |
51 | y.tab.cl.x lex.yy.cl.x node.cl.x symtab.cl.x funcs.cl.x process.cl.x ¶ |
52 | {COMMONT}dbg_mac.cl.x {COMMONT}str.cl.x {COMMONT}ui_compat_mac.cl.x ¶ |
52 | {COMMONT}dbg_mac.cl.x {COMMONT}str.cl.x {COMMONT}ui_compat_mac.cl.x ¶ |
53 | {COMMONT}choosefile_nav.cl.x ¶ |
53 | {COMMONT}choosefile_nav.cl.x ¶ |
54 | ::MoreFiles:Sources:MoreFilesExtras.cl.x ¶ |
54 | ::MoreFiles:Sources:MoreFilesExtras.cl.x ¶ |
55 | ::MoreFiles:Sources:MoreFiles.cl.x ¶ |
55 | ::MoreFiles:Sources:MoreFiles.cl.x ¶ |
56 | ::MoreFiles:Sources:MoreDesktopMgr.cl.x ¶ |
56 | ::MoreFiles:Sources:MoreDesktopMgr.cl.x ¶ |
57 | ::MoreFiles:Sources:FileCopy.cl.x |
57 | ::MoreFiles:Sources:FileCopy.cl.x |
58 | 58 | ||
59 | OBJ_CARBON = main.ca.x ui_mac.ca.x ui.ca.x ui_build.ca.x ¶ |
59 | OBJ_CARBON = main.ca.x ui_mac.ca.x ui.ca.x ui_build.ca.x ¶ |
60 | preview.ca.x read.ca.x save.ca.x preview_mac.ca.x make_mac.ca.x load_mac.ca.x make.ca.x scripting.ca.x ¶ |
60 | preview.ca.x read.ca.x save.ca.x preview_mac.ca.x make_mac.ca.x load_mac.ca.x make.ca.x scripting.ca.x ¶ |
61 | y.tab.ca.x lex.yy.ca.x node.ca.x symtab.ca.x funcs.ca.x process.ca.x ¶ |
61 | y.tab.ca.x lex.yy.ca.x node.ca.x symtab.ca.x funcs.ca.x process.ca.x ¶ |
62 | {COMMONT}dbg_mac.ca.x {COMMONT}str.ca.x {COMMONT}ui_compat_mac.ca.x ¶ |
62 | {COMMONT}dbg_mac.ca.x {COMMONT}str.ca.x {COMMONT}ui_compat_mac.ca.x ¶ |
63 | {COMMONT}choosefile_nav.ca.x ¶ |
63 | {COMMONT}choosefile_nav.ca.x ¶ |
64 | ::MoreFiles:Sources:MoreFilesExtras.ca.x ¶ |
64 | ::MoreFiles:Sources:MoreFilesExtras.ca.x ¶ |
65 | ::MoreFiles:Sources:MoreFiles.ca.x ¶ |
65 | ::MoreFiles:Sources:MoreFiles.ca.x ¶ |
66 | ::MoreFiles:Sources:MoreDesktopMgr.ca.x ¶ |
66 | ::MoreFiles:Sources:MoreDesktopMgr.ca.x ¶ |
67 | ::MoreFiles:Sources:FileCopy.ca.x |
67 | ::MoreFiles:Sources:FileCopy.ca.x |
68 | 68 | ||
69 | OBJ_68K = main.68k.o #{COMMONA}dbg_mac.o {COMMONT}str.o {COMMONT}sprintf_tiny.o |
69 | OBJ_68K = main.68k.o #{COMMONA}dbg_mac.o {COMMONT}str.o {COMMONT}sprintf_tiny.o |
70 | REZFILES = ui_mac.r scripting.r |
70 | REZFILES = ui_mac.r scripting.r |
71 | 71 | ||
72 | # this is a hack to work around a missing UNIX include |
72 | # this is a hack to work around a missing UNIX include |
73 | 'sys/cdefs.h' Ä FilterFoundry.make |
73 | 'sys/cdefs.h' Ä FilterFoundry.make |
74 | echo '#define __IDSTRING(a,b)' > 'sys/cdefs.h' |
74 | echo '#define __IDSTRING(a,b)' > 'sys/cdefs.h' |
75 | echo '#define __P(protos) protos /* full-blown ANSI C */' >> 'sys/cdefs.h' |
75 | echo '#define __P(protos) protos /* full-blown ANSI C */' >> 'sys/cdefs.h' |
76 | 76 | ||
77 | y.tab.c Ä parser.y |
77 | y.tab.c Ä parser.y |
78 | echo "y.tab.c is out of date; in UNIX, 'make y.tab.c' before retrying MPW build" |
78 | echo "y.tab.c is out of date; in UNIX, 'make y.tab.c' before retrying MPW build" |
79 | lex.yy.c Ä lexer.l |
79 | lex.yy.c Ä lexer.l |
80 | echo "lex.yy.c is out of date; in UNIX, 'make lex.yy.c' before retrying MPW build" |
80 | echo "lex.yy.c is out of date; in UNIX, 'make lex.yy.c' before retrying MPW build" |
81 | 81 | ||
82 | y.tab.cl.x ÄÄ 'sys/cdefs.h' |
82 | y.tab.cl.x ÄÄ 'sys/cdefs.h' |
83 | y.tab.ca.x ÄÄ 'sys/cdefs.h' |
83 | y.tab.ca.x ÄÄ 'sys/cdefs.h' |
84 | 84 | ||
85 | funcs.cl.x ÄÄ y.tab.h |
85 | funcs.cl.x ÄÄ y.tab.h |
86 | funcs.ca.x ÄÄ y.tab.h |
86 | funcs.ca.x ÄÄ y.tab.h |
87 | lex.yy.cl.x ÄÄ y.tab.h |
87 | lex.yy.cl.x ÄÄ y.tab.h |
88 | lex.yy.ca.x ÄÄ y.tab.h |
88 | lex.yy.ca.x ÄÄ y.tab.h |
89 | node.cl.x ÄÄ y.tab.h |
89 | node.cl.x ÄÄ y.tab.h |
90 | node.ca.x ÄÄ y.tab.h |
90 | node.ca.x ÄÄ y.tab.h |
91 | preview.cl.x ÄÄ y.tab.h |
91 | preview.cl.x ÄÄ y.tab.h |
92 | preview.ca.x ÄÄ y.tab.h |
92 | preview.ca.x ÄÄ y.tab.h |
93 | ui.cl.x ÄÄ y.tab.h |
93 | ui.cl.x ÄÄ y.tab.h |
94 | ui.ca.x ÄÄ y.tab.h |
94 | ui.ca.x ÄÄ y.tab.h |
95 | 95 | ||
96 | # look for include files in these directories |
96 | # look for include files in these directories |
97 | ACCESSPATHS = -i :,{PSHEADERS},"{COMMONT}","{COMMONA}",::MoreFiles:CHeaders:,::MoreFiles:Sources: |
97 | ACCESSPATHS = -i :,{PSHEADERS},"{COMMONT}","{COMMONA}",::MoreFiles:CHeaders:,::MoreFiles:Sources: |
98 | 98 | ||
99 | # executable files to build (the Classic executable will be a fat binary containing both PPC and 68K code) |
99 | # executable files to build (the Classic executable will be a fat binary containing both PPC and 68K code) |
100 | EXEC_CLASSIC = :debug:{EXEC}.classic |
100 | EXEC_CLASSIC = :debug:{EXEC}.classic |
101 | EXEC_CARBON = :debug:{EXEC}.carbon |
101 | EXEC_CARBON = :debug:{EXEC}.carbon |
102 | 102 | ||
103 | # build "universal" plugin with both Classic and Carbon binaries in one file |
103 | # build "universal" plugin with both Classic and Carbon binaries in one file |
104 | {EXEC_UNI} ÄÄ {EXEC_CARBON} {EXEC_CLASSIC} PiPL_universal.r PiPL_common.r version.h |
104 | {EXEC_UNI} ÄÄ {EXEC_CARBON} {EXEC_CLASSIC} PiPL_universal.r PiPL_common.r version.h |
105 | catenate {EXEC_CARBON} {EXEC_CLASSIC} > temp && duplicate -y -d temp {EXEC_UNI} # copy just data fork, without junk resources |
105 | catenate {EXEC_CARBON} {EXEC_CLASSIC} > temp && duplicate -y -d temp {EXEC_UNI} # copy just data fork, without junk resources |
106 | ls -x b {EXEC_CARBON} {EXEC_CLASSIC} > temp |
106 | ls -x b {EXEC_CARBON} {EXEC_CLASSIC} > temp |
107 | target temp |
107 | target temp |
108 | find ¥ |
108 | find ¥ |
109 | find /[0-9]+/ && set CARBON_LENGTH `catenate "{target}".¤` |
109 | find /[0-9]+/ && set CARBON_LENGTH `catenate "{target}".¤` |
110 | find /[0-9]+/ && set CLASSIC_LENGTH `catenate "{target}".¤` |
110 | find /[0-9]+/ && set CLASSIC_LENGTH `catenate "{target}".¤` |
111 | close |
111 | close |
112 | Rez PiPL_universal.r -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} ¶ |
112 | Rez PiPL_universal.r -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} ¶ |
113 | -d CARBON_LENGTH={CARBON_LENGTH} -d CLASSIC_LENGTH={CLASSIC_LENGTH} |
113 | -d CARBON_LENGTH={CARBON_LENGTH} -d CLASSIC_LENGTH={CLASSIC_LENGTH} |
114 | 114 | ||
115 | {EXEC} Ä {EXEC_UNI} |
115 | {EXEC} Ä {EXEC_UNI} |
116 | files -x brtc {EXEC_UNI} |
116 | files -x brtc {EXEC_UNI} |
117 | 117 | ||
118 | # libraries linked with project |
118 | # libraries linked with project |
119 | LIBS_CLASSIC = ¶ |
119 | LIBS_CLASSIC = ¶ |
120 | "{SharedLibraries}InterfaceLib" ¶ |
120 | "{SharedLibraries}InterfaceLib" ¶ |
121 | "{SharedLibraries}StdCLib" ¶ |
121 | "{SharedLibraries}StdCLib" ¶ |
122 | "{SharedLibraries}MathLib" ¶ |
122 | "{SharedLibraries}MathLib" ¶ |
123 | "{SharedLibraries}NavigationLib" ¶ |
123 | "{SharedLibraries}NavigationLib" ¶ |
124 | "{SharedLibraries}AppearanceLib" ¶ |
124 | "{SharedLibraries}AppearanceLib" ¶ |
125 | "{SharedLibraries}WindowsLib" ¶ |
125 | "{SharedLibraries}WindowsLib" ¶ |
126 | "{SharedLibraries}ControlsLib" ¶ |
126 | "{SharedLibraries}ControlsLib" ¶ |
127 | "{PPCLibraries}StdCRuntime.o" ¶ |
127 | "{PPCLibraries}StdCRuntime.o" ¶ |
128 | "{PPCLibraries}PPCCRuntime.o" ¶ |
128 | "{PPCLibraries}PPCCRuntime.o" ¶ |
129 | #"{PPCLibraries}"CarbonAccessors.o |
129 | #"{PPCLibraries}"CarbonAccessors.o |
130 | #"{PPCLibraries}PPCToolLibs.o" ¶ |
130 | #"{PPCLibraries}PPCToolLibs.o" ¶ |
131 | 131 | ||
132 | LIBS_CARBON = ¶ |
132 | LIBS_CARBON = ¶ |
133 | "{SharedLibraries}CarbonLib" ¶ |
133 | "{SharedLibraries}CarbonLib" ¶ |
134 | "{SharedLibraries}StdCLib" ¶ |
134 | "{SharedLibraries}StdCLib" ¶ |
135 | "{PPCLibraries}PPCCRuntime.o" |
135 | "{PPCLibraries}PPCCRuntime.o" |
136 | 136 | ||
137 | LIBS_68K = ¶ |
137 | LIBS_68K = ¶ |
138 | "{Libraries}MathLib.o" ¶ |
138 | "{Libraries}MathLib.o" ¶ |
139 | #"{CLibraries}Complex.o" ¶ |
139 | #"{CLibraries}Complex.o" ¶ |
140 | "{CLibraries}StdCLib.o" ¶ |
140 | "{CLibraries}StdCLib.o" ¶ |
141 | "{Libraries}MacRuntime.o" ¶ |
141 | "{Libraries}MacRuntime.o" ¶ |
142 | #"{Libraries}IntEnv.o" ¶ |
142 | #"{Libraries}IntEnv.o" ¶ |
143 | #"{Libraries}ToolLibs.o" ¶ |
143 | #"{Libraries}ToolLibs.o" ¶ |
144 | "{Libraries}Interface.o" |
144 | "{Libraries}Interface.o" |
145 | 145 | ||
146 | ### little below should need to change ### |
146 | ### little below should need to change ### |
147 | 147 | ||
148 | COPT = -tb on -opt speed -d MAC_ENV {ACCESSPATHS} -proto strict -w 2,35 ¶ |
148 | COPT = -tb on -opt speed -d MAC_ENV {ACCESSPATHS} -proto strict -w 2,35 ¶ |
149 | -d YY_USE_PROTOS #-typecheck relaxed -w 2,17,29,35 |
149 | -d YY_USE_PROTOS #-typecheck relaxed -w 2,17,29,35 |
150 | 150 | ||
151 | PPCLINKOPTS = -t {PLUGINTYPE} -c {PLUGINCREATOR} -m main |
151 | PPCLINKOPTS = -t {PLUGINTYPE} -c {PLUGINCREATOR} -m main |
152 | REZOPTS = -a -s : -d SystemSevenOrLater=1 |
152 | REZOPTS = -a -s : -d SystemSevenOrLater=1 |
153 | 153 | ||
154 | # implicit build rules for each variety of object file |
154 | # implicit build rules for each variety of object file |
155 | .ca.x Ä .c # Carbon PowerPC object |
155 | .ca.x Ä .c # Carbon PowerPC object |
156 | mrc {depdir}{default}.c -o {targ} {copt} -d TARGET_CARBON |
156 | mrc {depdir}{default}.c -o {targ} {copt} -d TARGET_CARBON |
157 | .cl.x Ä .c # Classic PowerPC object |
157 | .cl.x Ä .c # Classic PowerPC object |
158 | mrc {depdir}{default}.c -o {targ} {copt} |
158 | mrc {depdir}{default}.c -o {targ} {copt} |
159 | .68k.o Ä .c # 68K object |
159 | .68k.o Ä .c # 68K object |
160 | sc {depdir}{default}.c -o {targ} -b {copt} |
160 | sc {depdir}{default}.c -o {targ} -b {copt} |
161 | 161 | ||
162 | {EXEC_CLASSIC} ÄÄ {OBJ_CLASSIC} |
162 | {EXEC_CLASSIC} ÄÄ {OBJ_CLASSIC} |
163 | PPCLink -o {Targ} {PPCLINKOPTS} {OBJ_CLASSIC} {LIBS_CLASSIC} |
163 | PPCLink -o {Targ} {PPCLINKOPTS} {OBJ_CLASSIC} {LIBS_CLASSIC} |
164 | {EXEC_CARBON} ÄÄ {OBJ_CARBON} |
164 | {EXEC_CARBON} ÄÄ {OBJ_CARBON} |
165 | PPCLink -o {Targ} {PPCLINKOPTS} -d {OBJ_CARBON} {LIBS_CARBON} |
165 | PPCLink -o {Targ} {PPCLINKOPTS} -d {OBJ_CARBON} {LIBS_CARBON} |
166 | 166 | ||
167 | # put 68K code resource in intermediate file |
167 | # put 68K code resource in intermediate file |
168 | 68k.rsrc ÄÄ {OBJ_68K} |
168 | 68k.rsrc ÄÄ {OBJ_68K} |
169 | Link -o {TARG} -t 'rsrc' -c 'RSED' -sg {EXEC} -rt {PLUGINTYPE}=16000 -m MAIN {OBJ_68K} {LIBS_68K} |
169 | Link -o {TARG} -t 'rsrc' -c 'RSED' -sg {EXEC} -rt {PLUGINTYPE}=16000 -m MAIN {OBJ_68K} {LIBS_68K} |
170 | rezdet -l {targ} |
170 | rezdet -l {targ} |
171 | 171 | ||
172 | {EXEC_CLASSIC} ÄÄ PiPL_classic.r PiPL_common.r version.h {PLUGIN68K} |
172 | {EXEC_CLASSIC} ÄÄ PiPL_classic.r PiPL_common.r version.h {PLUGIN68K} |
173 | Rez PiPL_classic.r -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} {BUILD68K} |
173 | Rez PiPL_classic.r -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} {BUILD68K} |
174 | {EXEC_CARBON} ÄÄ PiPL_carbon.r PiPL_common.r version.h |
174 | {EXEC_CARBON} ÄÄ PiPL_carbon.r PiPL_common.r version.h |
175 | Rez PiPL_carbon.r -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} |
175 | Rez PiPL_carbon.r -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} |
176 | 176 | ||
177 | {EXEC_CLASSIC} ÄÄ {REZFILES} ui.h version.h |
177 | {EXEC_CLASSIC} ÄÄ {REZFILES} ui.h version.h |
178 | Rez {REZFILES} -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} |
178 | Rez {REZFILES} -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} |
179 | {EXEC_CARBON} ÄÄ {REZFILES} ui.h version.h |
179 | {EXEC_CARBON} ÄÄ {REZFILES} ui.h version.h |
180 | Rez {REZFILES} -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} |
180 | Rez {REZFILES} -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} |
181 | {EXEC_UNI} ÄÄ {REZFILES} ui.h version.h |
181 | {EXEC_UNI} ÄÄ {REZFILES} ui.h version.h |
182 | Rez {REZFILES} -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} |
182 | Rez {REZFILES} -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} |
183 | 183 |