# This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop # Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.net # Copyright (C) 2018-2022 Daniel Marschall, ViaThinkSoft # 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 # ---------- variables & flags ---------- EXEC = FilterFoundry # gcc should be used to ensure that the project is 100% C and not C++ # g++ can be used for improving code quality, because the compiler warnings are very good CC = g++.exe #CC = gcc.exe DLLWRAP = dllwrap.exe WINDRES = windres.exe # use GNU flex and bison # these lines can be commented to use system lex and yacc # although this may result in a larger overall executable LEX = win_flex_bison\win_flex.exe --never-interactive YACC = win_flex_bison\win_bison.exe -y YFLAGS = -d PSAPI = photoshop_sdk\pluginsdk\photoshopapi CFLAGS += -O2 -W -Wall -Wno-main -Wno-unused-parameter -Wno-multichar -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-function CPPFLAGS += -DYY_SKIP_YYWRAP -DWIN_ENV \ -DUNICODE -D_UNICODE \ -I$(PSAPI)\pica_sp -I$(PSAPI)\photoshop -I$(PSAPI)\general \ -Itelegraphics_common\adobeplugin -Itelegraphics_common\tt # ---------- source & object files ---------- # where to find .c source files vpath %.c telegraphics_common\tt telegraphics_common\adobeplugin # list of source files SRC_COMMON = main.c funcs.c process.c node.c symtab.c \ ui.c ui_build.c preview.c read.c save.c make.c obfusc.c ff_misc.c language.c \ scripting.c y.tab.c lex.yy.c str.c SRC_W32 = dbg_win.c manifest.c ui_win.c make_win.c versioninfo_modify_win.c load_win.c ui_compat_win.c \ choosefile_win.c ui_build_win.c compat_string.c compat_win.c compat_win_resource.c \ file_compat_win.c dllmain.c slider_win.c # derive lists of object files, separate for each platform OBJ_W32 := $(patsubst %.c, obj_w32\\%.o, $(SRC_COMMON) $(SRC_W32)) obj_w32\\res.o PLUGIN_W32 = $(EXEC).8bf # ---------- targets ---------- all : dll dll : $(PLUGIN_W32) clean : del obj_w32\\*.o $(OBJ_W32) $(PLUGIN_W32) lex.yy.c lex.yy.h y.tab.c y.tab.h # ---------- compile rules ---------- obj_w32\\%.o : %.c $(CC) -o $@ -c $< $(CFLAGS) $(CPPFLAGS) # note dependencies on version.h: 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 $(WINDRES) -o $@ -i $< --language=0 $(CPPFLAGS) lex.yy.c : lexer.l y.tab.h $(LEX) $< y.tab.c y.tab.h : parser.y $(YACC) $< $(YFLAGS) obj_w32\funcs.o : ff.h funcs.h symtab.h ui.h PARM.h y.tab.h obj_w32\lex.yy.o : node.h symtab.h y.tab.h obj_w32\load_win.o : ff.h funcs.h symtab.h ui.h PARM.h obj_w32\main.o : ff.h funcs.h symtab.h ui.h PARM.h node.h scripting.h y.tab.h obj_w32\make.o : ff.h funcs.h symtab.h ui.h PARM.h obj_w32\obfusc.o : ff.h funcs.h symtab.h ui.h PARM.h obj_w32\slider_win.c : ff.h obj_w32\make_win.o : ff.h funcs.h symtab.h ui.h PARM.h obj_w32\versioninfo_modify_win.o : ff.h funcs.h symtab.h ui.h PARM.h obj_w32\node.o : node.h y.tab.h funcs.h symtab.h ui.h PARM.h obj_w32\y.tab.o : node.h y.tab.h obj_w32\preview.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h obj_w32\process.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h obj_w32\read.o : ff.h funcs.h symtab.h ui.h PARM.h obj_w32\save.o : ff.h funcs.h symtab.h ui.h PARM.h obj_w32\scripting.o : ff.h funcs.h symtab.h ui.h PARM.h scripting.h obj_w32\symtab.o : symtab.h obj_w32\ui.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h obj_w32\ui_build.o : ff.h funcs.h symtab.h ui.h PARM.h obj_w32\ui_build_win.o : ff.h funcs.h symtab.h ui.h PARM.h version.h obj_w32\ui_win.o : ff.h funcs.h symtab.h ui.h PARM.h version.h obj_w32\manifest.o : manifest.h # ---------- link rules ---------- # link Win32 DLL $(PLUGIN_W32) : exports.def $(OBJ_W32) $(DLLWRAP) -o $@ -def $^ -mwindows -s dir $@ # --------------------