summaryrefslogtreecommitdiffstats
path: root/test/internal/Makefile.win
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:11:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:11:38 +0000
commitbc7e963c37d9c8d1c854ac960df241cfa34e3dc5 (patch)
treeaa35d7414ce9f1326abf6f723f6dfa5b0aa08b1d /test/internal/Makefile.win
parentInitial commit. (diff)
downloadapr-bc7e963c37d9c8d1c854ac960df241cfa34e3dc5.tar.xz
apr-bc7e963c37d9c8d1c854ac960df241cfa34e3dc5.zip
Adding upstream version 1.7.2.upstream/1.7.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/internal/Makefile.win')
-rw-r--r--test/internal/Makefile.win109
1 files changed, 109 insertions, 0 deletions
diff --git a/test/internal/Makefile.win b/test/internal/Makefile.win
new file mode 100644
index 0000000..a881f07
--- /dev/null
+++ b/test/internal/Makefile.win
@@ -0,0 +1,109 @@
+# PROGRAMS includes all test programs built on this platform.
+# STDTEST_PORTABLE
+# test programs invoked via standard user interface, run on all platforms
+# STDTEST_NONPORTABLE
+# test programs invoked via standard user interface, not portable
+# OTHER_PROGRAMS
+# programs such as sendfile, that have to be invoked in a special sequence
+# or with special parameters
+
+!IFNDEF MODEL
+MODEL=dynamic
+!ENDIF
+
+INCDIR=../../include
+
+!IFNDEF OUTDIR
+!IF "$(MODEL)" == "static"
+OUTDIR=LibR
+!ELSE
+OUTDIR=Release
+!ENDIF
+
+!IF [$(COMSPEC) /c cl /nologo /? | find "x64" >NUL ] == 0
+OUTDIR=x64\$(OUTDIR)
+!ENDIF
+!ENDIF
+
+!IF !EXIST("$(OUTDIR)\.")
+!IF ([$(COMSPEC) /C mkdir $(OUTDIR)] == 0)
+!ENDIF
+!ENDIF
+
+!IFNDEF INTDIR
+INTDIR=$(OUTDIR)
+!ELSE
+!IF !EXIST("$(INTDIR)\.")
+!IF ([$(COMSPEC) /C mkdir $(INTDIR)] == 0)
+!ENDIF
+!ENDIF
+!ENDIF
+
+!MESSAGE Building tests into $(OUTDIR) for $(MODEL)
+
+NONPORTABLE = \
+ $(OUTDIR)\testucs.exe
+
+CLEAN_BUILDDIRS = Release Debug 9x x64
+
+PROGRAMS =
+
+TARGETS = $(PROGRAMS) $(NONPORTABLE)
+
+# bring in rules.mk for standard functionality
+ALL: $(TARGETS)
+
+CL = cl.exe
+LD = link.exe
+
+!IF "$(MODEL)" == "static"
+LOCAL_LIB= ..\..\$(OUTDIR)\apr-1.lib
+STATIC_CFLAGS = /D APR_DECLARE_STATIC
+!ELSE
+LOCAL_LIB= ..\..\$(OUTDIR)\libapr-1.lib
+STATIC_CFLAGS =
+!ENDIF
+
+!IFDEF _DEBUG
+DEBUG_CFLAGS = /MDd
+!ELSE
+DEBUG_CFLAGS = /MD
+!ENDIF
+
+INCLUDES=/I "$(INCDIR)"
+
+CFLAGS = /nologo /c /W3 /Gm /EHsc /Zi /Od $(INCLUDES) \
+ $(STATIC_CFLAGS) $(DEBUG_CFLAGS) /D "BINPATH=$(OUTDIR:\=/)" \
+ /D _DEBUG /D WIN32 /Fo"$(INTDIR)/" /FD
+
+LD_LIBS = kernel32.lib advapi32.lib ws2_32.lib wsock32.lib \
+ ole32.lib shell32.lib rpcrt4.lib
+
+LDFLAGS = /nologo /debug /subsystem:console /incremental:no
+SHLDFLAGS = /nologo /dll /debug /subsystem:windows /incremental:no
+
+.c{$(INTDIR)}.obj:
+ $(CL) $(CFLAGS) -c $< -Fd$(INTDIR)\ $(INCLUDES)
+
+$(OUTDIR)\testucs.exe: $(INTDIR)\testucs.obj $(LOCAL_LIB)
+ $(LD) $(LDFLAGS) /out:"$@" $** $(LD_LIBS)
+ @if exist "$@.manifest" \
+ mt.exe -manifest "$@.manifest" -outputresource:$@;1
+
+
+clean:
+ @if EXIST $(INTDIR)\. rmdir /s /q $(INTDIR)
+ @if EXIST $(OUTDIR)\. rmdir /s /q $(OUTDIR)
+
+cleanall:
+ @for %d in ($(CLEAN_BUILDDIRS)) do @if EXIST %d\. rmdir /s /q %d
+
+
+PATH=$(OUTDIR);..\..\$(OUTDIR);$(PATH)
+
+check: $(NONPORTABLE)
+ @for %p in ($(NONPORTABLE)) do @( \
+ echo Testing %p && %p || echo %p failed \
+ )
+
+# DO NOT REMOVE