diff --git a/test/Makefile b/test/Makefile index 49420478..48765211 100644 --- a/test/Makefile +++ b/test/Makefile @@ -4,7 +4,7 @@ PROJECT_DIR := $(realpath $(CUR_DIR)/../) # Dependencies: need to be compiled but not to run by any Makefile target TEST_DEPS := dev_null # Tests: need to be compiled and run by test-% target -TESTS := empty argv hello_world malloc file getpid spawn pipe time truncate readdir mkdir link tls pthread uname rlimit client server server_epoll unix_socket +TESTS := empty argv hello_world malloc file getpid spawn pipe time truncate readdir mkdir link tls pthread uname rlimit client server server_epoll unix_socket cout # Benchmarks: need to be compiled and run by bench-% target BENCHES := spawn_and_exit_latency pipe_throughput unix_socket_throughput diff --git a/test/cout/Makefile b/test/cout/Makefile new file mode 100644 index 00000000..0f7fea76 --- /dev/null +++ b/test/cout/Makefile @@ -0,0 +1,5 @@ +include ../test_common.mk + +EXTRA_C_FLAGS := +EXTRA_LINK_FLAGS := +BIN_ARGS := diff --git a/test/cout/main.cc b/test/cout/main.cc new file mode 100644 index 00000000..cb6ad8a5 --- /dev/null +++ b/test/cout/main.cc @@ -0,0 +1,5 @@ +#include +int main(){ + std::cout<< "hello world" < $(READELF_FILE) @echo "READELF => $@" -$(BIN_NAME): $(C_OBJS) - @$(CC) $^ $(LINK_FLAGS) -o $(BIN_NAME) +$(BIN_NAME): $(C_OBJS) $(CXX_OBJS) + @$(CXX) $^ $(LINK_FLAGS) -o $(BIN_NAME) @echo "LINK => $@" $(C_OBJS): %.o: %.c @$(CC) $(C_FLAGS) -c $< -o $@ @echo "CC <= $@" +$(CXX_OBJS): %.o: %.cc + @$(CXX) $(C_FLAGS) -c $< -o $@ + @echo "CXX <= $@" + ############################################################################# # Test #############################################################################