1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
|
###########################################################################
#
# Makefile for testing DOM code
#
###########################################################################
####### Sense whether we are on a DOS box or cross-compiling
ifdef ComSpec
BUILD=native
DOSSHELL=CMD_EXE
else
ifdef COMSPEC
BUILD=native
DOSSHELL=COMMAND_COM
else
BUILD=cross
endif
endif
##########################################################################
# FILE SEPARATORS
# $(S) will be set to one of these
##########################################################################
BSLASH := \\#
FSLASH := /
##########################################################################
# CROSS / NATIVE SWITCHES
##########################################################################
ifeq ($(BUILD),cross)
##########################################################################
# CROSS COMPILER SETTINGS
##########################################################################
CC = i686-pc-mingw32-gcc
CXX = i686-pc-mingw32-g++
AS = i686-pc-mingw32-as
AR = i686-pc-mingw32-ar
RANLIB = i686-pc-mingw32-ranlib
WINDRES = i686-pc-mingw32-windres
LD = i686-pc-mingw32-ld
DLLWRAP = i686-pc-mingw32-dllwrap
DLLTOOL = i686-pc-mingw32-dlltool
####### file separator
S = $(FSLASH)
####### escape character for echo
E = /
####### file manipulation programs
CP = cp
RMDIR = rm -rf
MKDIR = mkdir
CPDIR = cp -rf
MSGFMT = msgfmt
RMREC = find ./inkscape -type f -name
RMREC1 = |xargs $(RM)
RMDIRREC = find ./inkscape -type d -name
RMDIRREC1 = |xargs $(RMDIR)
####### Where is your GTK directory?
GTK=/target
####### Same thing, file system style
GTKDOS=$(GTK)
DTG := $(shell date +%y%m%d.%H%M)
else
##########################################################################
# NATIVE COMPILER SETTINGS
##########################################################################
CC = mingw32-gcc
CXX = mingw32-g++
AS = as
AR = mingw32-ar
RANLIB = ranlib
WINDRES = windres
DLLWRAP = dllwrap
DLLTOOL = dlltool
####### file separator
S = $(BSLASH)
####### escape character for echo
E =
####### file manipulation programs
CP = copy
####### are we on WinNt and beyond?
ifeq ($(DOSSHELL),CMD_EXE)
RMDIR = rmdir /s /q
RM = del
else
RMDIR = deltree /y
RM = del
endif
MKDIR = mkdir
CPDIR = xcopy /e /i
RMREC = cd inkscape & $(RM) /s /q
RMREC1 = & cd ..
RMDIRREC = cd inkscape & $(RMDIR) /s
RMDIRREC1 = & cd ..
####### Where is your GTK directory?
GTK=c:/devlibs
####### Same thing, DOS style
GTKDOS=c:\devlibs
####### Command to process .po files --> .mo
MSGFMT = $(GTKDOS)$(S)bin$(S)msgfmt
####### change me!!
DTG := 20080515
endif
##########################################################################
# END CROSS / NATIVE SWITCHES
##########################################################################
INC = -I. -I..
CFLAGS = -Wall -g -DDOM_STANDALONE
LIBS = -lws2_32
DOMOBJ = \
cssreader.o \
domimpl.o \
domptr.o \
domstring.o \
lsimpl.o \
smilimpl.o \
uri.o \
xmlreader.o \
xpathimpl.o \
xpathparser.o \
xpathtoken.o \
io/base64stream.o \
io/domstream.o \
io/bufferstream.o \
io/gzipstream.o \
io/httpclient.o \
io/stringstream.o \
io/uristream.o \
io/socket.o \
odf/odfdocument.o \
svgimpl.o \
svgreader.o \
ucd.o \
util/thread.o \
util/ziptool.o
TESTOBJ = \
work/testdom.o \
work/testodf.o \
work/testsvg.o \
work/testuri.o \
work/testxpath.o \
work/testzip.o
OBJ = $(DOMOBJ)
all: testsvg.exe
tests: testdom.exe testhttp.exe \
testsvg.exe testuri.exe testxpath.exe testzip.exe
testdom.exe: libdom.a work/testdom.o
$(CXX) -o $@ work/testdom.o libdom.a $(LIBS)
testhttp.exe: libdom.a work/testhttp.o
$(CXX) -o $@ work/testhttp.o libdom.a $(LIBS)
testodf.exe: libdom.a work/testodf.o
$(CXX) -o $@ work/testodf.o libdom.a $(LIBS)
testsvg.exe: libdom.a work/testsvg.o
$(CXX) -o $@ work/testsvg.o libdom.a $(LIBS)
testuri.exe: libdom.a work/testuri.o
$(CXX) -o $@ work/testuri.o libdom.a $(LIBS)
testxpath.exe: libdom.a work/testxpath.o
$(CXX) -o $@ work/testxpath.o libdom.a $(LIBS)
testzip.exe: libdom.a work/testzip.o
$(CXX) -o $@ work/testzip.o libdom.a $(LIBS)
libdom.a: $(OBJ)
ar crv $@ $(OBJ)
.cpp.o:
$(CXX) $(CFLAGS) $(INC) -c -o $@ $<
clean:
$(foreach a, $(OBJ), $(shell $(RM) $(subst /,$(S), $(a))))
$(foreach a, $(TESTOBJ), $(shell $(RM) $(subst /,$(S), $(a))))
-$(RM) *.a
-$(RM) *.gch
-$(RM) testdom
-$(RM) testdom.exe
-$(RM) testsvg
-$(RM) testsvg.exe
-$(RM) testuri
-$(RM) testuri.exe
-$(RM) testxpath
-$(RM) testxpath.exe
-$(RM) testzip
-$(RM) testzip.exe
-$(RM) core.*
###########################################################################
# E N D O F F I L E
###########################################################################
|