Support parallelized builds on Windows
[heimdal.git] / lib / wind / NTMakefile
blob88ecd649ba86de2bd7ddad5125415a050f12175b
1 ########################################################################
3 # Copyright (c) 2009, Secure Endpoints Inc.
4 # All rights reserved.
5
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
8 # are met:
9
10 # - Redistributions of source code must retain the above copyright
11 #   notice, this list of conditions and the following disclaimer.
12
13 # - Redistributions in binary form must reproduce the above copyright
14 #   notice, this list of conditions and the following disclaimer in
15 #   the documentation and/or other materials provided with the
16 #   distribution.
17
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 # POSSIBILITY OF SUCH DAMAGE.
30
32 RELDIR=lib\wind
34 !include ../../windows/NTMakefile.w32
36 libwind_OBJs=   \
37         $(OBJ)\bidi.obj                         \
38         $(OBJ)\bidi_table.obj           \
39         $(OBJ)\combining.obj            \
40         $(OBJ)\combining_table.obj      \
41         $(OBJ)\errorlist.obj            \
42         $(OBJ)\errorlist_table.obj      \
43         $(OBJ)\map.obj                          \
44         $(OBJ)\map_table.obj            \
45         $(OBJ)\ldap.obj                         \
46         $(OBJ)\normalize.obj            \
47         $(OBJ)\normalize_table.obj      \
48         $(OBJ)\punycode.obj                     \
49         $(OBJ)\stringprep.obj           \
50         $(OBJ)\wind_err.obj                     \
51         $(OBJ)\utf8.obj
53 !ifndef STATICLIBS
55 $(LIBWIND): $(BINDIR)\libwind.dll
57 $(BINDIR)\libwind.dll: $(libwind_OBJs) $(LIBCOMERR)
58         $(DLLGUILINK) -def:libwind-exports.def -implib:$(LIBWIND)
59         $(DLLPREP)
61 !else
63 $(LIBWIND): $(libwind_OBJs)
64         $(LIBCON)
66 !endif
68 INCFILES=       \
69         $(INCDIR)\wind.h        \
70         $(INCDIR)\wind_err.h    \
71         $(INCDIR)\map_table.h   \
72         $(INCDIR)\errorlist_table.h     \
73         $(INCDIR)\normalize_table.h     \
74         $(INCDIR)\combining_table.h     \
75         $(INCDIR)\bidi_table.h  \
76         $(INCDIR)\punycode_examples.h
78 $(OBJ)\map_table.h $(OBJ)\map_table.c: rfc3454.txt gen-map.py stringprep.py
79         cd $(OBJ)
80         $(PYTHON) $(SRCDIR)\gen-map.py $(SRCDIR)\rfc3454.txt $(OBJ)
81         cd $(SRCDIR)
83 $(OBJ)\errorlist_table.h $(OBJ)\errorlist_table.c: rfc3454.txt gen-errorlist.py stringprep.py
84         cd $(OBJ)
85         $(PYTHON) $(SRCDIR)\gen-errorlist.py $(SRCDIR)\rfc3454.txt $(OBJ)
86         cd $(SRCDIR)
88 $(OBJ)\normalize_table.h $(OBJ)\normalize_table.c: UnicodeData.txt CompositionExclusions-3.2.0.txt gen-normalize.py
89         cd $(OBJ)
90         $(PYTHON) $(SRCDIR)\gen-normalize.py $(SRCDIR)\UnicodeData.txt $(SRCDIR)\CompositionExclusions-3.2.0.txt $(OBJ)
91         cd $(SRCDIR)
93 $(OBJ)\combining_table.h $(OBJ)\combining_table.c: UnicodeData.txt gen-combining.py
94         cd $(OBJ)
95         $(PYTHON) $(SRCDIR)\gen-combining.py $(SRCDIR)\UnicodeData.txt $(OBJ)
96         cd $(SRCDIR)
98 $(OBJ)\bidi_table.h $(OBJ)\bidi_table.c: rfc3454.txt gen-bidi.py
99         cd $(OBJ)
100         $(PYTHON) $(SRCDIR)\gen-bidi.py $(SRCDIR)\rfc3454.txt $(OBJ)
101         cd $(SRCDIR)
103 $(OBJ)\punycode_examples.h $(OBJ)\punycode_examples.c: gen-punycode-examples.py rfc3492.txt
104         cd $(OBJ)
105         $(PYTHON) $(SRCDIR)\gen-punycode-examples.py $(SRCDIR)\rfc3492.txt $(OBJ)
106         cd $(SRCDIR)
108 $(OBJ)\wind_err.c $(OBJ)\wind_err.h: wind_err.et
109         cd $(OBJ)
110         $(BINDIR)\compile_et.exe $(SRCDIR)\wind_err.et
111         cd $(SRCDIR)
113 TEST_BINARIES=\
114         $(OBJ)\test-bidi.exe    \
115         $(OBJ)\test-map.exe             \
116         $(OBJ)\test-rw.exe              \
117         $(OBJ)\test-normalize.exe       \
118         $(OBJ)\test-prohibited.exe      \
119         $(OBJ)\test-punycode.exe        \
120         $(OBJ)\test-ldap.exe    \
121         $(OBJ)\test-utf8.exe
123 {$(OBJ)}.c{$(OBJ)}.obj::
124         $(C2OBJ_P) -I$(SRCDIR)
126 {$(OBJ)}.obj{$(OBJ)}.exe:
127         $(EXECONLINK) $(LIBWIND) $(LIBROKEN)
128         $(_VC_MANIFEST_EMBED_EXE)
129         $(_VC_MANIFEST_CLEAN)
131 $(OBJ)\test-bidi.exe: $(OBJ)\test-bidi.obj
133 $(OBJ)\test-map.exe: $(OBJ)\test-map.obj
135 $(OBJ)\test-rw.exe: $(OBJ)\test-rw.obj
137 $(OBJ)\test-normalize.exe: $(OBJ)\test-normalize.obj
139 $(OBJ)\test-prohibited.exe: $(OBJ)\test-prohibited.obj
141 $(OBJ)\test-punycode.exe: $(OBJ)\test-punycode.obj $(OBJ)\punycode_examples.obj
143 $(OBJ)\test-ldap.exe: $(OBJ)\test-ldap.obj
145 $(OBJ)\test-utf8.exe: $(OBJ)\test-utf8.obj
147 test-binaries: $(TEST_BINARIES)
149 test-run:
150         cd $(OBJ)
151         test-bidi.exe
152         test-map.exe
153         test-rw.exe
154         test-normalize.exe $(SRCDIR)\NormalizationTest.txt
155         test-prohibited.exe
156         test-punycode.exe
157         test-ldap.exe
158         test-utf8.exe
159         cd $(SRCDIR)
161 all:: $(INCFILES) $(LIBWIND)
163 clean::
164         -$(RM) $(LIBWIND)
165         -$(RM) $(INCFILES)
167 test:: test-binaries test-run