1 ########################################################################
3 # Copyright (c) 2009, Secure Endpoints Inc.
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
10 # - Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
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
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.
34 !include ../../windows/NTMakefile.w32
43 $(OBJ)\dlfcn_w32.obj \
47 $(OBJ)\environment.obj \
57 $(OBJ)\getaddrinfo_hostspec.obj \
58 $(OBJ)\get_default_username.obj \
59 $(OBJ)\get_window_size.obj \
61 $(OBJ)\getifaddrs_w32.obj \
62 $(OBJ)\getnameinfo_verified.obj \
63 $(OBJ)\getprogname.obj \
64 $(OBJ)\gettimeofday.obj \
66 $(OBJ)\hostent_find_fqdn.obj \
67 $(OBJ)\inet_aton.obj \
70 $(OBJ)\mini_inetd.obj \
73 $(OBJ)\net_write.obj \
74 $(OBJ)\parse_bytes.obj \
75 $(OBJ)\parse_time.obj \
76 $(OBJ)\parse_units.obj \
79 $(OBJ)\roken_gethostby.obj \
83 $(OBJ)\setprogname.obj \
84 $(OBJ)\simple_exec_w32.obj \
88 $(OBJ)\sockstartup_w32.obj \
89 $(OBJ)\strcollect.obj \
90 $(OBJ)\strerror_r.obj \
96 $(OBJ)\strsep_copy.obj \
113 !if $(NMAKE_WINVER) < 0x0600
114 libroken_la_OBJS=$(libroken_la_OBJS) \
115 $(OBJ)\inet_ntop.obj \
120 $(C2OBJ_P) -DBUILD_ROKEN_LIB
122 $(LIBROKEN): $(libroken_la_OBJS)
123 $(LIBCON_C) -out:$@ @<<
128 $(OBJ)\make-roken.exe: $(OBJ)\make-roken.obj
131 $(OBJ)\make-roken.c: roken.h.in roken.awk $(INCDIR)\config.h
132 $(AWK) -f roken.awk roken.h.in > $(OBJ)\make-roken.c || $(RM) $(OBJ)\make-roken.c
134 $(INCDIR)\roken.h: $(OBJ)\make-roken.exe
135 $(OBJ)\make-roken.exe > $@ || $(RM) $@
142 $(INCDIR)\fnmatch.h \
146 $(INCDIR)\ifaddrs.h \
147 $(INCDIR)\parse_bytes.h \
148 $(INCDIR)\parse_time.h \
149 $(INCDIR)\parse_units.h \
150 $(INCDIR)\resolve.h \
152 $(INCDIR)\roken-common.h \
161 all:: $(INCFILES) $(LIBROKEN)
166 TMP_PROGS = $(OBJ)\snprintf-test.exe $(OBJ)\resolve-test.exe
171 $(OBJ)\base64-test.exe \
172 $(OBJ)\getaddrinfo-test.exe \
173 $(OBJ)\getifaddrs-test.exe \
174 $(OBJ)\hex-test.exe \
175 $(OBJ)\test-readenv.exe \
176 $(OBJ)\parse_bytes-test.exe \
177 $(OBJ)\parse_reply-test.exe \
178 $(OBJ)\parse_time-test.exe \
179 $(OBJ)\snprintf-test.exe \
180 $(OBJ)\strpftime-test.exe \
181 $(OBJ)\dirent-test.exe \
182 $(OBJ)\test-mini_inetd.exe
184 $(OBJ)\strftime_test.obj: strftime.c
185 $(C2OBJ) -DTEST_SNPRINTF -DTEST_STRPFTIME -DBUILD_ROKEN_LIB
187 $(OBJ)\strptime_test.obj: strptime.c
188 $(C2OBJ) -DTEST_SNPRINTF -DTEST_STRPFTIME -DBUILD_ROKEN_LIB
190 $(OBJ)\snprintf_test.obj: snprintf.c
191 $(C2OBJ) -DTEST_SNPRINTF -DTEST_STRPFTIME -DBUILD_ROKEN_LIB
193 $(OBJ)\libtest.lib: $(OBJ)\strftime_test.obj $(OBJ)\strptime_test.obj $(OBJ)\snprintf_test.obj
196 $(OBJ)\parse_reply-test.obj: parse_reply-test.c
197 $(C2OBJ) -DTEST_RESOLVE -DBUILD_ROKEN_LIB
199 $(OBJ)\resolve_test.obj: resolve.c
200 $(C2OBJ) -DTEST_RESOLVE -DBUILD_ROKEN_LIB
202 $(OBJ)\parse_reply-test.exe: $(OBJ)\parse_reply-test.obj $(OBJ)\resolve_test.obj $(LIBROKEN)
203 $(EXECONLINK) DnsAPI.lib
205 $(OBJ)\test-readenv.exe: $(OBJ)\test-readenv.obj $(OBJ)\test-mem.obj $(LIBROKEN)
208 $(OBJ)\parse_time-test.exe: $(OBJ)\parse_time-test.obj $(OBJ)\test-mem.obj $(LIBROKEN)
211 $(OBJ)\strpftime-test.obj: strpftime-test.c
212 $(C2OBJ) -DTEST_STRPFTIME -DBUILD_ROKEN_LIB
214 $(OBJ)\strpftime-test.exe: $(OBJ)\strpftime-test.obj $(OBJ)\libtest.lib $(LIBROKEN)
217 $(OBJ)\snprintf-test.obj: snprintf-test.c
218 $(C2OBJ) -DTEST_SNPRINTF -DBUILD_ROKEN_LIB
220 $(OBJ)\snprintf-test.exe: $(OBJ)\snprintf-test.obj $(OBJ)\libtest.lib $(LIBROKEN)
223 $(OBJ)\resolve-test.exe: $(OBJ)\resolve-test.obj $(LIBROKEN)
224 $(EXECONLINK) DnsAPI.lib
226 $(OBJ)\base64-test.exe: $(OBJ)\base64-test.obj $(OBJ)\base64.obj
229 $(OBJ)\getaddrinfo-test.exe: $(OBJ)\getaddrinfo-test.obj $(LIBROKEN)
232 $(OBJ)\hex-test.exe: $(OBJ)\hex-test.obj $(LIBROKEN)
235 $(OBJ)\parse_bytes-test.exe: $(OBJ)\parse_bytes-test.obj $(LIBROKEN)
238 $(OBJ)\dirent-test.exe: $(OBJ)\dirent-test.obj $(LIBROKEN)
241 $(OBJ)\getifaddrs-test.exe: $(OBJ)\getifaddrs-test.obj $(LIBROKEN)
244 $(OBJ)\test-mini_inetd.exe: $(OBJ)\test-mini_inetd.obj $(LIBROKEN)
247 test-binaries: $(TEST_PROGS) $(TMP_PROGS)
259 # Need to rewrite this test:
260 # parse_reply-test.exe
266 test:: test-binaries test-run