Home | History | Annotate | Line # | Download | only in roken
NTMakefile revision 1.1.1.1.26.1
      1           1.1  elric ########################################################################
      2           1.1  elric #
      3           1.1  elric # Copyright (c) 2009, Secure Endpoints Inc.
      4           1.1  elric # All rights reserved.
      5           1.1  elric # 
      6           1.1  elric # Redistribution and use in source and binary forms, with or without
      7           1.1  elric # modification, are permitted provided that the following conditions
      8           1.1  elric # are met:
      9           1.1  elric # 
     10           1.1  elric # - Redistributions of source code must retain the above copyright
     11           1.1  elric #   notice, this list of conditions and the following disclaimer.
     12           1.1  elric # 
     13           1.1  elric # - Redistributions in binary form must reproduce the above copyright
     14           1.1  elric #   notice, this list of conditions and the following disclaimer in
     15           1.1  elric #   the documentation and/or other materials provided with the
     16           1.1  elric #   distribution.
     17           1.1  elric # 
     18           1.1  elric # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     19           1.1  elric # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     20           1.1  elric # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
     21           1.1  elric # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
     22           1.1  elric # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
     23           1.1  elric # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     24           1.1  elric # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
     25           1.1  elric # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
     26           1.1  elric # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     27           1.1  elric # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
     28           1.1  elric # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     29           1.1  elric # POSSIBILITY OF SUCH DAMAGE.
     30           1.1  elric # 
     31           1.1  elric 
     32           1.1  elric RELDIR=lib\roken
     33           1.1  elric 
     34           1.1  elric !include ../../windows/NTMakefile.w32
     35           1.1  elric 
     36           1.1  elric libroken_la_OBJS =			\
     37           1.1  elric 	$(OBJ)\base64.obj		\
     38           1.1  elric 	$(OBJ)\bswap.obj		\
     39           1.1  elric 	$(OBJ)\concat.obj		\
     40           1.1  elric 	$(OBJ)\cloexec.obj		\
     41           1.1  elric 	$(OBJ)\ct.obj			\
     42  1.1.1.1.26.1    snj 	$(OBJ)\detach.obj		\
     43           1.1  elric 	$(OBJ)\dirent.obj		\
     44           1.1  elric 	$(OBJ)\dlfcn_w32.obj		\
     45           1.1  elric 	$(OBJ)\dumpdata.obj		\
     46           1.1  elric 	$(OBJ)\ecalloc.obj		\
     47           1.1  elric 	$(OBJ)\emalloc.obj		\
     48           1.1  elric 	$(OBJ)\environment.obj		\
     49           1.1  elric 	$(OBJ)\eread.obj		\
     50           1.1  elric 	$(OBJ)\erealloc.obj		\
     51           1.1  elric 	$(OBJ)\err.obj			\
     52           1.1  elric 	$(OBJ)\errx.obj			\
     53           1.1  elric 	$(OBJ)\esetenv.obj		\
     54           1.1  elric 	$(OBJ)\estrdup.obj		\
     55           1.1  elric 	$(OBJ)\ewrite.obj		\
     56           1.1  elric 	$(OBJ)\flock.obj		\
     57           1.1  elric 	$(OBJ)\fnmatch.obj		\
     58           1.1  elric 	$(OBJ)\getaddrinfo_hostspec.obj	\
     59           1.1  elric 	$(OBJ)\get_default_username.obj	\
     60           1.1  elric 	$(OBJ)\get_window_size.obj	\
     61           1.1  elric 	$(OBJ)\getarg.obj		\
     62           1.1  elric 	$(OBJ)\getifaddrs_w32.obj	\
     63           1.1  elric 	$(OBJ)\getnameinfo_verified.obj	\
     64           1.1  elric 	$(OBJ)\getopt.obj		\
     65           1.1  elric 	$(OBJ)\getprogname.obj		\
     66           1.1  elric 	$(OBJ)\gettimeofday.obj		\
     67           1.1  elric 	$(OBJ)\hex.obj			\
     68           1.1  elric 	$(OBJ)\hostent_find_fqdn.obj	\
     69           1.1  elric 	$(OBJ)\inet_aton.obj		\
     70           1.1  elric 	$(OBJ)\issuid.obj		\
     71           1.1  elric 	$(OBJ)\localtime_r.obj		\
     72           1.1  elric 	$(OBJ)\lstat.obj		\
     73  1.1.1.1.26.1    snj 	$(OBJ)\memset_s.obj 		\
     74  1.1.1.1.26.1    snj 	$(OBJ)\mkdir.obj                \
     75           1.1  elric 	$(OBJ)\mini_inetd.obj		\
     76           1.1  elric 	$(OBJ)\mkstemp.obj		\
     77           1.1  elric 	$(OBJ)\net_read.obj		\
     78           1.1  elric 	$(OBJ)\net_write.obj		\
     79           1.1  elric 	$(OBJ)\parse_bytes.obj		\
     80           1.1  elric 	$(OBJ)\parse_time.obj		\
     81           1.1  elric 	$(OBJ)\parse_units.obj		\
     82           1.1  elric 	$(OBJ)\realloc.obj		\
     83           1.1  elric 	$(OBJ)\rename.obj		\
     84           1.1  elric 	$(OBJ)\resolve.obj		\
     85           1.1  elric 	$(OBJ)\rand.obj			\
     86           1.1  elric 	$(OBJ)\roken_gethostby.obj	\
     87           1.1  elric 	$(OBJ)\rtbl.obj			\
     88           1.1  elric 	$(OBJ)\sendmsg.obj		\
     89           1.1  elric 	$(OBJ)\setenv.obj		\
     90           1.1  elric 	$(OBJ)\setprogname.obj		\
     91           1.1  elric 	$(OBJ)\simple_exec_w32.obj	\
     92           1.1  elric 	$(OBJ)\sleep.obj		\
     93           1.1  elric 	$(OBJ)\snprintf.obj		\
     94           1.1  elric 	$(OBJ)\socket.obj		\
     95           1.1  elric 	$(OBJ)\sockstartup_w32.obj	\
     96           1.1  elric 	$(OBJ)\strcollect.obj		\
     97           1.1  elric 	$(OBJ)\strerror_r.obj		\
     98           1.1  elric 	$(OBJ)\strlcat.obj		\
     99           1.1  elric 	$(OBJ)\strlcpy.obj		\
    100  1.1.1.1.26.1    snj 	$(OBJ)\strndup.obj		\
    101           1.1  elric 	$(OBJ)\strpool.obj		\
    102           1.1  elric 	$(OBJ)\strptime.obj		\
    103           1.1  elric 	$(OBJ)\strsep.obj		\
    104           1.1  elric 	$(OBJ)\strsep_copy.obj		\
    105           1.1  elric 	$(OBJ)\strtok_r.obj		\
    106  1.1.1.1.26.1    snj 	$(OBJ)\strtoll.obj		\
    107  1.1.1.1.26.1    snj 	$(OBJ)\strtoull.obj		\
    108           1.1  elric 	$(OBJ)\syslogc.obj		\
    109           1.1  elric 	$(OBJ)\timegm.obj		\
    110           1.1  elric 	$(OBJ)\timeval.obj		\
    111           1.1  elric 	$(OBJ)\tm2time.obj		\
    112           1.1  elric 	$(OBJ)\tsearch.obj		\
    113           1.1  elric 	$(OBJ)\unvis.obj		\
    114           1.1  elric 	$(OBJ)\verr.obj			\
    115           1.1  elric 	$(OBJ)\verrx.obj		\
    116           1.1  elric 	$(OBJ)\vis.obj			\
    117           1.1  elric 	$(OBJ)\vwarn.obj		\
    118           1.1  elric 	$(OBJ)\vwarnx.obj		\
    119           1.1  elric 	$(OBJ)\warn.obj			\
    120           1.1  elric 	$(OBJ)\warnerr.obj		\
    121           1.1  elric 	$(OBJ)\warnx.obj		\
    122  1.1.1.1.26.1    snj         $(OBJ)\win32_alloc.obj          \
    123  1.1.1.1.26.1    snj 	$(OBJ)\writev.obj               \
    124           1.1  elric 	$(OBJ)\xfree.obj
    125           1.1  elric 
    126           1.1  elric !if $(NMAKE_WINVER) < 0x0600
    127           1.1  elric libroken_la_OBJS=$(libroken_la_OBJS) \
    128           1.1  elric 	$(OBJ)\inet_ntop.obj		\
    129           1.1  elric 	$(OBJ)\inet_pton.obj
    130           1.1  elric !endif
    131           1.1  elric 
    132           1.1  elric {}.c{$(OBJ)}.obj::
    133           1.1  elric 	$(C2OBJ_P) -DBUILD_ROKEN_LIB
    134           1.1  elric 
    135           1.1  elric $(LIBROKEN): $(libroken_la_OBJS)
    136           1.1  elric 	$(LIBCON_C) -out:$@ @<<
    137           1.1  elric $(**: =
    138           1.1  elric )
    139           1.1  elric <<
    140           1.1  elric 
    141           1.1  elric $(OBJ)\make-roken.exe: $(OBJ)\make-roken.obj
    142           1.1  elric 	$(EXECONLINK)
    143           1.1  elric 
    144           1.1  elric $(OBJ)\make-roken.c: roken.h.in roken.awk $(INCDIR)\config.h
    145           1.1  elric 	$(AWK) -f roken.awk roken.h.in > $(OBJ)\make-roken.c || $(RM) $(OBJ)\make-roken.c
    146           1.1  elric 
    147           1.1  elric $(INCDIR)\roken.h: $(OBJ)\make-roken.exe
    148           1.1  elric 	$(OBJ)\make-roken.exe > $@ || $(RM) $@
    149           1.1  elric 
    150           1.1  elric INCFILES = 			\
    151           1.1  elric 	$(INCDIR)\base64.h	\
    152           1.1  elric 	$(INCDIR)\dirent.h	\
    153           1.1  elric 	$(INCDIR)\dlfcn.h	\
    154           1.1  elric 	$(INCDIR)\err.h		\
    155           1.1  elric 	$(INCDIR)\fnmatch.h	\
    156           1.1  elric 	$(INCDIR)\getarg.h	\
    157           1.1  elric 	$(INCDIR)\glob.h	\
    158           1.1  elric 	$(INCDIR)\hex.h		\
    159           1.1  elric 	$(INCDIR)\ifaddrs.h	\
    160           1.1  elric 	$(INCDIR)\parse_bytes.h	\
    161           1.1  elric 	$(INCDIR)\parse_time.h	\
    162           1.1  elric 	$(INCDIR)\parse_units.h	\
    163           1.1  elric 	$(INCDIR)\resolve.h	\
    164           1.1  elric 	$(INCDIR)\roken.h	\
    165           1.1  elric 	$(INCDIR)\roken-common.h	\
    166           1.1  elric 	$(INCDIR)\rtbl.h	\
    167           1.1  elric 	$(INCDIR)\search.h	\
    168           1.1  elric 	$(INCDIR)\stdbool.h	\
    169           1.1  elric 	$(INCDIR)\syslog.h	\
    170           1.1  elric 	$(INCDIR)\vis.h		\
    171  1.1.1.1.26.1    snj !ifndef HAVE_STDINT_H
    172  1.1.1.1.26.1    snj 	$(INCDIR)\stdint.h	\
    173  1.1.1.1.26.1    snj !endif
    174           1.1  elric 	$(INCDIR)\xdbm.h
    175           1.1  elric 
    176           1.1  elric clean::
    177           1.1  elric 	-$(RM) $(XHEADERS)
    178           1.1  elric 
    179           1.1  elric all:: $(INCFILES) $(LIBROKEN)
    180           1.1  elric 
    181           1.1  elric clean::
    182           1.1  elric 	-$(RM) $(LIBROKEN)
    183           1.1  elric 
    184           1.1  elric TMP_PROGS = $(OBJ)\snprintf-test.exe $(OBJ)\resolve-test.exe
    185           1.1  elric 
    186           1.1  elric # Tests
    187           1.1  elric 
    188           1.1  elric TEST_PROGS =			    \
    189           1.1  elric 	$(OBJ)\base64-test.exe	    \
    190           1.1  elric 	$(OBJ)\getaddrinfo-test.exe \
    191           1.1  elric 	$(OBJ)\getifaddrs-test.exe  \
    192           1.1  elric 	$(OBJ)\hex-test.exe	    \
    193  1.1.1.1.26.1    snj 	$(OBJ)\test-detach.exe	    \
    194           1.1  elric 	$(OBJ)\test-readenv.exe	    \
    195           1.1  elric 	$(OBJ)\parse_bytes-test.exe \
    196           1.1  elric 	$(OBJ)\parse_reply-test.exe \
    197           1.1  elric 	$(OBJ)\parse_time-test.exe  \
    198           1.1  elric 	$(OBJ)\snprintf-test.exe    \
    199           1.1  elric 	$(OBJ)\strpftime-test.exe   \
    200           1.1  elric 	$(OBJ)\dirent-test.exe	    \
    201           1.1  elric 	$(OBJ)\test-mini_inetd.exe
    202           1.1  elric 
    203           1.1  elric $(OBJ)\strftime_test.obj: strftime.c
    204           1.1  elric 	$(C2OBJ) -DTEST_SNPRINTF -DTEST_STRPFTIME -DBUILD_ROKEN_LIB
    205           1.1  elric 
    206           1.1  elric $(OBJ)\strptime_test.obj: strptime.c
    207           1.1  elric 	$(C2OBJ) -DTEST_SNPRINTF -DTEST_STRPFTIME -DBUILD_ROKEN_LIB
    208           1.1  elric 
    209           1.1  elric $(OBJ)\snprintf_test.obj: snprintf.c
    210           1.1  elric 	$(C2OBJ) -DTEST_SNPRINTF -DTEST_STRPFTIME -DBUILD_ROKEN_LIB
    211           1.1  elric 
    212           1.1  elric $(OBJ)\libtest.lib: $(OBJ)\strftime_test.obj $(OBJ)\strptime_test.obj $(OBJ)\snprintf_test.obj
    213           1.1  elric 	$(LIBCON)
    214           1.1  elric 
    215           1.1  elric $(OBJ)\parse_reply-test.obj: parse_reply-test.c
    216           1.1  elric 	$(C2OBJ) -DTEST_RESOLVE -DBUILD_ROKEN_LIB
    217           1.1  elric 
    218           1.1  elric $(OBJ)\resolve_test.obj: resolve.c
    219           1.1  elric 	$(C2OBJ) -DTEST_RESOLVE -DBUILD_ROKEN_LIB
    220           1.1  elric 
    221           1.1  elric $(OBJ)\parse_reply-test.exe: $(OBJ)\parse_reply-test.obj $(OBJ)\resolve_test.obj $(LIBROKEN)
    222           1.1  elric 	$(EXECONLINK) DnsAPI.lib
    223           1.1  elric 
    224           1.1  elric $(OBJ)\test-readenv.exe: $(OBJ)\test-readenv.obj $(OBJ)\test-mem.obj $(LIBROKEN)
    225           1.1  elric 	$(EXECONLINK)
    226           1.1  elric 
    227           1.1  elric $(OBJ)\parse_time-test.exe: $(OBJ)\parse_time-test.obj $(OBJ)\test-mem.obj $(LIBROKEN)
    228           1.1  elric 	$(EXECONLINK)
    229           1.1  elric 
    230           1.1  elric $(OBJ)\strpftime-test.obj: strpftime-test.c
    231           1.1  elric 	$(C2OBJ) -DTEST_STRPFTIME -DBUILD_ROKEN_LIB
    232           1.1  elric 
    233           1.1  elric $(OBJ)\strpftime-test.exe: $(OBJ)\strpftime-test.obj $(OBJ)\libtest.lib $(LIBROKEN)
    234           1.1  elric 	$(EXECONLINK)
    235           1.1  elric 
    236           1.1  elric $(OBJ)\snprintf-test.obj: snprintf-test.c
    237           1.1  elric 	$(C2OBJ) -DTEST_SNPRINTF -DBUILD_ROKEN_LIB
    238           1.1  elric 
    239           1.1  elric $(OBJ)\snprintf-test.exe: $(OBJ)\snprintf-test.obj $(OBJ)\libtest.lib $(LIBROKEN)
    240           1.1  elric 	$(EXECONLINK)
    241           1.1  elric 
    242           1.1  elric $(OBJ)\resolve-test.exe: $(OBJ)\resolve-test.obj $(LIBROKEN)
    243           1.1  elric 	$(EXECONLINK) DnsAPI.lib
    244           1.1  elric 
    245  1.1.1.1.26.1    snj $(OBJ)\base64-test.exe: $(OBJ)\base64-test.obj $(OBJ)\base64.obj $(LIBROKEN)
    246           1.1  elric 	$(EXECONLINK)
    247           1.1  elric 
    248           1.1  elric $(OBJ)\getaddrinfo-test.exe: $(OBJ)\getaddrinfo-test.obj $(LIBROKEN)
    249           1.1  elric 	$(EXECONLINK)
    250           1.1  elric 
    251           1.1  elric $(OBJ)\hex-test.exe: $(OBJ)\hex-test.obj $(LIBROKEN)
    252           1.1  elric 	$(EXECONLINK)
    253           1.1  elric 
    254           1.1  elric $(OBJ)\parse_bytes-test.exe: $(OBJ)\parse_bytes-test.obj $(LIBROKEN)
    255           1.1  elric 	$(EXECONLINK)
    256           1.1  elric 
    257  1.1.1.1.26.1    snj $(OBJ)\test-detach.exe: $(OBJ)\test-detach.obj $(OBJ)\detach.obj $(LIBROKEN)
    258  1.1.1.1.26.1    snj 	$(EXECONLINK)
    259  1.1.1.1.26.1    snj 
    260           1.1  elric $(OBJ)\dirent-test.exe: $(OBJ)\dirent-test.obj $(LIBROKEN)
    261           1.1  elric 	$(EXECONLINK)
    262           1.1  elric 
    263           1.1  elric $(OBJ)\getifaddrs-test.exe: $(OBJ)\getifaddrs-test.obj $(LIBROKEN)
    264           1.1  elric 	$(EXECONLINK)
    265           1.1  elric 
    266           1.1  elric $(OBJ)\test-mini_inetd.exe: $(OBJ)\test-mini_inetd.obj $(LIBROKEN)
    267           1.1  elric 	$(EXECONLINK)
    268           1.1  elric 
    269           1.1  elric test-binaries: $(TEST_PROGS) $(TMP_PROGS)
    270           1.1  elric 
    271           1.1  elric test-run:
    272           1.1  elric 	cd $(OBJ)
    273  1.1.1.1.26.1    snj 	-test-mini_inetd.exe
    274  1.1.1.1.26.1    snj 	-dirent-test.exe
    275  1.1.1.1.26.1    snj 	-base64-test.exe
    276  1.1.1.1.26.1    snj 	-getaddrinfo-test.exe
    277  1.1.1.1.26.1    snj 	-getifaddrs-test.exe
    278  1.1.1.1.26.1    snj 	-hex-test.exe
    279  1.1.1.1.26.1    snj 	-test-readenv.exe
    280  1.1.1.1.26.1    snj 	-parse_bytes-test.exe
    281           1.1  elric # Need to rewrite this test:
    282  1.1.1.1.26.1    snj #	-parse_reply-test.exe
    283  1.1.1.1.26.1    snj 	-parse_time-test.exe
    284  1.1.1.1.26.1    snj 	-snprintf-test.exe
    285  1.1.1.1.26.1    snj 	-strpftime-test.exe
    286           1.1  elric 	cd $(SRCDIR)
    287           1.1  elric 
    288           1.1  elric test:: test-binaries test-run
    289           1.1  elric 
    290