This repository was archived by the owner on Jan 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathMakefile
50 lines (35 loc) · 1.39 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
all: stacklet.so
INC = -I../..
stacklet.so: stacklet.c stacklet.h
gcc ${INC} -fPIC -shared -O2 -o $@ stacklet.c
stacklet_g.so: stacklet.c stacklet.h
gcc ${INC} -fPIC -shared -g -o $@ stacklet.c -DDEBUG_DUMP
clean:
rm -fr stacklet.so stacklet_g.so
rm -fr run_tests_*_[go]
DEBUG = -DDEBUG_DUMP
tests: clean
make -j1 run-all-tests
ALL_TESTS = tests-static-g \
tests-static-o \
#tests-dynamic-g tests-dynamic-o
run-all-tests: $(ALL_TESTS)
@echo "*** All test suites passed ***"
tests-static-g: stacklet.c stacklet.h tests.c
gcc ${INC} -Wall -g -o run_tests_static_g stacklet.c tests.c ${DEBUG}
./run_tests_static_g
tests-static-o: stacklet.c stacklet.h tests.c
gcc ${INC} -Wall -g -O2 -o run_tests_static_o stacklet.c tests.c ${DEBUG}
./run_tests_static_o
tests-dynamic-g: stacklet_g.so tests.c
gcc ${INC} -Wall -g -o run_tests_dynamic_g stacklet_g.so tests.c ${DEBUG}
LD_LIBRARY_PATH=. ./run_tests_dynamic_g
tests-dynamic-o: stacklet.so tests.c
gcc ${INC} -Wall -g -O2 -o run_tests_dynamic_o stacklet.so tests.c ${DEBUG}
LD_LIBRARY_PATH=. ./run_tests_dynamic_o
tests-repeat: tests
python runtests.py run_tests_static_g > /dev/null
python runtests.py run_tests_static_o > /dev/null
#LD_LIBRARY_PATH=. python runtests.py run_tests_dynamic_g > /dev/null
#LD_LIBRARY_PATH=. python runtests.py run_tests_dynamic_o > /dev/null
@echo "*** All tests passed repeatedly ***"