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