]> git.ipfire.org Git - thirdparty/glibc.git/blob - htl/tests/Makefile
hurd: Add hurd thread library
[thirdparty/glibc.git] / htl / tests / Makefile
1 ifdef INSTALL_ROOT
2 INSTALL_ROOT_CPPFLAGS = -isystem $(INSTALL_ROOT)/include
3 INSTALL_ROOT_LDFLAGS = -L$(INSTALL_ROOT)/lib -Wl,-rpath,$(INSTALL_ROOT)/lib
4 endif
5
6 CFLAGS=-Wall -g
7
8 LDLIBS = -lpthread
9
10 CHECK_SRC := test-1.c test-2.c test-3.c test-6.c test-7.c test-8.c \
11 test-9.c test-10.c test-11.c test-12.c test-13.c test-14.c \
12 test-15.c test-16.c test-17.c test-__pthread_destroy_specific-skip.c
13
14 CHECK_OBJS := $(addsuffix .o,$(basename $(notdir $(CHECK_SRC))))
15 CHECK_PROGS := $(basename $(notdir $(CHECK_SRC))) \
16 $(addsuffix -static, $(basename $(CHECK_SRC)))
17
18 %.o: %.c
19 $(CC) $(INSTALL_ROOT_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< -c -o $@
20
21 %: %.o
22 $(CC) $(INSTALL_ROOT_LDFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS)
23
24 %-static: %.o
25 $(CC) -static $(INSTALL_ROOT_LDFLAGS) $(LDFLAGS) $< -o $@ $(LDLIBS)
26
27 check: $(CHECK_OBJS) $(CHECK_PROGS)
28 for i in $(CHECK_PROGS); do \
29 echo -n Running $$i...\ ; \
30 if ./$$i 2>&1 > $$i.out; \
31 then \
32 echo Success.; \
33 else \
34 echo Failure.; \
35 fi \
36 done
37
38 clean:
39 rm -f $(CHECK_OBJS) $(CHECK_PROGS) \
40 $(addsuffix .out,$(basename $(notdir $(CHECK_PROGS))))