blob: d5a842afb0d0fd7309687326f9e178b9863d6bfc [file] [log] [blame]
COMMON_CXXFLAGS = -nologo -GR -EHsc -I. -I../../../include
!ifdef CXXLATEST
STD_CXXFLAGS = -std:c++latest
!endif
!ifdef WARNINGS
WARNINGS_CXXFLAGS = -W4 -wd4512 -wd4447
!endif
!ifdef STATICRTL
! ifdef DEBUG
DEBUG_CXXFLAGS = -Zi -MTd
! else
DEBUG_CXXFLAGS = -O2 -MT
! endif
!else
! ifdef DEBUG
DEBUG_CXXFLAGS = -Zi -MDd
! else
DEBUG_CXXFLAGS = -O2 -MD
! endif
!endif
!ifdef UNICODE
UNICODE_CXXFLAGS = -DUNICODE -D_UNICODE
!endif
!ifdef TRACKING
TRACKING_CXXFLAGS = -DASIO_ENABLE_HANDLER_TRACKING
!endif
!ifndef _WIN32_WINNT
! ifdef STORE
_WIN32_WINNT=0x0603
! else
_WIN32_WINNT=0x0601
! endif
!endif
!ifdef WIN9X
DEFINES = \
-DASIO_DISABLE_IOCP \
-D_WIN32_WINNT=$(_WIN32_WINNT) \
-DBOOST_ALL_NO_LIB \
-DBOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
!else
! ifdef STORE
DEFINES = \
-DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP \
-DBOOST_ALL_NO_LIB -D_WIN32_WINNT=$(_WIN32_WINNT) \
-DUNICODE -D_UNICODE \
-DBOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
! else
! ifdef WINRT
DEFINES = \
-ZW -FI SDKDDKVer.h -FI winapifamily.h -DWINAPI_FAMILY=WINAPI_PARTITION_APP \
-DBOOST_ALL_NO_LIB \
-DBOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
! else
DEFINES = \
-D_WIN32_WINNT=$(_WIN32_WINNT) \
-DBOOST_ALL_NO_LIB \
-DBOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
! endif
! endif
!endif
!ifdef STANDALONE
STANDALONE_CXXFLAGS = -DASIO_STANDALONE
!else
STANDALONE_CXXFLAGS = -I$(BOOSTDIR) -DASIO_ENABLE_BOOST
!endif
CXXFLAGS = \
$(COMMON_CXXFLAGS) \
$(STD_CXXFLAGS) \
$(WARNINGS_CXXFLAGS) \
$(DEBUG_CXXFLAGS) \
$(UNICODE_CXXFLAGS) \
$(TRACKING_CXXFLAGS) \
$(STANDALONE_CXXFLAGS)
CPP03_TEST_EXES = \
cpp03\query_free.exe \
cpp03\query_member.exe \
cpp03\query_static.exe \
cpp03\can_query_free.exe \
cpp03\can_query_member.exe \
cpp03\can_query_static.exe \
cpp03\can_query_unsupported.exe \
cpp03\can_query_not_applicable_free.exe \
cpp03\can_query_not_applicable_member.exe \
cpp03\can_query_not_applicable_static.exe \
cpp03\can_query_not_applicable_unsupported.exe \
cpp03\require_concept_free.exe \
cpp03\require_concept_member.exe \
cpp03\require_concept_static.exe \
cpp03\can_require_concept_free.exe \
cpp03\can_require_concept_member.exe \
cpp03\can_require_concept_static.exe \
cpp03\can_require_concept_unsupported.exe \
cpp03\can_require_concept_not_applicable_free.exe \
cpp03\can_require_concept_not_applicable_member.exe \
cpp03\can_require_concept_not_applicable_static.exe \
cpp03\can_require_concept_not_applicable_unsupported.exe \
cpp03\require_free.exe \
cpp03\require_member.exe \
cpp03\require_static.exe \
cpp03\can_require_free.exe \
cpp03\can_require_member.exe \
cpp03\can_require_static.exe \
cpp03\can_require_unsupported.exe \
cpp03\can_require_not_applicable_free.exe \
cpp03\can_require_not_applicable_member.exe \
cpp03\can_require_not_applicable_static.exe \
cpp03\can_require_not_applicable_unsupported.exe \
cpp03\prefer_free_prefer.exe \
cpp03\prefer_member_prefer.exe \
cpp03\prefer_free_require.exe \
cpp03\prefer_member_require.exe \
cpp03\prefer_static.exe \
cpp03\prefer_unsupported.exe \
cpp03\can_prefer_free_prefer.exe \
cpp03\can_prefer_free_require.exe \
cpp03\can_prefer_member_prefer.exe \
cpp03\can_prefer_member_require.exe \
cpp03\can_prefer_static.exe \
cpp03\can_prefer_unsupported.exe \
cpp03\can_prefer_not_applicable_free_prefer.exe \
cpp03\can_prefer_not_applicable_free_require.exe \
cpp03\can_prefer_not_applicable_member_prefer.exe \
cpp03\can_prefer_not_applicable_member_require.exe \
cpp03\can_prefer_not_applicable_static.exe \
cpp03\can_prefer_not_applicable_unsupported.exe \
cpp03\can_prefer_not_preferable_free_prefer.exe \
cpp03\can_prefer_not_preferable_free_require.exe \
cpp03\can_prefer_not_preferable_member_prefer.exe \
cpp03\can_prefer_not_preferable_member_require.exe \
cpp03\can_prefer_not_preferable_static.exe \
cpp03\can_prefer_not_preferable_unsupported.exe
!ifdef CPP11
CPP11_TEST_EXES = \
cpp11\query_free.exe \
cpp11\query_member.exe \
cpp11\query_static.exe \
cpp11\can_query_free.exe \
cpp11\can_query_member.exe \
cpp11\can_query_static.exe \
cpp11\can_query_unsupported.exe \
cpp11\can_query_not_applicable_free.exe \
cpp11\can_query_not_applicable_member.exe \
cpp11\can_query_not_applicable_static.exe \
cpp11\can_query_not_applicable_unsupported.exe \
cpp11\require_concept_free.exe \
cpp11\require_concept_member.exe \
cpp11\require_concept_static.exe \
cpp11\can_require_concept_free.exe \
cpp11\can_require_concept_member.exe \
cpp11\can_require_concept_static.exe \
cpp11\can_require_concept_unsupported.exe \
cpp11\can_require_concept_not_applicable_free.exe \
cpp11\can_require_concept_not_applicable_member.exe \
cpp11\can_require_concept_not_applicable_static.exe \
cpp11\can_require_concept_not_applicable_unsupported.exe \
cpp11\require_free.exe \
cpp11\require_member.exe \
cpp11\require_static.exe \
cpp11\can_require_free.exe \
cpp11\can_require_member.exe \
cpp11\can_require_static.exe \
cpp11\can_require_unsupported.exe \
cpp11\can_require_not_applicable_free.exe \
cpp11\can_require_not_applicable_member.exe \
cpp11\can_require_not_applicable_static.exe \
cpp11\can_require_not_applicable_unsupported.exe \
cpp11\prefer_free_prefer.exe \
cpp11\prefer_member_prefer.exe \
cpp11\prefer_free_require.exe \
cpp11\prefer_member_require.exe \
cpp11\prefer_static.exe \
cpp11\prefer_unsupported.exe \
cpp11\can_prefer_free_prefer.exe \
cpp11\can_prefer_free_require.exe \
cpp11\can_prefer_member_prefer.exe \
cpp11\can_prefer_member_require.exe \
cpp11\can_prefer_static.exe \
cpp11\can_prefer_unsupported.exe \
cpp11\can_prefer_not_applicable_free_prefer.exe \
cpp11\can_prefer_not_applicable_free_require.exe \
cpp11\can_prefer_not_applicable_member_prefer.exe \
cpp11\can_prefer_not_applicable_member_require.exe \
cpp11\can_prefer_not_applicable_static.exe \
cpp11\can_prefer_not_applicable_unsupported.exe \
cpp11\can_prefer_not_preferable_free_prefer.exe \
cpp11\can_prefer_not_preferable_free_require.exe \
cpp11\can_prefer_not_preferable_member_prefer.exe \
cpp11\can_prefer_not_preferable_member_require.exe \
cpp11\can_prefer_not_preferable_static.exe \
cpp11\can_prefer_not_preferable_unsupported.exe
!endif
!ifdef CPP14
CPP14_TEST_EXES = \
cpp14\query_free.exe \
cpp14\query_member.exe \
cpp14\query_static.exe \
cpp14\can_query_free.exe \
cpp14\can_query_member.exe \
cpp14\can_query_static.exe \
cpp14\can_query_unsupported.exe \
cpp14\can_query_not_applicable_free.exe \
cpp14\can_query_not_applicable_member.exe \
cpp14\can_query_not_applicable_static.exe \
cpp14\can_query_not_applicable_unsupported.exe \
cpp14\require_concept_free.exe \
cpp14\require_concept_member.exe \
cpp14\require_concept_static.exe \
cpp14\can_require_concept_free.exe \
cpp14\can_require_concept_member.exe \
cpp14\can_require_concept_static.exe \
cpp14\can_require_concept_unsupported.exe \
cpp14\can_require_concept_not_applicable_free.exe \
cpp14\can_require_concept_not_applicable_member.exe \
cpp14\can_require_concept_not_applicable_static.exe \
cpp14\can_require_concept_not_applicable_unsupported.exe \
cpp14\require_free.exe \
cpp14\require_member.exe \
cpp14\require_static.exe \
cpp14\can_require_free.exe \
cpp14\can_require_member.exe \
cpp14\can_require_static.exe \
cpp14\can_require_unsupported.exe \
cpp14\can_require_not_applicable_free.exe \
cpp14\can_require_not_applicable_member.exe \
cpp14\can_require_not_applicable_static.exe \
cpp14\can_require_not_applicable_unsupported.exe \
cpp14\prefer_free_prefer.exe \
cpp14\prefer_member_prefer.exe \
cpp14\prefer_free_require.exe \
cpp14\prefer_member_require.exe \
cpp14\prefer_static.exe \
cpp14\prefer_unsupported.exe \
cpp14\can_prefer_free_prefer.exe \
cpp14\can_prefer_free_require.exe \
cpp14\can_prefer_member_prefer.exe \
cpp14\can_prefer_member_require.exe \
cpp14\can_prefer_static.exe \
cpp14\can_prefer_unsupported.exe \
cpp14\can_prefer_not_applicable_free_prefer.exe \
cpp14\can_prefer_not_applicable_free_require.exe \
cpp14\can_prefer_not_applicable_member_prefer.exe \
cpp14\can_prefer_not_applicable_member_require.exe \
cpp14\can_prefer_not_applicable_static.exe \
cpp14\can_prefer_not_applicable_unsupported.exe \
cpp14\can_prefer_not_preferable_free_prefer.exe \
cpp14\can_prefer_not_preferable_free_require.exe \
cpp14\can_prefer_not_preferable_member_prefer.exe \
cpp14\can_prefer_not_preferable_member_require.exe \
cpp14\can_prefer_not_preferable_static.exe \
cpp14\can_prefer_not_preferable_unsupported.exe
!endif
TEST_EXES = \
$(CPP03_TEST_EXES) \
$(CPP11_TEST_EXES) \
$(CPP14_TEST_EXES)
all: \
$(TEST_EXES)
check: $(TEST_EXES)
!@echo === Running $** === && $** && echo.
{cpp03}.cpp{cpp03}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
{cpp11}.cpp{cpp11}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
{cpp14}.cpp{cpp14}.exe:
cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< $(LIBS) -link -opt:ref
clean:
-del /q /s cpp03\*.exe
-del /q /s cpp03\*.exe.manifest
-del /q /s cpp03\*.exp
-del /q /s cpp03\*.ilk
-del /q /s cpp03\*.pdb
-del /q /s cpp03\*.obj
-del /q /s cpp11\*.exe
-del /q /s cpp11\*.exe.manifest
-del /q /s cpp11\*.exp
-del /q /s cpp11\*.ilk
-del /q /s cpp11\*.pdb
-del /q /s cpp11\*.obj
-del /q /s cpp14\*.exe
-del /q /s cpp14\*.exe.manifest
-del /q /s cpp14\*.exp
-del /q /s cpp14\*.ilk
-del /q /s cpp14\*.pdb
-del /q /s cpp14\*.obj
-del /q /s *.pdb