"Fossies" - the Fresh Open Source Software Archive

Member "apr-1.7.0/test/Makefile.win" (26 Mar 2019, 8552 Bytes) of package /linux/www/apr-1.7.0.tar.bz2:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "Makefile.win": 1.6.5_vs_1.7.0.

    1 # PROGRAMS includes all test programs built on this platform.
    2 # STDTEST_PORTABLE
    3 #   test programs invoked via standard user interface, run on all platforms
    4 # TESTS
    5 #   test modules invoked through the abts suite (./testall)
    6 # STDTEST_NONPORTABLE
    7 #   test programs invoked via standard user interface, not portable
    8 # OTHER_PROGRAMS
    9 #   programs such as sendfile, that have to be invoked in a special sequence
   10 #   or with special parameters
   11 # TESTALL_COMPONENTS
   12 #   programs such as globalmutexchild which the various TESTS will invoke
   13 #   to validate process creation, pipes, dso mechanisms and so forth
   14 
   15 # Windows Specific;
   16 # MODEL
   17 #   dynamic or static - refers to which set of bindings are desired
   18 #   and controls which libraries (apr-1 or libapr-1) will be linked.
   19 # OUTDIR
   20 #   the library path of the libraries, and also the path within test/
   21 #   where all of the tests for that library will be built
   22 
   23 !IFNDEF MODEL
   24 MODEL=dynamic
   25 !ENDIF
   26 
   27 INCDIR=../include
   28 
   29 !IFNDEF OUTDIR
   30 !IF "$(MODEL)" == "static"
   31 OUTDIR=LibR
   32 !ELSE
   33 OUTDIR=Release
   34 !ENDIF
   35 
   36 !IF [$(COMSPEC) /c cl /nologo /? \
   37 	| $(SystemRoot)\System32\find.exe "x64" >NUL ] == 0
   38 OUTDIR=x64\$(OUTDIR)
   39 !ENDIF
   40 !ENDIF
   41 
   42 !IF !EXIST("$(OUTDIR)\.")
   43 !IF ([$(COMSPEC) /C mkdir $(OUTDIR)] == 0)
   44 !ENDIF
   45 !ENDIF
   46 
   47 !IFNDEF INTDIR
   48 INTDIR=$(OUTDIR)
   49 !ELSE
   50 !IF !EXIST("$(INTDIR)\.")
   51 !IF ([$(COMSPEC) /C mkdir $(INTDIR)] == 0)
   52 !ENDIF
   53 !ENDIF
   54 !ENDIF
   55 
   56 !MESSAGE Building tests into $(OUTDIR) for $(MODEL)
   57 
   58 STDTEST_PORTABLE = \
   59 	$(OUTDIR)\testapp.exe \
   60 	$(OUTDIR)\testall.exe \
   61 	$(OUTDIR)\testlockperf.exe \
   62 	$(OUTDIR)\testmutexscope.exe
   63 
   64 OTHER_PROGRAMS = \
   65 	$(OUTDIR)\echod.exe \
   66 	$(OUTDIR)\sendfile.exe \
   67 	$(OUTDIR)\sockperf.exe
   68 
   69 TESTALL_COMPONENTS = \
   70 	$(OUTDIR)\mod_test.dll \
   71 	$(OUTDIR)\occhild.exe \
   72 	$(OUTDIR)\readchild.exe \
   73 	$(OUTDIR)\proc_child.exe \
   74         $(OUTDIR)\tryread.exe \
   75 	$(OUTDIR)\sockchild.exe \
   76 	$(OUTDIR)\testshmproducer.exe \
   77 	$(OUTDIR)\testshmconsumer.exe \
   78 	$(OUTDIR)\globalmutexchild.exe
   79 
   80 ALL_TESTS = $(INTDIR)\testutil.obj $(INTDIR)\testtime.obj \
   81 	$(INTDIR)\teststr.obj $(INTDIR)\testvsn.obj \
   82 	$(INTDIR)\testipsub.obj $(INTDIR)\testmmap.obj \
   83 	$(INTDIR)\testud.obj $(INTDIR)\testtable.obj \
   84 	$(INTDIR)\testsleep.obj $(INTDIR)\testpools.obj \
   85 	$(INTDIR)\testfmt.obj $(INTDIR)\testfile.obj \
   86 	$(INTDIR)\testdir.obj $(INTDIR)\testfileinfo.obj \
   87 	$(INTDIR)\testrand.obj $(INTDIR)\testdso.obj \
   88 	$(INTDIR)\testoc.obj $(INTDIR)\testdup.obj \
   89 	$(INTDIR)\testsockets.obj $(INTDIR)\testproc.obj \
   90 	$(INTDIR)\testpoll.obj $(INTDIR)\testlock.obj \
   91 	$(INTDIR)\testsockopt.obj $(INTDIR)\testpipe.obj \
   92 	$(INTDIR)\testthread.obj $(INTDIR)\testhash.obj \
   93 	$(INTDIR)\testargs.obj $(INTDIR)\testnames.obj \
   94 	$(INTDIR)\testuser.obj $(INTDIR)\testpath.obj \
   95 	$(INTDIR)\testenv.obj $(INTDIR)\testprocmutex.obj \
   96 	$(INTDIR)\testfnmatch.obj $(INTDIR)\testatomic.obj \
   97 	$(INTDIR)\testflock.obj $(INTDIR)\testshm.obj \
   98 	$(INTDIR)\testsock.obj $(INTDIR)\testglobalmutex.obj \
   99 	$(INTDIR)\teststrnatcmp.obj $(INTDIR)\testfilecopy.obj \
  100 	$(INTDIR)\testtemp.obj $(INTDIR)\testlfs.obj \
  101 	$(INTDIR)\testcond.obj $(INTDIR)\testescape.obj \
  102 	$(INTDIR)\testskiplist.obj $(INTDIR)\testencode.obj
  103 
  104 CLEAN_DATA = testfile.tmp lfstests\large.bin \
  105 	data\testputs.txt data\testbigfprintf.dat \
  106 	data\testwritev.txt data\testwritev_full.txt \
  107 	data\testflush.dat data\testxthread.dat \
  108 	data\apr.testshm.shm lfstests\buffer.bin
  109 
  110 CLEAN_BUILDDIRS = Debug Release LibD LibR 9x x64
  111 
  112 TEST_SUBDIRS = internal
  113 
  114 PROGRAMS = $(TESTALL_COMPONENTS) $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE) \
  115 	$(OTHER_PROGRAMS)
  116 
  117 TARGETS = $(PROGRAMS)
  118 
  119 # bring in rules.mk for standard functionality
  120 ALL: $(TARGETS)
  121 
  122 CL = cl.exe
  123 LD = link.exe 
  124 
  125 !IF "$(MODEL)" == "static"
  126 LOCAL_LIB= ..\$(OUTDIR)\apr-1.lib 
  127 APP_LIB= ..\$(OUTDIR)\aprapp-1.lib 
  128 STATIC_CFLAGS = /D APR_DECLARE_STATIC
  129 !ELSE
  130 LOCAL_LIB= ..\$(OUTDIR)\libapr-1.lib 
  131 APP_LIB= ..\$(OUTDIR)\libaprapp-1.lib 
  132 STATIC_CFLAGS = 
  133 !ENDIF
  134 
  135 !IFDEF _DEBUG
  136 DEBUG_CFLAGS = /MDd
  137 !ELSE
  138 DEBUG_CFLAGS = /MD 
  139 !ENDIF
  140 
  141 INCLUDES=/I "$(INCDIR)" /I "$(INCDIR)/private"
  142 
  143 CFLAGS = /nologo /c /W3 /Gm /EHsc /Zi /Od $(INCLUDES) \
  144 	 $(STATIC_CFLAGS) $(DEBUG_CFLAGS) /D "BINPATH=$(OUTDIR:\=/)" \
  145 	 /D _DEBUG /D WIN32 /Fo"$(INTDIR)/" /FD
  146 
  147 LD_LIBS = kernel32.lib advapi32.lib ws2_32.lib wsock32.lib \
  148 	  ole32.lib shell32.lib rpcrt4.lib
  149 
  150 LDFLAGS = /nologo /debug /subsystem:console /incremental:no 
  151 SHLDFLAGS = /nologo /dll /debug /subsystem:windows /incremental:no
  152 
  153 .c{$(INTDIR)}.obj::
  154 	$(CL) $(CFLAGS) -c $< -Fd$(INTDIR)\ $(INCLUDES)
  155 
  156 # STDTEST_PORTABLE;
  157 
  158 $(OUTDIR)\testall.exe: $(ALL_TESTS) $(INTDIR)\abts.obj $(LOCAL_LIB)
  159 	$(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
  160 	@if exist "$@.manifest" \
  161 	    mt.exe -manifest "$@.manifest" -outputresource:$@;1
  162 
  163 $(OUTDIR)\testapp.exe: $(INTDIR)/testapp.obj $(LOCAL_LIB) $(APP_LIB) 
  164 	$(LD) $(LDFLAGS) /entry:wmainCRTStartup /out:"$@" $** $(LD_LIBS)
  165 	@if exist "$@.manifest" \
  166 	    mt.exe -manifest "$@.manifest" -outputresource:$@;2
  167 
  168 $(OUTDIR)\testlockperf.exe: $(INTDIR)\testlockperf.obj $(LOCAL_LIB)
  169 	$(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
  170 	@if exist "$@.manifest" \
  171 	    mt.exe -manifest "$@.manifest" -outputresource:$@;1
  172 
  173 $(OUTDIR)\testmutexscope.exe: $(INTDIR)\testmutexscope.obj $(LOCAL_LIB)
  174 	$(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
  175 	@if exist "$@.manifest" \
  176 	    mt.exe -manifest "$@.manifest" -outputresource:$@;1
  177 
  178 # OTHER_PROGRAMS;
  179 
  180 $(OUTDIR)\echod.exe: $(INTDIR)\echod.obj $(LOCAL_LIB)
  181 	$(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
  182 	@if exist "$@.manifest" \
  183 	    mt.exe -manifest "$@.manifest" -outputresource:$@;1
  184 
  185 $(OUTDIR)\sendfile.exe: $(INTDIR)\sendfile.obj $(LOCAL_LIB)
  186 	$(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
  187 	@if exist "$@.manifest" \
  188 	    mt.exe -manifest "$@.manifest" -outputresource:$@;1
  189 
  190 $(OUTDIR)\sockperf.exe: $(INTDIR)\sockperf.obj $(LOCAL_LIB)
  191 	$(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
  192 	@if exist "$@.manifest" \
  193 	    mt.exe -manifest "$@.manifest" -outputresource:$@;1
  194 
  195 # TESTALL_COMPONENTS;
  196 
  197 $(OUTDIR)\globalmutexchild.exe: $(INTDIR)\globalmutexchild.obj $(LOCAL_LIB)
  198 	$(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
  199 	@if exist "$@.manifest" \
  200 	    mt.exe -manifest "$@.manifest" -outputresource:$@;1
  201 
  202 $(OUTDIR)\mod_test.dll: $(INTDIR)/mod_test.obj $(LOCAL_LIB) 
  203 	$(LD) $(SHLDFLAGS) /out:"$@" $** \
  204 	       /export:print_hello /export:count_reps $(LD_LIBS)
  205 	@if exist "$@.manifest" \
  206 	    mt.exe -manifest "$@.manifest" -outputresource:$@;2
  207 
  208 $(OUTDIR)\occhild.exe: $(INTDIR)\occhild.obj $(LOCAL_LIB)
  209 	$(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
  210 	@if exist "$@.manifest" \
  211 	    mt.exe -manifest "$@.manifest" -outputresource:$@;1
  212 
  213 $(OUTDIR)\proc_child.exe: $(INTDIR)\proc_child.obj $(LOCAL_LIB)
  214 	$(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
  215 	@if exist "$@.manifest" \
  216 	    mt.exe -manifest "$@.manifest" -outputresource:$@;1
  217 
  218 $(OUTDIR)\readchild.exe: $(INTDIR)\readchild.obj $(LOCAL_LIB)
  219 	$(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
  220 	@if exist "$@.manifest" \
  221 	    mt.exe -manifest "$@.manifest" -outputresource:$@;1
  222 
  223 $(OUTDIR)\sockchild.exe: $(INTDIR)\sockchild.obj $(LOCAL_LIB)
  224 	$(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
  225 	@if exist "$@.manifest" \
  226 	    mt.exe -manifest "$@.manifest" -outputresource:$@;1
  227 
  228 $(OUTDIR)\testshmconsumer.exe: $(INTDIR)\testshmconsumer.obj $(LOCAL_LIB)
  229 	$(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
  230 	@if exist "$@.manifest" \
  231 	    mt.exe -manifest "$@.manifest" -outputresource:$@;1
  232 
  233 $(OUTDIR)\testshmproducer.exe: $(INTDIR)\testshmproducer.obj $(LOCAL_LIB)
  234 	$(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
  235 	@if exist "$@.manifest" \
  236 	    mt.exe -manifest "$@.manifest" -outputresource:$@;1
  237 
  238 $(OUTDIR)\tryread.exe: $(INTDIR)\tryread.obj $(LOCAL_LIB)
  239 	$(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
  240 	@if exist "$@.manifest" \
  241 	    mt.exe -manifest "$@.manifest" -outputresource:$@;1
  242 
  243 
  244 cleandata:
  245 	@for %f in ($(CLEAN_DATA)) do @if EXIST %f del /f %f
  246 
  247 clean: cleandata
  248 	@if EXIST $(INTDIR)\. rmdir /s /q $(INTDIR)
  249 	@if EXIST $(OUTDIR)\. rmdir /s /q $(OUTDIR)
  250 	@for %d in ($(TEST_SUBDIRS)) do \
  251 	    %COMSPEC% /c "cd %%d && $(MAKE) -f Makefile.win clean" \
  252 
  253 cleanall: 
  254 	@for %d in ($(CLEAN_BUILDDIRS) $(INTDIR) $(OUTDIR)) do \
  255 	    @if EXIST %d\. rmdir /s /q %d
  256 	@for %d in ($(TEST_SUBDIRS)) do \
  257 	    %COMSPEC% /c "cd %%d & $(MAKE) -f Makefile.win cleanall" \
  258 
  259 
  260 !IF "$(MODEL)" != "static"
  261 PATH=$(OUTDIR);..\$(OUTDIR);$(PATH)
  262 !ENDIF
  263 
  264 check: $(TESTALL_COMPONENTS) $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE)
  265 	@for %p in ($(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE)) do @( \
  266 	    echo Testing %p && %p -v || echo %p failed \
  267 	)
  268 
  269 checkall: check
  270 	@for %d in ($(TEST_SUBDIRS)) do \
  271 	    %COMSPEC% /c "cd %%d && $(MAKE) -f Makefile.win check" \
  272 
  273 # DO NOT REMOVE