summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/Makefile11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 9c2dede..d19e3d8 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,11 +1,8 @@
1MACHINE := $(shell uname -m) 1MACHINE := $(shell uname -m)
2_FORTIFY_SOURCE ?= 3 2_FORTIFY_SOURCE ?= 3
3CFLAGS ?= -std=gnu99 3CFLAGS ?= -std=gnu99
4CFLAGS += -I../include/ -D_FORTIFY_SOURCE=$(_FORTIFY_SOURCE) -static -O2 -Wall -Wextra -Werror -Werror=pointer-arith 4COMMON_FLAGS += -I../include/ -D_FORTIFY_SOURCE=$(_FORTIFY_SOURCE) -static -O2 -Wall -Wextra -Werror -Werror=pointer-arith
5CFLAGS += -Wno-format -Wno-array-bounds -Wno-shift-count-negative -Wno-unused-variable -Wno-unused-parameter 5COMMON_FLAGS += -Wno-format -Wno-array-bounds -Wno-shift-count-negative -Wno-unused-variable -Wno-unused-parameter
6CXXFLAGS += -D_FORTIFY_SOURCE=$(_FORTIFY_SOURCE) -O2
7CXXFLAGS += -Wno-format -Wno-array-bounds -Wno-shift-count-negative -Wno-unused-variable -Wno-unused-parameter
8
9 6
10RUNTIME_TARGETS= \ 7RUNTIME_TARGETS= \
11 test_FD_CLR_SETSIZE \ 8 test_FD_CLR_SETSIZE \
@@ -129,10 +126,10 @@ all: gcc
129 126
130 127
131$(RUNTIME_TARGETS): %: %.c 128$(RUNTIME_TARGETS): %: %.c
132 $(CC) $(CFLAGS) -o $@ $< 129 $(CC) $(COMMON_FLAGS) $(CFLAGS) -o $@ $<
133 130
134cpp: test_compile.cc 131cpp: test_compile.cc
135 $(CXX) $(CXXFLAGS) test_compile.cc -o ./test_compile_cc 132 $(CXX) $(COMMON_FLAGS) $(CXXFLAGS) test_compile.cc -o ./test_compile_cc
136 timeout 1s ./test_compile_cc 1234567890 2 3 4 5 6 7 8 9 0 >/dev/null && echo "$(EXE) OK" || echo "$(EXE) FAIL"; \ 133 timeout 1s ./test_compile_cc 1234567890 2 3 4 5 6 7 8 9 0 >/dev/null && echo "$(EXE) OK" || echo "$(EXE) FAIL"; \
137 134
138run: $(RUNTIME_TARGETS) 135run: $(RUNTIME_TARGETS)