Subversion Repositories filter_foundry

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 toby 1
# This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop
2
# Copyright (C) 2003-5 Toby Thain, toby@telegraphics.com.au
3
 
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by  
6
# the Free Software Foundation; either version 2 of the License, or
7
# (at your option) any later version.
8
 
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
 
14
# You should have received a copy of the GNU General Public License  
15
# along with this program; if not, write to the Free Software
16
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
 
18
# mingw32 Makefile
19
 
20
CC = i386-mingw32msvc-gcc
21
DLLWRAP = i386-mingw32msvc-dllwrap
22
WINDRES = i386-mingw32msvc-windres
23
#CC = mingw32-gcc
24
#DLLWRAP = mingw32-dllwrap
25
#WINDRES = mingw32-windres
26
 
27
# use GNU flex and bison
28
# these lines can be commented to use system lex and yacc
29
# although this may result in a larger overall executable
30
LEX = flex
31
YACC = bison -y
32
 
33
YFLAGS = -d
34
 
35
#PSAPI = "c:/program files/adobe/adobe photoshop 6.0 sdk/photoshopapi"
36
PSAPI = "../PhotoshopAPI"
37
CFLAGS += -O2 -DWIN_ENV \
38
	-I$(PSAPI)/Pica_sp -I$(PSAPI)/Photoshop -I$(PSAPI)/General \
39
	-I../common/adobeplugin -I../common/tt
40
 
41
OBJ = main.o ui_win.o ui.o ui_build.o ui_build_win.o preview.o read.o save.o \
42
	parser.o lexer.o node.o symtab.o funcs.o trigtab.o process.o \
43
	load_win.o make_win.o make.o scripting.o \
44
	../common/tt/str.o ../common/tt/sprintf_tiny.o \
45
	../common/tt/ui_compat_win.o ../common/tt/file_compat_win.o \
46
	../common/tt/choosefile_win.o ../common/tt/compat_string.o \
47
	../common/tt/compat_win.o \
48
	../common/tt/dbg_win.o ../common/adobeplugin/dllmain.o \
49
	res.o
50
 
51
EXEC = dist/FilterFoundry.8bf
52
DISTARCHIVE = dist/FilterFoundry-win.zip
53
SRCARCHIVE = dist/FilterFoundry-src.zip
54
 
55
all : $(EXEC)
56
 
57
funcs.o : ff.h funcs.h symtab.h ui.h PARM.h parser.c
58
lexer.o : node.h symtab.h parser.c
59
load_mac.o : ff.h funcs.h symtab.h ui.h PARM.h
60
load_win.o : ff.h funcs.h symtab.h ui.h PARM.h
61
main.o : ff.h funcs.h symtab.h ui.h PARM.h node.h parser.h scripting.h
62
make.o : ff.h funcs.h symtab.h ui.h PARM.h
63
make_mac.o : ff.h funcs.h symtab.h ui.h PARM.h
64
make_win.o : ff.h funcs.h symtab.h ui.h PARM.h
65
node.o : node.h parser.c funcs.h symtab.h ui.h PARM.h
66
parser.o : node.h parser.h
67
preview.o : ff.h funcs.h symtab.h ui.h PARM.h node.h parser.h parser.c
68
process.o : ff.h funcs.h symtab.h ui.h PARM.h node.h parser.h
69
read.o : ff.h funcs.h symtab.h ui.h PARM.h
70
save.o : ff.h funcs.h symtab.h ui.h PARM.h
71
scripting.o : ff.h funcs.h symtab.h ui.h PARM.h scripting.h
72
symtab.o : symtab.h
73
ui.o : ff.h funcs.h symtab.h ui.h PARM.h node.h parser.h parser.c
74
ui_build.o : ff.h funcs.h symtab.h ui.h PARM.h
75
ui_build_win.o : ff.h funcs.h symtab.h ui.h PARM.h version.h
76
ui_mac.o : ff.h funcs.h symtab.h ui.h PARM.h
77
ui_win.o : ff.h funcs.h symtab.h ui.h PARM.h version.h
78
 
79
parser.o : node.h parser.h
80
 
81
clean :
82
	rm -f $(OBJ) $(EXEC) parser.c lexer.c $(DISTARCHIVE) $(SRCARCHIVE)
83
 
84
dist : $(DISTARCHIVE)
85
 
86
$(DISTARCHIVE) : $(EXEC) dist/README.txt dist/COPYING.txt dist/examples
87
	zip -9 -r $@ $^
88
	ls -l $@
89
 
90
src : $(SRCARCHIVE)
91
 
92
$(SRCARCHIVE) : \
93
		dist/README.txt dist/COPYING.txt dist/examples BUILDING.txt \
94
		Makefile FilterFoundry.make cw7/filterfoundry_cw7.mcp \
95
		funcs.c gentab.c load_mac.c load_win.c main.c make.c make_mac.c make_win.c \
96
		node.c preview.c process.c read.c save.c symtab.c trigtab.c \
97
		ui.c ui_build.c ui_build_win.c ui_mac.c ui_win.c scripting.[chr] \
98
		lexer.[lc] parser.[yc] y.tab.h \
99
		ff.h funcs.h node.h PARM.h parser.h resource.h symtab.h \
100
		ui.h version.h \
101
		68k.r carbon.r classic.r universal.r pipl_common.r ui_mac.r  \
102
		PiPL.rc PiPL_body.rc ui_win.rc win_res.rc \
103
		caution.ico zoomin.ico zoomout.ico \
104
		../common/tt/str.[ch] ../common/tt/sprintf_tiny.[ch] \
105
		../common/tt/dlg.[ch] ../common/tt/menu.[ch] \
106
		../common/tt/ui_compat.h ../common/tt/ui_compat_win.c ../common/tt/ui_compat_mac.c \
107
		../common/tt/file_compat.h ../common/tt/file_compat_win.c \
108
		../common/tt/compat_string.[ch] \
109
		../common/tt/compat_win.[ch] \
110
		../common/tt/dbg.h ../common/tt/dbg_mac.c ../common/tt/dbg_win.c \
111
		../common/tt/carbonstuff.h \
112
		../common/tt/choosefile.h ../common/tt/choosefile_win.c ../common/tt/choosefile_nav.c \
113
		../common/adobeplugin/dllmain.c ../common/adobeplugin/entry.h ../common/adobeplugin/world.h
114
	zip -r -9 $@ $^ -x \*/.DS_Store \*/.FBC\*
115
	ls -l $@
116
 
117
$(EXEC) : exports.def $(OBJ)
118
	$(DLLWRAP) -o $@ -def exports.def $(OBJ) -mwindows -s -Xlinker -M > dist/FilterFoundry.map
119
	date
120
	ls -l $@
121
 
122
test : $(EXEC)
123
	cp $(EXEC) ../../pcshare
124
 
125
res.o : win_res.rc PiPL.rc PiPL_body.rc ui_win.rc caution.ico
126
	$(WINDRES) --language=0 --include-dir=$(PSAPI)/Photoshop --include-dir=$(PSAPI)/Pica_sp -i win_res.rc -o $@
127
 
128
lexer.o : lexer.l parser.c
129
 
130
parser.o : parser.y
131
 
132
gentab : gentab.c funcs.h
133
	gcc -o gentab gentab.c -lm
134
 
135
trigtab.c : gentab
136
	./gentab > $@
137
 
138
#CC=gcc
139
#CFLAGS=-DDEBUG -DPARSERTEST
140
parsertest : lexer.o parser.o node.o testmain.o symtab.o funcs.o
141
	$(CC) -o $@ $^ -lm