1226031Sstas########################################################################
2226031Sstas#
3226031Sstas# Copyright (c) 2009, Secure Endpoints Inc.
4226031Sstas# All rights reserved.
5226031Sstas# 
6226031Sstas# Redistribution and use in source and binary forms, with or without
7226031Sstas# modification, are permitted provided that the following conditions
8226031Sstas# are met:
9226031Sstas# 
10226031Sstas# - Redistributions of source code must retain the above copyright
11226031Sstas#   notice, this list of conditions and the following disclaimer.
12226031Sstas# 
13226031Sstas# - Redistributions in binary form must reproduce the above copyright
14226031Sstas#   notice, this list of conditions and the following disclaimer in
15226031Sstas#   the documentation and/or other materials provided with the
16226031Sstas#   distribution.
17226031Sstas# 
18226031Sstas# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19226031Sstas# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20226031Sstas# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21226031Sstas# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22226031Sstas# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23226031Sstas# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24226031Sstas# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25226031Sstas# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26226031Sstas# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27226031Sstas# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28226031Sstas# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29226031Sstas# POSSIBILITY OF SUCH DAMAGE.
30226031Sstas# 
31226031Sstas
32226031SstasRELDIR=lib\wind
33226031Sstas
34226031Sstas!include ../../windows/NTMakefile.w32
35226031Sstas
36226031Sstaslibwind_OBJs=	\
37226031Sstas	$(OBJ)\bidi.obj				\
38226031Sstas	$(OBJ)\bidi_table.obj		\
39226031Sstas	$(OBJ)\combining.obj		\
40226031Sstas	$(OBJ)\combining_table.obj	\
41226031Sstas	$(OBJ)\errorlist.obj		\
42226031Sstas	$(OBJ)\errorlist_table.obj	\
43226031Sstas	$(OBJ)\map.obj				\
44226031Sstas	$(OBJ)\map_table.obj		\
45226031Sstas	$(OBJ)\ldap.obj				\
46226031Sstas	$(OBJ)\normalize.obj		\
47226031Sstas	$(OBJ)\normalize_table.obj	\
48226031Sstas	$(OBJ)\punycode.obj			\
49226031Sstas	$(OBJ)\stringprep.obj		\
50226031Sstas	$(OBJ)\wind_err.obj			\
51226031Sstas	$(OBJ)\utf8.obj
52226031Sstas
53226031Sstas$(LIBWIND): $(libwind_OBJs)
54226031Sstas	$(LIBCON)
55226031Sstas
56226031SstasINCFILES=	\
57226031Sstas	$(INCDIR)\wind.h	\
58226031Sstas	$(INCDIR)\wind_err.h	\
59226031Sstas	$(INCDIR)\map_table.h	\
60226031Sstas	$(INCDIR)\errorlist_table.h	\
61226031Sstas	$(INCDIR)\normalize_table.h	\
62226031Sstas	$(INCDIR)\combining_table.h	\
63226031Sstas	$(INCDIR)\bidi_table.h	\
64226031Sstas	$(INCDIR)\punycode_examples.h
65226031Sstas
66226031Sstas$(OBJ)\map_table.h $(OBJ)\map_table.c: rfc3454.txt gen-map.py stringprep.py
67226031Sstas	cd $(OBJ)
68226031Sstas	$(PYTHON) $(SRCDIR)\gen-map.py $(SRCDIR)\rfc3454.txt $(OBJ)
69226031Sstas	cd $(SRCDIR)
70226031Sstas
71226031Sstas$(OBJ)\errorlist_table.h $(OBJ)\errorlist_table.c: rfc3454.txt gen-errorlist.py stringprep.py
72226031Sstas	cd $(OBJ)
73226031Sstas	$(PYTHON) $(SRCDIR)\gen-errorlist.py $(SRCDIR)\rfc3454.txt $(OBJ)
74226031Sstas	cd $(SRCDIR)
75226031Sstas
76226031Sstas$(OBJ)\normalize_table.h $(OBJ)\normalize_table.c: UnicodeData.txt CompositionExclusions-3.2.0.txt gen-normalize.py
77226031Sstas	cd $(OBJ)
78226031Sstas	$(PYTHON) $(SRCDIR)\gen-normalize.py $(SRCDIR)\UnicodeData.txt $(SRCDIR)\CompositionExclusions-3.2.0.txt $(OBJ)
79226031Sstas	cd $(SRCDIR)
80226031Sstas
81226031Sstas$(OBJ)\combining_table.h $(OBJ)\combining_table.c: UnicodeData.txt gen-combining.py
82226031Sstas	cd $(OBJ)
83226031Sstas	$(PYTHON) $(SRCDIR)\gen-combining.py $(SRCDIR)\UnicodeData.txt $(OBJ)
84226031Sstas	cd $(SRCDIR)
85226031Sstas
86226031Sstas$(OBJ)\bidi_table.h $(OBJ)\bidi_table.c: rfc3454.txt gen-bidi.py
87226031Sstas	cd $(OBJ)
88226031Sstas	$(PYTHON) $(SRCDIR)\gen-bidi.py $(SRCDIR)\rfc3454.txt $(OBJ)
89226031Sstas	cd $(SRCDIR)
90226031Sstas
91226031Sstas$(OBJ)\punycode_examples.h $(OBJ)\punycode_examples.c: gen-punycode-examples.py rfc3492.txt
92226031Sstas	cd $(OBJ)
93226031Sstas	$(PYTHON) $(SRCDIR)\gen-punycode-examples.py $(SRCDIR)\rfc3492.txt $(OBJ)
94226031Sstas	cd $(SRCDIR)
95226031Sstas
96226031Sstas$(OBJ)\wind_err.c $(OBJ)\wind_err.h: wind_err.et
97226031Sstas	cd $(OBJ)
98226031Sstas	$(BINDIR)\compile_et.exe $(SRCDIR)\wind_err.et
99226031Sstas	cd $(SRCDIR)
100226031Sstas
101226031SstasTEST_BINARIES=\
102226031Sstas	$(OBJ)\test-bidi.exe	\
103226031Sstas	$(OBJ)\test-map.exe		\
104226031Sstas	$(OBJ)\test-rw.exe		\
105226031Sstas	$(OBJ)\test-normalize.exe	\
106226031Sstas	$(OBJ)\test-prohibited.exe	\
107226031Sstas	$(OBJ)\test-punycode.exe	\
108226031Sstas	$(OBJ)\test-ldap.exe	\
109226031Sstas	$(OBJ)\test-utf8.exe
110226031Sstas
111226031Sstas{$(OBJ)}.c{$(OBJ)}.obj::
112226031Sstas	$(C2OBJ_P) -I$(SRCDIR)
113226031Sstas
114226031Sstas{$(OBJ)}.obj{$(OBJ)}.exe:
115226031Sstas	$(EXECONLINK) $(LIBHEIMDAL) $(LIBROKEN)
116226031Sstas	$(EXEPREP_NODIST)
117226031Sstas
118226031Sstas$(OBJ)\test-bidi.exe: $(OBJ)\test-bidi.obj
119226031Sstas
120226031Sstas$(OBJ)\test-map.exe: $(OBJ)\test-map.obj
121226031Sstas
122226031Sstas$(OBJ)\test-rw.exe: $(OBJ)\test-rw.obj
123226031Sstas
124226031Sstas$(OBJ)\test-normalize.exe: $(OBJ)\test-normalize.obj
125226031Sstas
126226031Sstas$(OBJ)\test-prohibited.exe: $(OBJ)\test-prohibited.obj
127226031Sstas
128226031Sstas$(OBJ)\test-punycode.exe: $(OBJ)\test-punycode.obj $(OBJ)\punycode_examples.obj
129226031Sstas
130226031Sstas$(OBJ)\test-ldap.exe: $(OBJ)\test-ldap.obj
131226031Sstas
132226031Sstas$(OBJ)\test-utf8.exe: $(OBJ)\test-utf8.obj
133226031Sstas
134226031Sstastest-binaries: $(TEST_BINARIES)
135226031Sstas
136226031Sstastest-run:
137226031Sstas	cd $(OBJ)
138226031Sstas	test-bidi.exe
139226031Sstas	test-map.exe
140226031Sstas	test-rw.exe
141226031Sstas	test-normalize.exe $(SRCDIR)\NormalizationTest.txt
142226031Sstas	test-prohibited.exe
143226031Sstas	test-punycode.exe
144226031Sstas	test-ldap.exe
145226031Sstas	test-utf8.exe
146226031Sstas	cd $(SRCDIR)
147226031Sstas
148226031Sstasall:: $(INCFILES) $(LIBWIND)
149226031Sstas
150226031Sstasclean::
151226031Sstas	-$(RM) $(LIBWIND)
152226031Sstas	-$(RM) $(INCFILES)
153226031Sstas
154226031Sstastest:: test-binaries test-run
155226031Sstas
156226031Sstastest-exports:
157226031Sstas	$(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libwind-exports.def
158226031Sstas
159226031Sstastest:: test-exports
160