Skip to content

Commit eec5638

Browse files
author
Ognjen Sobajic
committed
Making makefiles run faster by creating object files for each cpp file in test/Functional/http/clien and /listener
1 parent c252ac1 commit eec5638

File tree

3 files changed

+50
-40
lines changed

3 files changed

+50
-40
lines changed

Release/src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ SOURCES = \
55
json/json.cpp \
66
utilities/asyncrt_utils.cpp \
77
pplx/linux/pplxlinux.cpp \
8-
pplx/pplx.cpp \
8+
pplx/pplx.cpp \
99
pplx/threadpool.cpp \
1010
http/uri/uri.cpp \
1111
http/uri/uri_builder.cpp \

Release/tests/Functional/http/client/Makefile

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,36 @@ CXXFLAGS=$(LAX_BASE_CXXFLAGS) \
55
-I$(CASABLANCA_TESTS_DIR)/Common/UnitTestpp/ \
66
-I$(CASABLANCA_TESTS_DIR)/Common/utilities/include/ \
77
-include stdafx.h
8-
LDFLAGS=-L$(CASABLANCA_TESTS_DIR)/Common/UnitTestpp/lib/linux_gcc/ -L"$(OUTPUT_DIR)" $(BASE_LDFLAGS)
8+
LDFLAGS=-L$(CASABLANCA_TESTS_DIR)/Common/UnitTestpp/lib/linux_gcc/ -L"$(OUTPUT_DIR)" $(BASE_LDFLAGS)
99
LDLIBS=-lhttptest_utilities -lcommon_utilities -lcasablanca -lunittestpp -lboost_system -lboost_thread -lpthread
1010

1111
OUTPUT_DIR?=./$(MODE)
1212

13-
$(OUTPUT_DIR)/httpclient_test.so: \
14-
authentication_tests.cpp \
15-
building_request_tests.cpp \
16-
client_construction.cpp \
17-
connections_and_errors.cpp \
18-
header_tests.cpp \
19-
http_client_tests.cpp \
20-
http_methods_tests.cpp \
21-
multiple_requests.cpp \
22-
outside_tests.cpp \
23-
pipeline_stage_tests.cpp \
24-
progress_handler_tests.cpp \
25-
proxy_tests.cpp \
26-
request_helper_tests.cpp \
27-
request_stream_tests.cpp \
28-
request_uri_tests.cpp \
29-
response_extract_tests.cpp \
30-
response_stream_tests.cpp \
31-
status_code_reason_phrase_tests.cpp \
32-
to_string_tests.cpp
33-
$(CXX) -fPIC -shared $(CXXFLAGS) $(shell pkg-config libxml++-2.6 --cflags) $(LDFLAGS) $^ $(LDLIBS) -o $@
13+
FILENAMES = \
14+
authentication_tests \
15+
building_request_tests \
16+
client_construction \
17+
connections_and_errors \
18+
header_tests \
19+
http_client_tests \
20+
http_methods_tests \
21+
multiple_requests \
22+
outside_tests \
23+
pipeline_stage_tests \
24+
progress_handler_tests \
25+
proxy_tests \
26+
request_helper_tests \
27+
request_stream_tests \
28+
request_uri_tests \
29+
response_extract_tests \
30+
response_stream_tests \
31+
status_code_reason_phrase_tests \
32+
to_string_tests
3433

34+
OBJECTS = $(addsuffix .$(MODE).o, $(FILENAMES))
3535

36+
$(OUTPUT_DIR)/httpclient_test.so: $(OBJECTS)
37+
$(CXX) -fPIC -shared $(CXXFLAGS) $(shell pkg-config libxml++-2.6 --cflags) $(LDFLAGS) $^ $(LDLIBS) -o $@
38+
39+
$(OBJECTS): %.$(MODE).o: %.cpp
40+
$(CXX) $(CXXFLAGS) -c $< -o $@

Release/tests/Functional/http/listener/Makefile

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,27 @@ LDLIBS=-lhttptest_utilities -lcommon_utilities -lcasablanca -lunittestpp -lboost
44

55
OUTPUT_DIR?=./$(MODE)
66

7-
$(OUTPUT_DIR)/httplistener_test.so: \
8-
building_response_tests.cpp \
9-
connections_and_errors.cpp \
10-
header_tests.cpp \
11-
listener_construction_tests.cpp \
12-
pipeline_stage_tests.cpp \
13-
reply_helper_tests.cpp \
14-
request_extract_tests.cpp \
15-
request_handler_tests.cpp \
16-
request_relative_uri_tests.cpp \
17-
request_stream_tests.cpp \
18-
requests_tests.cpp \
19-
response_stream_tests.cpp \
20-
status_code_reason_phrase_tests.cpp \
21-
to_string_tests.cpp \
22-
stdafx.cpp
23-
$(CXX) -fPIC -shared $(CXXFLAGS) $(shell pkg-config libxml++-2.6 --cflags) $(LDFLAGS) $^ $(LDLIBS) -o $@
7+
FILENAMES = \
8+
building_response_tests \
9+
connections_and_errors \
10+
header_tests \
11+
listener_construction_tests \
12+
pipeline_stage_tests \
13+
reply_helper_tests \
14+
request_extract_tests \
15+
request_handler_tests \
16+
request_relative_uri_tests \
17+
request_stream_tests \
18+
requests_tests \
19+
response_stream_tests \
20+
status_code_reason_phrase_tests \
21+
to_string_tests \
22+
stdafx
2423

24+
OBJECTS = $(addsuffix .$(MODE).o, $(FILENAMES))
2525

26+
$(OUTPUT_DIR)/httplistener_test.so: $(OBJECTS)
27+
$(CXX) -fPIC -shared $(CXXFLAGS) $(shell pkg-config libxml++-2.6 --cflags) $(LDFLAGS) $^ $(LDLIBS) -o $@
28+
29+
$(OBJECTS): %.$(MODE).o: %.cpp
30+
$(CXX) $(CXXFLAGS) -c $< -o $@

0 commit comments

Comments
 (0)