diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 19:23:01 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 19:23:01 +0000 |
commit | 519f6620457d9f84d0125c0c7d01abebaae8efaa (patch) | |
tree | 28e2b20214b72aa7a633a5910dba7d2388620a78 /htl/tests/Makefile | |
parent | 74f331b3ccf81cf9404be03e62bde9efcc0878c2 (diff) | |
parent | 68e2fa8ed9dbf0edfdaed0310801e764c12af46e (diff) |
Merge commit 'refs/top-bases/t/libc_cleanup' into t/libc_cleanup
Diffstat (limited to 'htl/tests/Makefile')
-rw-r--r-- | htl/tests/Makefile | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/htl/tests/Makefile b/htl/tests/Makefile new file mode 100644 index 0000000000..7177ad181e --- /dev/null +++ b/htl/tests/Makefile @@ -0,0 +1,40 @@ +ifdef INSTALL_ROOT +INSTALL_ROOT_CPPFLAGS = -isystem $(INSTALL_ROOT)/include +INSTALL_ROOT_LDFLAGS = -L$(INSTALL_ROOT)/lib -Wl,-rpath,$(INSTALL_ROOT)/lib +endif + +CFLAGS=-Wall -g + +LDLIBS = -lpthread + +CHECK_SRC := test-1.c test-2.c test-3.c test-6.c test-7.c test-8.c \ + test-9.c test-10.c test-11.c test-12.c test-13.c test-14.c \ + test-15.c test-16.c test-17.c test-__pthread_destroy_specific-skip.c + +CHECK_OBJS := $(addsuffix .o,$(basename $(notdir $(CHECK_SRC)))) +CHECK_PROGS := $(basename $(notdir $(CHECK_SRC))) \ + $(addsuffix -static, $(basename $(CHECK_SRC))) + +%.o: %.c + $(CC) $(INSTALL_ROOT_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< -c -o $@ + +%: %.o + $(CC) $(INSTALL_ROOT_LDFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS) + +%-static: %.o + $(CC) -static $(INSTALL_ROOT_LDFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS) + +check: $(CHECK_OBJS) $(CHECK_PROGS) + for i in $(CHECK_PROGS); do \ + echo -n Running $$i...\ ; \ + if ./$$i 2>&1 > $$i.out; \ + then \ + echo Success.; \ + else \ + echo Failure.; \ + fi \ + done + +clean: + rm -f $(CHECK_OBJS) $(CHECK_PROGS) \ + $(addsuffix .out,$(basename $(notdir $(CHECK_PROGS))))
\ No newline at end of file |