2
0

Makefile.win 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. # STDTEST_NONPORTABLE
  5. # test programs invoked via standard user interface, not portable
  6. # OTHER_PROGRAMS
  7. # programs such as sendfile, that have to be invoked in a special sequence
  8. # or with special parameters
  9. STDTEST_PORTABLE = \
  10. testlockperf.exe \
  11. testshmproducer.exe \
  12. testshmconsumer.exe \
  13. testmutexscope.exe \
  14. testall.exe
  15. OTHER_PROGRAMS = sendfile.exe
  16. PROGRAMS = $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE) $(OTHER_PROGRAMS)
  17. TARGETS = $(PROGRAMS)
  18. # bring in rules.mk for standard functionality
  19. ALL: $(TARGETS)
  20. CL = cl.exe
  21. CFLAGS = /nologo /c /MDd /W3 /Gm /EHsc /Zi /Od /D _DEBUG /D WIN32 /D APR_DECLARE_STATIC /FD
  22. .c.obj::
  23. $(CL) -c $< $(CFLAGS) $(INCLUDES)
  24. LOCAL_LIBS= ../LibD/apr-1.lib
  25. ALL_LIBS= kernel32.lib user32.lib advapi32.lib Rpcrt4.lib ws2_32.lib wsock32.lib ole32.lib
  26. CLEAN_TARGETS = testfile.tmp mod_test.dll proc_child.exe occhild.exe \
  27. readchild.exe tryread.exe sockchild.exe \
  28. globalmutexchild.exe lfstests/large.bin \
  29. data/testputs.txt data/testbigfprintf.dat data/testwritev.txt \
  30. data/testwritev_full.txt
  31. CLEAN_SUBDIRS = internal
  32. INCDIR=../include
  33. INCLUDES=/I "$(INCDIR)"
  34. # link programs using -no-install to get real executables not
  35. # libtool wrapper scripts which link an executable when first run.
  36. LINK_PROG = link.exe /nologo /debug /subsystem:console /incremental:no
  37. LINK_LIB = link.exe /nologo /dll /debug /subsystem:windows /incremental:no
  38. check: $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE)
  39. for prog in $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE); do \
  40. ./$$prog; \
  41. if test $$? = 255; then \
  42. echo "$$prog failed"; \
  43. break; \
  44. fi; \
  45. done
  46. occhild.exe: occhild.obj $(LOCAL_LIBS)
  47. $(LINK_PROG) occhild.obj $(LOCAL_LIBS) $(ALL_LIBS)
  48. sockchild.exe: sockchild.obj $(LOCAL_LIBS)
  49. $(LINK_PROG) sockchild.obj $(LOCAL_LIBS) $(ALL_LIBS)
  50. readchild.exe: readchild.obj $(LOCAL_LIBS)
  51. $(LINK_PROG) readchild.obj $(LOCAL_LIBS) $(ALL_LIBS)
  52. globalmutexchild.exe: globalmutexchild.obj $(LOCAL_LIBS)
  53. $(LINK_PROG) globalmutexchild.obj $(LOCAL_LIBS) $(ALL_LIBS)
  54. tryread.exe: tryread.obj $(LOCAL_LIBS)
  55. $(LINK_PROG) tryread.obj $(LOCAL_LIBS) $(ALL_LIBS)
  56. proc_child.exe: proc_child.obj $(LOCAL_LIBS)
  57. $(LINK_PROG) proc_child.obj $(LOCAL_LIBS) $(ALL_LIBS)
  58. # FIXME: -prefer-pic is only supported with libtool-1.4+
  59. mod_test.dll: mod_test.obj
  60. $(LINK_LIB) mod_test.obj /export:print_hello /export:count_reps $(LOCAL_LIBS) $(ALL_LIBS)
  61. testlockperf.exe: testlockperf.obj $(LOCAL_LIBS)
  62. $(LINK_PROG) testlockperf.obj $(LOCAL_LIBS) $(ALL_LIBS)
  63. sendfile.exe: sendfile.obj $(LOCAL_LIBS)
  64. $(LINK_PROG) sendfile.obj $(LOCAL_LIBS) $(ALL_LIBS)
  65. testshmproducer.exe: testshmproducer.obj $(LOCAL_LIBS)
  66. $(LINK_PROG) testshmproducer.obj $(LOCAL_LIBS) $(ALL_LIBS)
  67. testshmconsumer.exe: testshmconsumer.obj $(LOCAL_LIBS)
  68. $(LINK_PROG) testshmconsumer.obj $(LOCAL_LIBS) $(ALL_LIBS)
  69. testprocmutex.exe: testprocmutex.obj $(LOCAL_LIBS)
  70. $(LINK_PROG) testprocmutex.obj $(LOCAL_LIBS) $(ALL_LIBS)
  71. testmutexscope.exe: testmutexscope.obj $(LOCAL_LIBS)
  72. $(LINK_PROG) testmutexscope.obj $(LOCAL_LIBS) $(ALL_LIBS)
  73. TESTS = testutil.obj testtime.obj teststr.obj testvsn.obj testipsub.obj \
  74. testmmap.obj testud.obj testtable.obj testsleep.obj testpools.obj \
  75. testfmt.obj testfile.obj testdir.obj testfileinfo.obj testrand.obj \
  76. testdso.obj testoc.obj testdup.obj testsockets.obj testproc.obj \
  77. testpoll.obj testlock.obj testsockopt.obj testpipe.obj testthread.obj \
  78. testhash.obj testargs.obj testnames.obj testuser.obj testpath.obj \
  79. testenv.obj testprocmutex.obj testrand2.obj testfnmatch.obj \
  80. testatomic.obj testflock.obj testshm.obj testsock.obj testglobalmutex.obj \
  81. teststrnatcmp.obj testfilecopy.obj testtemp.obj testlfs.obj
  82. testall.exe: $(TESTS) mod_test.dll occhild.exe \
  83. readchild.exe abts.obj proc_child.exe \
  84. tryread.exe sockchild.exe globalmutexchild.exe \
  85. $(LOCAL_LIBS)
  86. $(LINK_PROG) /out:testall.exe $(TESTS) abts.obj $(LOCAL_LIBS) $(ALL_LIBS)
  87. # DO NOT REMOVE