1# PROGRAMS 2# test programs invoked via standard user interface, run on all platforms 3# ALL_TESTS 4# test modules invoked through the abts suite (./testall) 5# OTHER_PROGRAMS 6# programs such as sendfile, that have to be invoked in a special sequence 7# or with special parameters 8 9# Windows Specific; 10# MODEL 11# dynamic or static - refers to which set of bindings are desired 12# and controls which libraries (apr-1 or libapr-1) will be linked. 13# OUTDIR 14# the library path of the libraries, and also the path within test/ 15# where all of the tests for that library will be built 16# APROUTDIR 17# The library path of apr (if different from OUTDIR) 18# APR_PATH 19# relative or absolute path to locate apr libs and includes 20# API_PATH 21# relative or absolute path to locate apr-iconv libs and includes 22 23!IFNDEF MODEL 24MODEL=dynamic 25!ENDIF 26 27!IFNDEF OUTDIR 28!IF "$(MODEL)" == "static" 29OUTDIR=LibR 30!ELSE 31OUTDIR=Release 32!ENDIF 33 34!IF [$(COMSPEC) /c cl /nologo /? \ 35 | $(SystemRoot)\System32\find.exe "x64" >NUL ] == 0 36OUTDIR=x64\$(OUTDIR) 37!ENDIF 38!ENDIF 39 40!IF !EXIST("$(OUTDIR)\.") 41!IF ([$(COMSPEC) /C mkdir $(OUTDIR)] == 0) 42!ENDIF 43!ENDIF 44 45!IFNDEF INTDIR 46INTDIR=$(OUTDIR) 47!ELSE 48!IF !EXIST("$(INTDIR)\.") 49!IF ([$(COMSPEC) /C mkdir $(INTDIR)] == 0) 50!ENDIF 51!ENDIF 52!ENDIF 53 54!MESSAGE Building tests into $(OUTDIR) for $(MODEL) 55 56ALL_TESTS = $(INTDIR)\teststrmatch.obj $(INTDIR)\testuri.obj \ 57 $(INTDIR)\testuuid.obj $(INTDIR)\testutil.obj \ 58 $(INTDIR)\testbuckets.obj $(INTDIR)\testpass.obj \ 59 $(INTDIR)\testmd4.obj $(INTDIR)\testmd5.obj \ 60 $(INTDIR)\testldap.obj $(INTDIR)\testdbd.obj \ 61 $(INTDIR)\testdbm.obj $(INTDIR)\testreslist.obj \ 62 $(INTDIR)\testxml.obj $(INTDIR)\testqueue.obj \ 63 $(INTDIR)\testrmm.obj $(INTDIR)\testxlate.obj \ 64 $(INTDIR)\testdate.obj $(INTDIR)\testmemcache.obj \ 65 $(INTDIR)\testcrypto.obj 66 67CLEAN_DATA = manyfile.bin testfile.txt data\sqlite*.db 68 69CLEAN_BUILDDIRS = Debug Release LibD LibR 9x x64 70 71PROGRAMS = \ 72 $(OUTDIR)\testall.exe 73 74OTHER_PROGRAMS = \ 75 $(OUTDIR)\dbd.exe 76 77# bring in rules.mk for standard functionality 78ALL: $(PROGRAMS) $(OTHER_PROGRAMS) 79 80CL = cl.exe 81LD = link.exe 82 83APR_PATH = ..\..\apr 84API_PATH = ..\..\apr-iconv 85 86APROUTDIR=$(OUTDIR) 87 88!IF "$(MODEL)" == "static" 89PROGRAM_DEPENDENCIES = \ 90 $(APR_PATH)\$(APROUTDIR)\apr-1.lib \
| 1# PROGRAMS 2# test programs invoked via standard user interface, run on all platforms 3# ALL_TESTS 4# test modules invoked through the abts suite (./testall) 5# OTHER_PROGRAMS 6# programs such as sendfile, that have to be invoked in a special sequence 7# or with special parameters 8 9# Windows Specific; 10# MODEL 11# dynamic or static - refers to which set of bindings are desired 12# and controls which libraries (apr-1 or libapr-1) will be linked. 13# OUTDIR 14# the library path of the libraries, and also the path within test/ 15# where all of the tests for that library will be built 16# APROUTDIR 17# The library path of apr (if different from OUTDIR) 18# APR_PATH 19# relative or absolute path to locate apr libs and includes 20# API_PATH 21# relative or absolute path to locate apr-iconv libs and includes 22 23!IFNDEF MODEL 24MODEL=dynamic 25!ENDIF 26 27!IFNDEF OUTDIR 28!IF "$(MODEL)" == "static" 29OUTDIR=LibR 30!ELSE 31OUTDIR=Release 32!ENDIF 33 34!IF [$(COMSPEC) /c cl /nologo /? \ 35 | $(SystemRoot)\System32\find.exe "x64" >NUL ] == 0 36OUTDIR=x64\$(OUTDIR) 37!ENDIF 38!ENDIF 39 40!IF !EXIST("$(OUTDIR)\.") 41!IF ([$(COMSPEC) /C mkdir $(OUTDIR)] == 0) 42!ENDIF 43!ENDIF 44 45!IFNDEF INTDIR 46INTDIR=$(OUTDIR) 47!ELSE 48!IF !EXIST("$(INTDIR)\.") 49!IF ([$(COMSPEC) /C mkdir $(INTDIR)] == 0) 50!ENDIF 51!ENDIF 52!ENDIF 53 54!MESSAGE Building tests into $(OUTDIR) for $(MODEL) 55 56ALL_TESTS = $(INTDIR)\teststrmatch.obj $(INTDIR)\testuri.obj \ 57 $(INTDIR)\testuuid.obj $(INTDIR)\testutil.obj \ 58 $(INTDIR)\testbuckets.obj $(INTDIR)\testpass.obj \ 59 $(INTDIR)\testmd4.obj $(INTDIR)\testmd5.obj \ 60 $(INTDIR)\testldap.obj $(INTDIR)\testdbd.obj \ 61 $(INTDIR)\testdbm.obj $(INTDIR)\testreslist.obj \ 62 $(INTDIR)\testxml.obj $(INTDIR)\testqueue.obj \ 63 $(INTDIR)\testrmm.obj $(INTDIR)\testxlate.obj \ 64 $(INTDIR)\testdate.obj $(INTDIR)\testmemcache.obj \ 65 $(INTDIR)\testcrypto.obj 66 67CLEAN_DATA = manyfile.bin testfile.txt data\sqlite*.db 68 69CLEAN_BUILDDIRS = Debug Release LibD LibR 9x x64 70 71PROGRAMS = \ 72 $(OUTDIR)\testall.exe 73 74OTHER_PROGRAMS = \ 75 $(OUTDIR)\dbd.exe 76 77# bring in rules.mk for standard functionality 78ALL: $(PROGRAMS) $(OTHER_PROGRAMS) 79 80CL = cl.exe 81LD = link.exe 82 83APR_PATH = ..\..\apr 84API_PATH = ..\..\apr-iconv 85 86APROUTDIR=$(OUTDIR) 87 88!IF "$(MODEL)" == "static" 89PROGRAM_DEPENDENCIES = \ 90 $(APR_PATH)\$(APROUTDIR)\apr-1.lib \
|
91 ..\$(OUTDIR)\aprutil-1.lib 92STATIC_CFLAGS = /D APR_DECLARE_STATIC /D APU_DECLARE_STATIC 93STATIC_LIBS = odbc32.lib odbccp32.lib wldap32.lib 94!ELSE 95PROGRAM_DEPENDENCIES = \ 96 $(APR_PATH)\$(APROUTDIR)\libapr-1.lib \ 97 ..\$(OUTDIR)\libaprutil-1.lib 98STATIC_CFLAGS = 99# APR 1.3 doesn't fully abstract ldap_ calls to permit switching providers; 100STATIC_LIBS = wldap32.lib 101!ENDIF 102 103!IFDEF _DEBUG 104DEBUG_CFLAGS = /MDd 105!ELSE 106DEBUG_CFLAGS = /MD 107!ENDIF 108 109INCLUDES=/I "../include" /I "$(API_PATH)/include" /I "$(APR_PATH)/include" 110 111CFLAGS = /nologo /c /W3 /Gm /EHsc /Zi /Od $(INCLUDES) \ 112 $(STATIC_CFLAGS) $(DEBUG_CFLAGS) /D "BINPATH=$(OUTDIR:\=/)" \ 113 /D _DEBUG /D WIN32 /Fo"$(INTDIR)/" /FD 114 115LD_LIBS = kernel32.lib advapi32.lib ws2_32.lib wsock32.lib \ 116 ole32.lib shell32.lib rpcrt4.lib $(STATIC_LIBS) 117 118LDFLAGS = /nologo /debug /subsystem:console /incremental:no 119SHLDFLAGS = /nologo /dll /debug /subsystem:windows /incremental:no 120 121.c{$(INTDIR)}.obj:: 122 $(CL) $(CFLAGS) -c $< -Fd$(INTDIR)\ $(INCLUDES) 123 124# PROGRAMS; 125 126abts.c: abts.h abts_tests.h testutil.h 127 128testutil.c: abts.h abts_tests.h testutil.h 129 130$(OUTDIR)\testall.exe: $(ALL_TESTS) $(INTDIR)\abts.obj $(PROGRAM_DEPENDENCIES) 131 $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS) 132 @if exist "$@.manifest" \ 133 mt.exe -manifest "$@.manifest" -outputresource:$@;1 134 135# OTHER_PROGRAMS; 136 137$(OUTDIR)\dbd.exe: $(INTDIR)\dbd.obj $(PROGRAM_DEPENDENCIES) 138 $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS) 139 @if exist "$@.manifest" \ 140 mt.exe -manifest "$@.manifest" -outputresource:$@;1 141 142 143cleandata: 144 @for %f in ($(CLEAN_DATA)) do @if EXIST %f del /f %f 145 146clean: cleandata 147 @if EXIST $(INTDIR)\. rmdir /s /q $(INTDIR) 148 @if EXIST $(OUTDIR)\. rmdir /s /q $(OUTDIR) 149 150cleanall: 151 @for %d in ($(CLEAN_BUILDDIRS) $(INTDIR) $(OUTDIR)) do \ 152 @if EXIST %d\. rmdir /s /q %d 153 154 155!IF "$(MODEL)" != "static" 156PATH=$(OUTDIR);..\$(OUTDIR);..\ldap\$(OUTDIR);..\dbd\$(OUTDIR);$(API_PATH)\$(OUTDIR);$(APR_PATH)\$(APROUTDIR);$(PATH) 157!ENDIF 158APR_ICONV1_PATH=$(API_PATH)\$(OUTDIR)\iconv 159 160check: $(PROGRAMS) $(OTHER_PROGRAMS) 161 echo Testing dbd sqlite2 && $(OUTDIR)\dbd.exe sqlite2 || echo Failed 162 echo Testing dbd sqlite3 && $(OUTDIR)\dbd.exe sqlite3 || echo Failed 163 @for %p in ($(PROGRAMS)) do @( \ 164 echo Testing %p && %p -v || echo %p failed \ 165 ) 166 167checkall: check 168 169# DO NOT REMOVE
| 93 ..\$(OUTDIR)\aprutil-1.lib 94STATIC_CFLAGS = /D APR_DECLARE_STATIC /D APU_DECLARE_STATIC 95STATIC_LIBS = odbc32.lib odbccp32.lib wldap32.lib 96!ELSE 97PROGRAM_DEPENDENCIES = \ 98 $(APR_PATH)\$(APROUTDIR)\libapr-1.lib \ 99 ..\$(OUTDIR)\libaprutil-1.lib 100STATIC_CFLAGS = 101# APR 1.3 doesn't fully abstract ldap_ calls to permit switching providers; 102STATIC_LIBS = wldap32.lib 103!ENDIF 104 105!IFDEF _DEBUG 106DEBUG_CFLAGS = /MDd 107!ELSE 108DEBUG_CFLAGS = /MD 109!ENDIF 110 111INCLUDES=/I "../include" /I "$(API_PATH)/include" /I "$(APR_PATH)/include" 112 113CFLAGS = /nologo /c /W3 /Gm /EHsc /Zi /Od $(INCLUDES) \ 114 $(STATIC_CFLAGS) $(DEBUG_CFLAGS) /D "BINPATH=$(OUTDIR:\=/)" \ 115 /D _DEBUG /D WIN32 /Fo"$(INTDIR)/" /FD 116 117LD_LIBS = kernel32.lib advapi32.lib ws2_32.lib wsock32.lib \ 118 ole32.lib shell32.lib rpcrt4.lib $(STATIC_LIBS) 119 120LDFLAGS = /nologo /debug /subsystem:console /incremental:no 121SHLDFLAGS = /nologo /dll /debug /subsystem:windows /incremental:no 122 123.c{$(INTDIR)}.obj:: 124 $(CL) $(CFLAGS) -c $< -Fd$(INTDIR)\ $(INCLUDES) 125 126# PROGRAMS; 127 128abts.c: abts.h abts_tests.h testutil.h 129 130testutil.c: abts.h abts_tests.h testutil.h 131 132$(OUTDIR)\testall.exe: $(ALL_TESTS) $(INTDIR)\abts.obj $(PROGRAM_DEPENDENCIES) 133 $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS) 134 @if exist "$@.manifest" \ 135 mt.exe -manifest "$@.manifest" -outputresource:$@;1 136 137# OTHER_PROGRAMS; 138 139$(OUTDIR)\dbd.exe: $(INTDIR)\dbd.obj $(PROGRAM_DEPENDENCIES) 140 $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS) 141 @if exist "$@.manifest" \ 142 mt.exe -manifest "$@.manifest" -outputresource:$@;1 143 144 145cleandata: 146 @for %f in ($(CLEAN_DATA)) do @if EXIST %f del /f %f 147 148clean: cleandata 149 @if EXIST $(INTDIR)\. rmdir /s /q $(INTDIR) 150 @if EXIST $(OUTDIR)\. rmdir /s /q $(OUTDIR) 151 152cleanall: 153 @for %d in ($(CLEAN_BUILDDIRS) $(INTDIR) $(OUTDIR)) do \ 154 @if EXIST %d\. rmdir /s /q %d 155 156 157!IF "$(MODEL)" != "static" 158PATH=$(OUTDIR);..\$(OUTDIR);..\ldap\$(OUTDIR);..\dbd\$(OUTDIR);$(API_PATH)\$(OUTDIR);$(APR_PATH)\$(APROUTDIR);$(PATH) 159!ENDIF 160APR_ICONV1_PATH=$(API_PATH)\$(OUTDIR)\iconv 161 162check: $(PROGRAMS) $(OTHER_PROGRAMS) 163 echo Testing dbd sqlite2 && $(OUTDIR)\dbd.exe sqlite2 || echo Failed 164 echo Testing dbd sqlite3 && $(OUTDIR)\dbd.exe sqlite3 || echo Failed 165 @for %p in ($(PROGRAMS)) do @( \ 166 echo Testing %p && %p -v || echo %p failed \ 167 ) 168 169checkall: check 170 171# DO NOT REMOVE
|