Rev 198 | Rev 358 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
# This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop
# Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.com.au
# Copyright (C) 2018-2019 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
# ---
# Makefile tested with "mingw32-make -f Makefile.win" (i686-8.1.0-posix-dwarf-rt_v6-rev0)
# ---
# ---------- variables & flags ----------
EXEC = FilterFoundry
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 \
-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 \
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 \
file_compat_win.c dllmain.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\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 $@
# --------------------