Subversion Repositories filter_foundry

Rev

Rev 402 | Rev 450 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 402 Rev 439
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
# NMAKE Makefile
19
# NMAKE Makefile
20
 
20
 
21
# Tested with Visual C++ 2008 Express Edition
21
# Tested with Visual C++ 2008 Express Edition
22
#	http://www.microsoft.com/express/vc/
22
#	http://www.microsoft.com/express/vc/
23
# and Windows SDK for Windows Server 2008
23
# and Windows SDK for Windows Server 2008
24
#	http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en
24
#	http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en
25
 
25
 
26
# Set environment variables as follows (fix paths for
26
# Set environment variables as follows (fix paths for
27
# *your* actual installations and ignore line breaks :)
27
# *your* actual installations and ignore line breaks :)
28
#	SET INCLUDE=H:\Microsoft Visual Studio 9.0\VC\include;
28
#	SET INCLUDE=H:\Microsoft Visual Studio 9.0\VC\include;
29
#               C:\Program Files\Microsoft SDKs\Windows\v6.1\Include
29
#               C:\Program Files\Microsoft SDKs\Windows\v6.1\Include
30
#	SET LIB=H:\Microsoft Visual Studio 9.0\Common7\IDE;
30
#	SET LIB=H:\Microsoft Visual Studio 9.0\Common7\IDE;
31
#           H:\Microsoft Visual Studio 9.0\VC\lib;
31
#           H:\Microsoft Visual Studio 9.0\VC\lib;
32
#           C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib
32
#           C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib
33
#	SET PATH=H:\Microsoft Visual Studio 9.0\Common7\IDE;
33
#	SET PATH=H:\Microsoft Visual Studio 9.0\Common7\IDE;
34
#            H:\Microsoft Visual Studio 9.0\VC\bin;
34
#            H:\Microsoft Visual Studio 9.0\VC\bin;
35
#            C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin
35
#            C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin
36
 
36
 
37
# To do a 64-bit build,
37
# To do a 64-bit build,
38
# - set LIB to {VC}\lib\amd64;Microsoft SDKs\Windows\v6.1\Lib\x64
38
# - set LIB to {VC}\lib\amd64;Microsoft SDKs\Windows\v6.1\Lib\x64
39
#   and PATH to {VC}\bin\x86_amd64;{VC}\bin
39
#   and PATH to {VC}\bin\x86_amd64;{VC}\bin
40
#   where {VC} is the vc directory of the Visual Studio distribution.
40
#   where {VC} is the vc directory of the Visual Studio distribution.
41
# - add  -d_WIN64  to RFLAGS
41
# - add  -d_WIN64  to RFLAGS
42
 
42
 
43
EXEC = FilterFoundry
43
EXEC = FilterFoundry
44
 
44
 
45
# define location of Photoshop SDK headers
45
# define location of Photoshop SDK headers
46
PSAPI = ..\photoshop_sdk\pluginsdk\photoshopapi
46
PSAPI = ..\photoshop_sdk\pluginsdk\photoshopapi
47
 
47
 
48
# C compiler flags
48
# C compiler flags
49
CPPFLAGS = -DWIN32 -DWIN_ENV -DYY_SKIP_YYWRAP \
49
CPPFLAGS = -DWIN32 -DWIN_ENV -DYY_SKIP_YYWRAP \
50
           -I$(PSAPI)\Pica_sp -I$(PSAPI)\Photoshop -I$(PSAPI)\General \
50
           -I$(PSAPI)\Pica_sp -I$(PSAPI)\Photoshop -I$(PSAPI)\General \
51
           -I..\telegraphics_common\adobeplugin -I..\telegraphics_common\tt -I..
51
           -I..\telegraphics_common\adobeplugin -I..\telegraphics_common\tt -I..
52
# /O2 = Max optimization (prefer performance). /O2 implies /Ot
52
# /O2 = Max optimization (prefer performance). /O2 implies /Ot
53
CFLAGS = -O2 $(CPPFLAGS)
53
CFLAGS = -O2 $(CPPFLAGS)
54
 
54
 
55
# Note since VS8 it is necessary to link with multithreaded standard lib, using /MT
55
# Note since VS8 it is necessary to link with multithreaded standard lib, using /MT
56
LDFLAGS = /LD /MT user32.lib gdi32.lib comdlg32.lib shell32.lib
56
LDFLAGS = /LD /MT user32.lib gdi32.lib comdlg32.lib shell32.lib
57
 
57
 
58
# resource compiler flags
58
# resource compiler flags
59
RFLAGS = -i$(PSAPI)\Photoshop -d_WIN32 -d_X86_
59
RFLAGS = -i$(PSAPI)\Photoshop -d_WIN32 -d_X86_
60
 
60
 
61
# Path to flex and bison (you can download them at https://sourceforge.net/projects/winflexbison/ )
61
# Path to flex and bison (you can download them at https://sourceforge.net/projects/winflexbison/ )
62
FLEX = win_flex_bison\win_flex
62
FLEX = win_flex_bison\win_flex
63
BISON = win_flex_bison\win_bison
63
BISON = win_flex_bison\win_bison
64
 
64
 
65
OBJ = ..\main.obj ..\funcs.obj ..\process.obj ..\node.obj ..\symtab.obj \
65
OBJ = ..\main.obj ..\funcs.obj ..\process.obj ..\node.obj ..\symtab.obj \
66
	..\ui.obj ..\ui_build.obj ..\preview.obj ..\read.obj ..\save.obj ..\make.obj ..\obfusc.obj \
66
	..\ui.obj ..\ui_build.obj ..\preview.obj ..\read.obj ..\save.obj ..\make.obj ..\obfusc.obj ..\slider_win.obj \
67
	..\scripting.obj ..\lex.yy.obj ..\manifest.obj ..\ui_win.obj ..\make_win.obj ..\versioninfo_modify_win.obj ..\load_win.obj \
67
	..\scripting.obj ..\lex.yy.obj ..\manifest.obj ..\ui_win.obj ..\make_win.obj ..\versioninfo_modify_win.obj ..\load_win.obj \
68
	..\telegraphics_common\tt\dbg_win.obj ..\telegraphics_common\tt\ui_compat_win.obj \
68
	..\telegraphics_common\tt\dbg_win.obj ..\telegraphics_common\tt\ui_compat_win.obj \
69
	..\telegraphics_common\tt\choosefile_win.obj ..\ui_build_win.obj \
69
	..\telegraphics_common\tt\choosefile_win.obj ..\ui_build_win.obj \
70
	..\telegraphics_common\tt\compat_string.obj ..\telegraphics_common\tt\compat_win.obj ..\telegraphics_common\tt\compat_win_resource.obj \
70
	..\telegraphics_common\tt\compat_string.obj ..\telegraphics_common\tt\compat_win.obj ..\telegraphics_common\tt\compat_win_resource.obj \
71
	..\telegraphics_common\tt\file_compat_win.obj ..\telegraphics_common\tt\str.obj \
71
	..\telegraphics_common\tt\file_compat_win.obj ..\telegraphics_common\tt\str.obj \
72
	..\telegraphics_common\adobeplugin\dllmain.obj
72
	..\telegraphics_common\adobeplugin\dllmain.obj
73
 
73
 
74
all : parser lexer $(EXEC).8bf
74
all : parser lexer $(EXEC).8bf
75
 
75
 
76
clean :
76
clean :
77
	-del *.obj *.asm *.cod win_res.res $(EXEC).8bf $(EXEC).exp $(EXEC).lib $(EXEC).map
77
	-del *.obj *.asm *.cod win_res.res $(EXEC).8bf $(EXEC).exp $(EXEC).lib $(EXEC).map
78
 
78
 
79
win_res.res : ..\win_res.rc ..\Scripting.rc ..\PiPL.rc ..\PiPL_body.rc ..\manifest.rc ..\version_win.rc ..\ui_win.rc ..\caution.ico ..\ui.h ..\version.h
79
win_res.res : ..\win_res.rc ..\Scripting.rc ..\PiPL.rc ..\PiPL_body.rc ..\manifest.rc ..\version_win.rc ..\ui_win.rc ..\caution.ico ..\ui.h ..\version.h
80
	$(RC) $(RFLAGS) $(CPPFLAGS) -fowin_res.res ..\win_res.rc
80
	$(RC) $(RFLAGS) $(CPPFLAGS) -fowin_res.res ..\win_res.rc
81
	
81
	
82
parser : ..\parser.y
82
parser : ..\parser.y
83
	rem $(BISON) ..\parser.y -d -y
83
	rem $(BISON) ..\parser.y -d -y
84
	rem We need to switch the path, because otherwise y.tab.c will be created in visual_studio and not the source directory
84
	rem We need to switch the path, because otherwise y.tab.c will be created in visual_studio and not the source directory
85
	cd ..
85
	cd ..
86
	$(BISON) parser.y -d -y
86
	$(BISON) parser.y -d -y
87
	cd visual_studio
87
	cd visual_studio
88
	
88
	
89
lexer : ..\lexer.l
89
lexer : ..\lexer.l
90
	rem $(FLEX) --never-interactive ..\lexer.l y.tab.c
90
	rem $(FLEX) --never-interactive ..\lexer.l y.tab.c
91
	rem We need to switch the path, because otherwise lex.yy.c will be created in visual_studio and not the source directory
91
	rem We need to switch the path, because otherwise lex.yy.c will be created in visual_studio and not the source directory
92
	cd ..
92
	cd ..
93
	$(FLEX) --never-interactive lexer.l y.tab.c
93
	$(FLEX) --never-interactive lexer.l y.tab.c
94
	cd visual_studio
94
	cd visual_studio
95
 
95
 
96
$(EXEC).8bf : $(OBJ) win_res.res
96
$(EXEC).8bf : $(OBJ) win_res.res
97
	$(CC) /Fe$@ $(**F) $(LDFLAGS)
97
	$(CC) /Fe$@ $(**F) $(LDFLAGS)