X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=nss%2FMakefile;h=9fdda3a0bf6cc543a00b844903b4ec1d2a131bf1;hb=0cc987b1bcb7b16da4f46d84d216df3f6ef457e1;hp=bbc43ee4f35c4c57e3da632b26ea323af0f5daa3;hpb=1254d2cd5f83548f0c2df436b40e4a8c73bb0b0e;p=nsscash%2Fnsscash.git diff --git a/nss/Makefile b/nss/Makefile index bbc43ee..9fdda3a 100644 --- a/nss/Makefile +++ b/nss/Makefile @@ -13,10 +13,10 @@ all: libnss_cash.so.2 clean: rm -f libnss_cash.so.2 \ - libcash_test.so tests/gr tests/pw \ + tests/libcash_test.so tests/gr tests/pw \ tests/group.nsscash tests/passwd.nsscash -libnss_cash.so.2 libcash_test.so: $(wildcard *.c) $(wildcard *.h) +libnss_cash.so.2 tests/libcash_test.so: $(wildcard *.c) $(wildcard *.h) $(CC) -o $@ -shared -fPIC -Wl,-soname,$@ \ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) \ file.c gr.c pw.c search.c \ @@ -26,22 +26,22 @@ libnss_cash.so.2 libcash_test.so: $(wildcard *.c) $(wildcard *.h) # Tests test: tests/gr tests/pw tests/group.nsscash tests/passwd.nsscash - LD_LIBRARY_PATH=. LD_PRELOAD= ./tests/gr - LD_LIBRARY_PATH=. LD_PRELOAD= ./tests/pw + LD_LIBRARY_PATH=./tests LD_PRELOAD= ./tests/gr + LD_LIBRARY_PATH=./tests LD_PRELOAD= ./tests/pw -tests/%: tests/%.c libcash_test.so +tests/%: tests/%.c tests/libcash_test.so $(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) \ - $(TEST_CFLAGS) $(TEST_LDFLAGS) -L. \ - $< $(LDLIBS) -lcash_test -lasan + $(TEST_CFLAGS) $(TEST_LDFLAGS) -Ltests \ + $< $(LDLIBS) -lcash_test tests/passwd.nsscash: tests/passwd ../nsscash convert passwd $< $@ tests/group.nsscash: tests/group ../nsscash convert group $< $@ -libcash_test.so: CFLAGS += $(TEST_CFLAGS) -libcash_test.so: CPPFLAGS += -DNSSCASH_GROUP_FILE='"./tests/group.nsscash"' \ - -DNSSCASH_PASSWD_FILE='"./tests/passwd.nsscash"' -libcash_test.so: LDFLAGS += $(TEST_LDFLAGS) +tests/libcash_test.so: CFLAGS += $(TEST_CFLAGS) +tests/libcash_test.so: CPPFLAGS += -DNSSCASH_GROUP_FILE='"./tests/group.nsscash"' \ + -DNSSCASH_PASSWD_FILE='"./tests/passwd.nsscash"' +tests/libcash_test.so: LDFLAGS += $(TEST_LDFLAGS) .PHONY: all clean test