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