# This file is part of "Count Colours", a filter plugin for Adobe Photoshop # Copyright (C) 2003-7 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 = CountColours # executable files to build EXEC_CARBON = :debug:{EXEC}.carbon EXEC_CLASSIC = :debug:{EXEC}.classic EXEC_UNI = :dist:{EXEC} # Macintosh type/creator code for plugin file PLUGINTYPE = 8BFM PLUGINCREATOR = 8BIM FILETYPE = -t ¶'{PLUGINTYPE}¶' -c ¶'{PLUGINCREATOR}¶' # 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_CARBON = main.ca.x ui_mac.ca.x {COMMONT}dbg_mac.ca.x {COMMONT}ui_compat_mac.ca.x {COMMONT}str.ca.x OBJ_CLASSIC = main.cl.x ui_mac.cl.x {COMMONT}dbg_mac.cl.x {COMMONT}ui_compat_mac.cl.x {COMMONT}str.cl.x REZFILES = ui_mac.r # look for include files in these directories ACCESSPATHS = -i :,{PSHEADERS},"{COMMONT}","{COMMONA}" {EXEC} ÄÄ {EXEC_UNI} #{EXEC_68K} files -x brtc {EXEC_UNI} # 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" ### little below should need to change ### COPT = -d MAC_ENV {ACCESSPATHS} -proto strict -opt speed -tb on -w 2,35 PPCLINKOPTS = -t {PLUGINTYPE} -c {PLUGINCREATOR} -m PluginMain 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} {copt} -d TARGET_CARBON .cl.x Ä .c # Classic PowerPC object mrc {depdir}{default}.c -o {targ} {copt} {EXEC_CARBON} ÄÄ {OBJ_CARBON} PPCLink -o {Targ} {PPCLINKOPTS} -d {OBJ_CARBON} {LIBS_CARBON} {EXEC_CLASSIC} ÄÄ {OBJ_CLASSIC} PPCLink -o {Targ} {PPCLINKOPTS} {OBJ_CLASSIC} {LIBS_CLASSIC} {EXEC_UNI} ÄÄ {EXEC_CARBON} {EXEC_CLASSIC} PiPL_universal.r PiPL_common.r version.h catenate {EXEC_CARBON} {EXEC_CLASSIC} > temp && duplicate -y -d temp {EXEC_UNI} # copy just data fork, without junk resources files -x b {EXEC_CARBON} {EXEC_CLASSIC} > temp target temp find ¥ find /[0-9]+/ && set CARBON_LENGTH `catenate "{target}.¤"` find /[0-9]+/ && set CLASSIC_LENGTH `catenate "{target}.¤"` close Rez PiPL_universal.r -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} ¶ -d CARBON_LENGTH={CARBON_LENGTH} -d CLASSIC_LENGTH={CLASSIC_LENGTH} {EXEC_CARBON} ÄÄ PiPL_carbon.r version.h PiPL_common.r Rez -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} PiPL_carbon.r {EXEC_CLASSIC} ÄÄ PiPL_classic.r version.h PiPL_common.r Rez -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} PiPL_classic.r {EXEC_UNI} ÄÄ {REZFILES} Rez -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} {REZFILES} {EXEC_CARBON} ÄÄ {REZFILES} Rez -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} {REZFILES} {EXEC_CLASSIC} ÄÄ {REZFILES} Rez -o {Targ} {FILETYPE} {REZHEADERS} {REZOPTS} {REZFILES}