Rev 492 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
358 | daniel-mar | 1 | # This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop |
2 | # Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.com.au |
||
503 | daniel-mar | 3 | # Copyright (C) 2018-2022 Daniel Marschall, ViaThinkSoft |
358 | daniel-mar | 4 | |
5 | # This program is free software; you can redistribute it and/or modify |
||
6 | # it under the terms of the GNU General Public License as published by |
||
7 | # the Free Software Foundation; either version 2 of the License, or |
||
8 | # (at your option) any later version. |
||
9 | |||
10 | # This program is distributed in the hope that it will be useful, |
||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
13 | # GNU General Public License for more details. |
||
14 | |||
15 | # You should have received a copy of the GNU General Public License |
||
16 | # along with this program; if not, write to the Free Software |
||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
18 | |||
19 | |||
20 | # ---------- variables & flags ---------- |
||
21 | |||
22 | EXEC = FilterFoundry |
||
23 | |||
384 | daniel-mar | 24 | # gcc should be used to ensure that the project is 100% C and not C++ |
25 | # g++ can be used for improving code quality, because the compiler warnings are very good |
||
402 | daniel-mar | 26 | CC = g++.exe |
27 | #CC = gcc.exe |
||
358 | daniel-mar | 28 | DLLWRAP = dllwrap.exe |
29 | WINDRES = windres.exe |
||
30 | |||
31 | # use GNU flex and bison |
||
32 | # these lines can be commented to use system lex and yacc |
||
33 | # although this may result in a larger overall executable |
||
34 | LEX = win_flex_bison\win_flex.exe --never-interactive |
||
35 | YACC = win_flex_bison\win_bison.exe -y |
||
36 | YFLAGS = -d |
||
37 | |||
38 | PSAPI = photoshop_sdk\pluginsdk\photoshopapi |
||
39 | |||
40 | CFLAGS += -O2 -W -Wall -Wno-main -Wno-unused-parameter -Wno-multichar -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-function |
||
41 | CPPFLAGS += -DYY_SKIP_YYWRAP -DWIN_ENV \ |
||
450 | daniel-mar | 42 | -DUNICODE -D_UNICODE \ |
358 | daniel-mar | 43 | -I$(PSAPI)\pica_sp -I$(PSAPI)\photoshop -I$(PSAPI)\general \ |
44 | -Itelegraphics_common\adobeplugin -Itelegraphics_common\tt |
||
45 | |||
46 | |||
47 | # ---------- source & object files ---------- |
||
48 | |||
49 | # where to find .c source files |
||
50 | vpath %.c telegraphics_common\tt telegraphics_common\adobeplugin |
||
51 | |||
52 | # list of source files |
||
53 | SRC_COMMON = main.c funcs.c process.c node.c symtab.c \ |
||
492 | daniel-mar | 54 | ui.c ui_build.c preview.c read.c save.c make.c obfusc.c ff_misc.c language.c \ |
358 | daniel-mar | 55 | scripting.c y.tab.c lex.yy.c str.c |
56 | SRC_W32 = dbg_win.c manifest.c ui_win.c make_win.c versioninfo_modify_win.c load_win.c ui_compat_win.c \ |
||
402 | daniel-mar | 57 | choosefile_win.c ui_build_win.c compat_string.c compat_win.c compat_win_resource.c \ |
439 | daniel-mar | 58 | file_compat_win.c dllmain.c slider_win.c |
358 | daniel-mar | 59 | |
60 | # derive lists of object files, separate for each platform |
||
61 | OBJ_W32 := $(patsubst %.c, obj_w32\\%.o, $(SRC_COMMON) $(SRC_W32)) obj_w32\\res.o |
||
62 | |||
63 | PLUGIN_W32 = $(EXEC).8bf |
||
64 | |||
65 | # ---------- targets ---------- |
||
66 | |||
67 | all : dll |
||
68 | |||
69 | dll : $(PLUGIN_W32) |
||
70 | |||
71 | clean : |
||
72 | del obj_w32\\*.o $(OBJ_W32) $(PLUGIN_W32) lex.yy.c lex.yy.h y.tab.c y.tab.h |
||
73 | |||
74 | |||
75 | # ---------- compile rules ---------- |
||
76 | |||
77 | obj_w32\\%.o : %.c |
||
78 | $(CC) -o $@ -c $< $(CFLAGS) $(CPPFLAGS) |
||
79 | |||
80 | # note dependencies on version.h: |
||
81 | |||
82 | 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 |
||
83 | $(WINDRES) -o $@ -i $< --language=0 $(CPPFLAGS) |
||
84 | |||
85 | lex.yy.c : lexer.l y.tab.h |
||
86 | $(LEX) $< |
||
87 | y.tab.c y.tab.h : parser.y |
||
88 | $(YACC) $< $(YFLAGS) |
||
89 | |||
90 | obj_w32\funcs.o : ff.h funcs.h symtab.h ui.h PARM.h y.tab.h |
||
91 | obj_w32\lex.yy.o : node.h symtab.h y.tab.h |
||
92 | obj_w32\load_win.o : ff.h funcs.h symtab.h ui.h PARM.h |
||
93 | obj_w32\main.o : ff.h funcs.h symtab.h ui.h PARM.h node.h scripting.h y.tab.h |
||
94 | obj_w32\make.o : ff.h funcs.h symtab.h ui.h PARM.h |
||
95 | obj_w32\obfusc.o : ff.h funcs.h symtab.h ui.h PARM.h |
||
439 | daniel-mar | 96 | obj_w32\slider_win.c : ff.h |
358 | daniel-mar | 97 | obj_w32\make_win.o : ff.h funcs.h symtab.h ui.h PARM.h |
98 | obj_w32\versioninfo_modify_win.o : ff.h funcs.h symtab.h ui.h PARM.h |
||
99 | obj_w32\node.o : node.h y.tab.h funcs.h symtab.h ui.h PARM.h |
||
100 | obj_w32\y.tab.o : node.h y.tab.h |
||
101 | obj_w32\preview.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h |
||
102 | obj_w32\process.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h |
||
103 | obj_w32\read.o : ff.h funcs.h symtab.h ui.h PARM.h |
||
104 | obj_w32\save.o : ff.h funcs.h symtab.h ui.h PARM.h |
||
105 | obj_w32\scripting.o : ff.h funcs.h symtab.h ui.h PARM.h scripting.h |
||
106 | obj_w32\symtab.o : symtab.h |
||
107 | obj_w32\ui.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h |
||
108 | obj_w32\ui_build.o : ff.h funcs.h symtab.h ui.h PARM.h |
||
109 | obj_w32\ui_build_win.o : ff.h funcs.h symtab.h ui.h PARM.h version.h |
||
110 | obj_w32\ui_win.o : ff.h funcs.h symtab.h ui.h PARM.h version.h |
||
111 | obj_w32\manifest.o : manifest.h |
||
112 | |||
113 | # ---------- link rules ---------- |
||
114 | |||
115 | # link Win32 DLL |
||
116 | $(PLUGIN_W32) : exports.def $(OBJ_W32) |
||
117 | $(DLLWRAP) -o $@ -def $^ -mwindows -s |
||
118 | dir $@ |
||
119 | |||
120 | |||
121 | # -------------------- |