summaryrefslogtreecommitdiff
path: root/tests/Makefile
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2012-08-30 23:31:39 +0200
committerThomas Schwinge <thomas@codesourcery.com>2012-08-30 23:31:39 +0200
commit16a92d2765c5732abb64742cb5d387148e0ac629 (patch)
treeabbbadbf54f87eed25f71a312e43ce7f7cb7adfe /tests/Makefile
parent9a231435f830c459c0e214c2b99877e2ed6edb56 (diff)
parent0096579c8bea920f7c42b40ea22db621da6480a5 (diff)
Merge commit 'refs/top-bases/t/fix_inline' into t/fix_inlinet/fix_inline
Conflicts: sysdeps/l4/hurd/pt-sysdep.h
Diffstat (limited to 'tests/Makefile')
-rw-r--r--tests/Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 9509c95..7177ad1 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,17 +1,28 @@
+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-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 $(CFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS)
+ $(CC) -static $(INSTALL_ROOT_LDFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS)
check: $(CHECK_OBJS) $(CHECK_PROGS)
for i in $(CHECK_PROGS); do \