Subversion Repositories filter_foundry

Rev

Rev 402 | Rev 450 | 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
3
# Copyright (C) 2018-2019 Daniel Marschall, ViaThinkSoft
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 \
42
            -I$(PSAPI)\pica_sp -I$(PSAPI)\photoshop -I$(PSAPI)\general \
43
            -Itelegraphics_common\adobeplugin -Itelegraphics_common\tt
44
 
45
 
46
# ---------- source & object files ----------
47
 
48
# where to find .c source files
49
vpath %.c telegraphics_common\tt telegraphics_common\adobeplugin
50
 
51
# list of source files
52
SRC_COMMON = main.c funcs.c process.c node.c symtab.c \
53
	ui.c ui_build.c preview.c read.c save.c make.c obfusc.c \
54
	scripting.c y.tab.c lex.yy.c str.c
55
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 56
	choosefile_win.c ui_build_win.c compat_string.c compat_win.c compat_win_resource.c \
439 daniel-mar 57
	file_compat_win.c dllmain.c slider_win.c
358 daniel-mar 58
 
59
# derive lists of object files, separate for each platform
60
OBJ_W32 := $(patsubst %.c, obj_w32\\%.o, $(SRC_COMMON) $(SRC_W32)) obj_w32\\res.o
61
 
62
PLUGIN_W32 = $(EXEC).8bf
63
 
64
# ---------- targets ----------
65
 
66
all : dll
67
 
68
dll : $(PLUGIN_W32)
69
 
70
clean :
71
	del obj_w32\\*.o $(OBJ_W32) $(PLUGIN_W32) lex.yy.c lex.yy.h y.tab.c y.tab.h
72
 
73
 
74
# ---------- compile rules ----------
75
 
76
obj_w32\\%.o : %.c
77
	$(CC) -o $@ -c $< $(CFLAGS) $(CPPFLAGS)
78
 
79
# note dependencies on version.h:
80
 
81
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
82
	$(WINDRES) -o $@ -i $< --language=0 $(CPPFLAGS)
83
 
84
lex.yy.c : lexer.l y.tab.h
85
	$(LEX) $<
86
y.tab.c y.tab.h : parser.y
87
	$(YACC) $< $(YFLAGS)
88
 
89
obj_w32\funcs.o : ff.h funcs.h symtab.h ui.h PARM.h y.tab.h
90
obj_w32\lex.yy.o : node.h symtab.h y.tab.h
91
obj_w32\load_win.o : ff.h funcs.h symtab.h ui.h PARM.h
92
obj_w32\main.o : ff.h funcs.h symtab.h ui.h PARM.h node.h scripting.h y.tab.h 
93
obj_w32\make.o : ff.h funcs.h symtab.h ui.h PARM.h
94
obj_w32\obfusc.o : ff.h funcs.h symtab.h ui.h PARM.h
439 daniel-mar 95
obj_w32\slider_win.c : ff.h
358 daniel-mar 96
obj_w32\make_win.o : ff.h funcs.h symtab.h ui.h PARM.h
97
obj_w32\versioninfo_modify_win.o : ff.h funcs.h symtab.h ui.h PARM.h
98
obj_w32\node.o : node.h y.tab.h funcs.h symtab.h ui.h PARM.h
99
obj_w32\y.tab.o : node.h y.tab.h
100
obj_w32\preview.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h
101
obj_w32\process.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h
102
obj_w32\read.o : ff.h funcs.h symtab.h ui.h PARM.h
103
obj_w32\save.o : ff.h funcs.h symtab.h ui.h PARM.h
104
obj_w32\scripting.o : ff.h funcs.h symtab.h ui.h PARM.h scripting.h
105
obj_w32\symtab.o : symtab.h
106
obj_w32\ui.o : ff.h funcs.h symtab.h ui.h PARM.h node.h y.tab.h
107
obj_w32\ui_build.o : ff.h funcs.h symtab.h ui.h PARM.h
108
obj_w32\ui_build_win.o : ff.h funcs.h symtab.h ui.h PARM.h version.h
109
obj_w32\ui_win.o : ff.h funcs.h symtab.h ui.h PARM.h version.h
110
obj_w32\manifest.o : manifest.h
111
 
112
# ---------- link rules ----------
113
 
114
# link Win32 DLL
115
$(PLUGIN_W32) : exports.def $(OBJ_W32)
116
	$(DLLWRAP) -o $@ -def $^ -mwindows -s
117
	dir $@
118
 
119
 
120
# --------------------