| !ifndef BOOSTDIR |
| BOOSTDIR = ../../boost_1_34_1 |
| !endif |
| |
| COMMON_CXXFLAGS = -nologo -EHac -GR -I. -I../include -I$(BOOSTDIR) |
| |
| !ifdef WARNINGS |
| WARNINGS_CXXFLAGS = -W4 -Wp64 |
| !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 |
| |
| !ifndef _WIN32_WINNT |
| _WIN32_WINNT=0x0501 |
| !endif |
| |
| !ifdef WIN9X |
| DEFINES = \ |
| -DASIO_DISABLE_IOCP \ |
| -D_WIN32_WINNT=$(_WIN32_WINNT) \ |
| -DBOOST_ALL_NO_LIB |
| !else |
| DEFINES = \ |
| -D_WIN32_WINNT=$(_WIN32_WINNT) \ |
| -DBOOST_ALL_NO_LIB |
| !endif |
| |
| CXXFLAGS = \ |
| $(COMMON_CXXFLAGS) \ |
| $(WARNINGS_CXXFLAGS) \ |
| $(DEBUG_CXXFLAGS) \ |
| $(UNICODE_CXXFLAGS) |
| |
| !ifndef SSLDIR |
| SSLDIR = ../../openssl-0.9.8g |
| !endif |
| |
| SSL_CXXFLAGS = -I$(SSLDIR)/inc32 |
| |
| SSL_LIBS = \ |
| $(SSLDIR)/out32/libeay32.lib \ |
| $(SSLDIR)/out32/ssleay32.lib \ |
| user32.lib advapi32.lib gdi32.lib |
| |
| PERFORMANCE_TEST_EXES = \ |
| tests\performance\client.exe \ |
| tests\performance\server.exe |
| |
| UNIT_TEST_EXES = \ |
| tests\unit\basic_datagram_socket.exe \ |
| tests\unit\basic_deadline_timer.exe \ |
| tests\unit\basic_serial_port.exe \ |
| tests\unit\basic_socket_acceptor.exe \ |
| tests\unit\basic_stream_socket.exe \ |
| tests\unit\buffered_read_stream.exe \ |
| tests\unit\buffered_stream.exe \ |
| tests\unit\buffered_write_stream.exe \ |
| tests\unit\buffer.exe \ |
| tests\unit\buffers_iterator.exe \ |
| tests\unit\completion_condition.exe \ |
| tests\unit\datagram_socket_service.exe \ |
| tests\unit\deadline_timer_service.exe \ |
| tests\unit\deadline_timer.exe \ |
| tests\unit\io_service.exe \ |
| tests\unit\error.exe \ |
| tests\unit\ip\address.exe \ |
| tests\unit\ip\address_v4.exe \ |
| tests\unit\ip\address_v6.exe \ |
| tests\unit\ip\basic_endpoint.exe \ |
| tests\unit\ip\basic_resolver.exe \ |
| tests\unit\ip\basic_resolver_entry.exe \ |
| tests\unit\ip\basic_resolver_iterator.exe \ |
| tests\unit\ip\basic_resolver_query.exe \ |
| tests\unit\ip\host_name.exe \ |
| tests\unit\ip\multicast.exe \ |
| tests\unit\ip\resolver_query_base.exe \ |
| tests\unit\ip\resolver_service.exe \ |
| tests\unit\ip\tcp.exe \ |
| tests\unit\ip\udp.exe \ |
| tests\unit\ip\unicast.exe \ |
| tests\unit\ip\v6_only.exe \ |
| tests\unit\is_read_buffered.exe \ |
| tests\unit\is_write_buffered.exe \ |
| tests\unit\placeholders.exe \ |
| tests\unit\read.exe \ |
| tests\unit\read_at.exe \ |
| tests\unit\read_until.exe \ |
| tests\unit\serial_port.exe \ |
| tests\unit\serial_port_base.exe \ |
| tests\unit\serial_port_service.exe \ |
| tests\unit\socket_acceptor_service.exe \ |
| tests\unit\socket_base.exe \ |
| tests\unit\strand.exe \ |
| tests\unit\stream_socket_service.exe \ |
| tests\unit\thread.exe \ |
| tests\unit\time_traits.exe \ |
| tests\unit\windows\basic_handle.exe \ |
| tests\unit\windows\basic_random_access_handle.exe \ |
| tests\unit\windows\basic_stream_handle.exe \ |
| tests\unit\windows\overlapped_ptr.exe \ |
| tests\unit\windows\random_access_handle.exe \ |
| tests\unit\windows\random_access_handle_service.exe \ |
| tests\unit\windows\stream_handle.exe \ |
| tests\unit\windows\stream_handle_service.exe \ |
| tests\unit\write.exe \ |
| tests\unit\write_at.exe |
| |
| EXAMPLE_EXES = \ |
| examples\allocation\server.exe \ |
| examples\buffers\reference_counted.exe \ |
| examples\chat\chat_client.exe \ |
| examples\chat\chat_server.exe \ |
| examples\echo\async_tcp_echo_server.exe \ |
| examples\echo\async_udp_echo_server.exe \ |
| examples\echo\blocking_tcp_echo_client.exe \ |
| examples\echo\blocking_tcp_echo_server.exe \ |
| examples\echo\blocking_udp_echo_client.exe \ |
| examples\echo\blocking_udp_echo_server.exe \ |
| examples\http\client\async_client.exe \ |
| examples\http\client\sync_client.exe \ |
| examples\http\server\http_server.exe \ |
| examples\http\server2\http_server.exe \ |
| examples\http\server3\http_server.exe \ |
| examples\icmp\ping.exe \ |
| examples\invocation\prioritised_handlers.exe \ |
| examples\iostreams\daytime_client.exe \ |
| examples\iostreams\daytime_server.exe \ |
| examples\multicast\receiver.exe \ |
| examples\multicast\sender.exe \ |
| examples\services\daytime_client.exe \ |
| examples\socks4\sync_client.exe \ |
| examples\timeouts\accept_timeout.exe \ |
| examples\timeouts\connect_timeout.exe \ |
| examples\timeouts\datagram_receive_timeout.exe \ |
| examples\timeouts\stream_receive_timeout.exe \ |
| examples\timers\tick_count_timer.exe \ |
| examples\timers\time_t_timer.exe \ |
| examples\tutorial\timer1\timer.exe \ |
| examples\tutorial\timer2\timer.exe \ |
| examples\tutorial\timer3\timer.exe \ |
| examples\tutorial\timer4\timer.exe \ |
| examples\tutorial\timer5\timer.exe \ |
| examples\tutorial\daytime1\client.exe \ |
| examples\tutorial\daytime2\server.exe \ |
| examples\tutorial\daytime3\server.exe \ |
| examples\tutorial\daytime4\client.exe \ |
| examples\tutorial\daytime5\server.exe \ |
| examples\tutorial\daytime6\server.exe \ |
| examples\tutorial\daytime7\server.exe \ |
| examples\windows\transmit_file.exe |
| |
| SSL_UNIT_TEST_EXES = \ |
| tests\unit\ssl\basic_context.exe \ |
| tests\unit\ssl\context.exe \ |
| tests\unit\ssl\context_base.exe \ |
| tests\unit\ssl\context_service.exe \ |
| tests\unit\ssl\stream.exe \ |
| tests\unit\ssl\stream_base.exe \ |
| tests\unit\ssl\stream_service.exe |
| |
| SSL_EXAMPLE_EXES = \ |
| examples\ssl\client.exe \ |
| examples\ssl\server.exe |
| |
| all: \ |
| $(PERFORMANCE_TEST_EXES) \ |
| $(UNIT_TEST_EXES) \ |
| $(EXAMPLE_EXES) |
| |
| ssl: \ |
| $(SSL_UNIT_TEST_EXES) \ |
| $(SSL_EXAMPLE_EXES) |
| |
| check: $(UNIT_TEST_EXES) |
| !@echo === Running $** === && $** && echo. |
| |
| {tests\performance}.cpp{tests\performance}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {tests\unit}.cpp{tests\unit}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {tests\unit\ip}.cpp{tests\unit\ip}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {tests\unit\ssl}.cpp{tests\unit\ssl}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(SSL_CXXFLAGS) $(DEFINES) $< $(SSL_LIBS) -link -opt:ref |
| |
| {tests\unit\windows}.cpp{tests\unit\windows}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\allocation}.cpp{examples\allocation}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\buffers}.cpp{examples\buffers}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\chat}.cpp{examples\chat}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\echo}.cpp{examples\echo}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\http\client}.cpp{examples\http\client}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\icmp}.cpp{examples\icmp}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\invocation}.cpp{examples\invocation}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\iostreams}.cpp{examples\iostreams}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\multicast}.cpp{examples\multicast}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\socks4}.cpp{examples\socks4}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\ssl}.cpp{examples\ssl}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(SSL_CXXFLAGS) $(DEFINES) $< $(SSL_LIBS) -link -opt:ref |
| |
| {examples\timeouts}.cpp{examples\timeouts}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\timers}.cpp{examples\timers}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\tutorial\timer1}.cpp{examples\tutorial\timer1}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\tutorial\timer2}.cpp{examples\tutorial\timer2}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\tutorial\timer3}.cpp{examples\tutorial\timer3}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\tutorial\timer4}.cpp{examples\tutorial\timer4}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\tutorial\timer5}.cpp{examples\tutorial\timer5}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\tutorial\daytime1}.cpp{examples\tutorial\daytime1}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\tutorial\daytime2}.cpp{examples\tutorial\daytime2}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\tutorial\daytime3}.cpp{examples\tutorial\daytime3}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\tutorial\daytime4}.cpp{examples\tutorial\daytime4}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\tutorial\daytime5}.cpp{examples\tutorial\daytime5}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\tutorial\daytime6}.cpp{examples\tutorial\daytime6}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\tutorial\daytime7}.cpp{examples\tutorial\daytime7}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| {examples\windows}.cpp{examples\windows}.exe: |
| cl -Fe$@ -Fo$(<:.cpp=.obj) $(CXXFLAGS) $(DEFINES) $< -link -opt:ref |
| |
| examples\http\server\http_server.exe: \ |
| examples\http\server\connection.cpp \ |
| examples\http\server\connection_manager.cpp \ |
| examples\http\server\mime_types.cpp \ |
| examples\http\server\reply.cpp \ |
| examples\http\server\request_handler.cpp \ |
| examples\http\server\request_parser.cpp \ |
| examples\http\server\server.cpp \ |
| examples\http\server\win_main.cpp |
| cl -Fe$@ -Foexamples\http\server\ $(CXXFLAGS) $(DEFINES) $** -link -opt:ref |
| |
| examples\http\server2\http_server.exe: \ |
| examples\http\server2\connection.cpp \ |
| examples\http\server2\io_service_pool.cpp \ |
| examples\http\server2\mime_types.cpp \ |
| examples\http\server2\reply.cpp \ |
| examples\http\server2\request_handler.cpp \ |
| examples\http\server2\request_parser.cpp \ |
| examples\http\server2\server.cpp \ |
| examples\http\server2\win_main.cpp |
| cl -Fe$@ -Foexamples\http\server2\ $(CXXFLAGS) $(DEFINES) $** -link -opt:ref |
| |
| examples\http\server3\http_server.exe: \ |
| examples\http\server3\connection.cpp \ |
| examples\http\server3\mime_types.cpp \ |
| examples\http\server3\reply.cpp \ |
| examples\http\server3\request_handler.cpp \ |
| examples\http\server3\request_parser.cpp \ |
| examples\http\server3\server.cpp \ |
| examples\http\server3\win_main.cpp |
| cl -Fe$@ -Foexamples\http\server3\ $(CXXFLAGS) $(DEFINES) $** -link -opt:ref |
| |
| examples\services\daytime_client.exe: \ |
| examples\services\daytime_client.cpp \ |
| examples\services\logger_service.cpp |
| cl -Fe$@ -Foexamples\services\ $(CXXFLAGS) $(DEFINES) $** -link -opt:ref |
| |
| clean: |
| -del /q /s tests\*.exe |
| -del /q /s tests\*.exe.manifest |
| -del /q /s tests\*.exp |
| -del /q /s tests\*.ilk |
| -del /q /s tests\*.pdb |
| -del /q /s tests\*.obj |
| -del /q /s examples\*.exe |
| -del /q /s examples\*.exe.manifest |
| -del /q /s examples\*.exp |
| -del /q /s examples\*.ilk |
| -del /q /s examples\*.pdb |
| -del /q /s examples\*.obj |
| -del /q /s *.pdb |