# This file is part of "life", a filter plugin for Adobe Photoshop # Copyright (C) 2003-6 Toby Thain, toby@telegraphics.com.au # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## MPW Makefile EXEC = life # Macintosh type/creator code for plugin file PLUGINTYPE = 8BFM PLUGINCREATOR = 8BIM # variables controlling fat build PLUGIN68K = 68k.rsrc # uncomment this VALUE (after =) to build 68K (fat) BUILD68K = -d BUILD68K # uncomment this VALUE (after =) to build 68K (fat) # these two variables reflect my personal directory layout # and are not used by distribution COMMONA = ::common:adobeplugin: COMMONT = ::common:tt: # where the Photoshop API header files are located PSAPI = ::PhotoshopAPI: PSHEADERS = {PSAPI}Photoshop:,{PSAPI}Pica_sp:,{PSAPI}Resources: REZHEADERS = -i {PSAPI}Photoshop: -i {PSAPI}Resources: # list object files in project # each kind of object file (Classic, Carbon, 68K) has its own list, # of the same series of input files, but with the respective extension (.cl.x, .ca.x, .o) to differentiate # "implicit" rules are used to build these object files from corresponding .c source; see below OBJ_CLASSIC = main.cl.x process.cl.x ui_mac.cl.x {COMMONT}ui_compat_mac.cl.x OBJ_CARBON = main.ca.x process.ca.x ui_mac.ca.x {COMMONT}ui_compat_mac.ca.x OBJ_68K = main.68k.o process.68k.o ui_mac.68k.o {COMMONT}ui_compat_mac.68k.o REZFILES = ui_mac.r # look for include files in these directories ACCESSPATHS = -i :,{PSHEADERS},"{COMMONT}","{COMMONA}" # executable files to build (the Classic executable will be a fat binary containing both PPC and 68K code) EXEC_CLASSIC = :{EXEC}_mpw:Contents:MacOSClassic:{EXEC} EXEC_CARBON = :{EXEC}_mpw:Contents:MacOS:{EXEC} # ensure both Classic and Carbon get built {EXEC} ÄÄ {EXEC_CARBON} {EXEC_CLASSIC} echo -n "{PLUGINTYPE}{PLUGINCREATOR}" > :{EXEC}_mpw:Contents:PkgInfo setfile -a B {EXEC}_mpw files -x brtc {EXEC_CARBON} {EXEC_CLASSIC} # libraries linked with project LIBS_CLASSIC = ¶ "{SharedLibraries}InterfaceLib" ¶ "{SharedLibraries}StdCLib" ¶ "{SharedLibraries}MathLib" ¶ #"{SharedLibraries}NavigationLib" ¶ #"{SharedLibraries}AppearanceLib" ¶ "{PPCLibraries}StdCRuntime.o" ¶ "{PPCLibraries}PPCCRuntime.o" ¶ #"{PPCLibraries}PPCToolLibs.o" ¶ #"{PPCLibraries}"CarbonAccessors.o LIBS_CARBON = ¶ "{SharedLibraries}CarbonLib" ¶ "{SharedLibraries}StdCLib" ¶ "{PPCLibraries}PPCCRuntime.o" LIBS_68K = ¶ #"{Libraries}MathLib.o" ¶ #"{CLibraries}Complex.o" ¶ #"{CLibraries}StdCLib.o" ¶ "{Libraries}MacRuntime.o" ¶ #"{Libraries}IntEnv.o" ¶ #"{Libraries}ToolLibs.o" ¶ #"{Libraries}Interface.o" ### little below should need to change ### CARBONOPTS = -d TARGET_CARBON COPT = -d MacintoshOS -d MAC_ENV {ACCESSPATHS} -proto strict -w 2,35 #-typecheck relaxed -w 2,17,29,35 PPCLINKOPTS = -t {PLUGINTYPE} -c {PLUGINCREATOR} -m main REZOPTS = -a -s : -d SystemSevenOrLater=1 # implicit build rules for each variety of object file .ca.x Ä .c # Carbon PowerPC object mrc {depdir}{default}.c -o {targ} -d MacintoshPPC {copt} {CARBONOPTS} .cl.x Ä .c # Classic PowerPC object mrc {depdir}{default}.c -o {targ} -d MacintoshPPC {copt} .68k.o Ä .c # 68K object sc {depdir}{default}.c -o {targ} -b -opt all -d Macintosh68K {copt} {EXEC_CLASSIC} ÄÄ {OBJ_CLASSIC} PPCLink -o {Targ} {PPCLINKOPTS} {OBJ_CLASSIC} {LIBS_CLASSIC} {EXEC_CARBON} ÄÄ {OBJ_CARBON} PPCLink -o {Targ} {PPCLINKOPTS} -d {OBJ_CARBON} {LIBS_CARBON} # put 68K code resource in intermediate file 68k.rsrc ÄÄ {OBJ_68K} Link -o {TARG} -t 'rsrc' -c 'RSED' -sg {EXEC} -rt {PLUGINTYPE}=16000 -m MAIN {OBJ_68K} {LIBS_68K} rezdet -l {targ} {EXEC_CLASSIC} ÄÄ classic.r pipl_common.r version.h {PLUGIN68K} Rez -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} classic.r {BUILD68K} {EXEC_CARBON} ÄÄ carbon.r pipl_common.r version.h Rez -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} carbon.r {EXEC_CLASSIC} ÄÄ {REZFILES} version.h Rez -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} {REZFILES} {EXEC_CARBON} ÄÄ {REZFILES} version.h Rez -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} {REZFILES}