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