split pthread test into several files
[libc-test] / src / functional / Makefile
index 6b8d61f..b7da7fe 100644 (file)
@@ -35,10 +35,11 @@ $(DSOOBJ): CFLAGS+=-fPIC
        $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS) || echo BUILDERROR $@
 
 dlopen: LDLIBS+=-ldl -rdynamic
-pthread pthread-static: LDLIBS+=-lpthread
+pthread%: LDLIBS+=-lpthread
 sem sem-static: LDLIBS+=-lpthread -lrt
 strtod_simple strtod_simple-static: LDLIBS+=-lm
 tgmath tgmath-static: LDLIBS+=-lm
+# adding ./lib.so through LDLIBS instead of $^ in the implicit rule because make removes the leading ./ from dependencies
 tls_align: LDLIBS+=./tls_align_dso.so
 tls_align: tls_align_dso.so
 # make bug: tls_align target specific flags are also set for tls_align_dso.so when both target is built