diff options
author | Mattias Andrée <maandree@kth.se> | 2021-04-08 17:45:01 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-04-08 17:45:01 +0200 |
commit | 2adf7222ce021748b0edc4a9c5a32375a5b0d124 (patch) | |
tree | b3f0b683a23e969a744fcfdf43352c6498985f69 /Makefile | |
parent | Add readme (diff) | |
download | libcontacts-2adf7222ce021748b0edc4a9c5a32375a5b0d124.tar.gz libcontacts-2adf7222ce021748b0edc4a9c5a32375a5b0d124.tar.bz2 libcontacts-2adf7222ce021748b0edc4a9c5a32375a5b0d124.tar.xz |
Add test for libcontacts_get_path
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -43,8 +43,9 @@ HDR =\ LOBJ = $(OBJ:.o=.lo) -all: libcontacts.a libcontacts.$(LIBEXT) +all: libcontacts.a libcontacts.$(LIBEXT) test $(OBJ): $($@:.o=.c) $(HDR) +test.o: test.c $(HDR) libcontacts.a: $(OBJ) -rm -f -- $@ @@ -60,6 +61,14 @@ libcontacts.$(LIBEXT): $(LOBJ) .c.lo: $(CC) -fPIC -c -o $@ $< $(CFLAGS) $(CPPFLAGS) +test: test.o libcontacts.a + $(CC) -o $@ test.o libcontacts.a $(LDFLAGS) + +check: test + @rm -rf -- .testdir + ./test + @rm -rf -- .testdir + install: libcontacts.a libcontacts.$(LIBEXT) mkdir -p -- "$(DESTDIR)$(PREFIX)/lib" mkdir -p -- "$(DESTDIR)$(PREFIX)/include" @@ -77,9 +86,9 @@ uninstall: -rm -f -- "$(DESTDIR)$(PREFIX)/include/libcontacts.h" clean: - -rm -f -- *.o *.a *.lo *.so *.dylib *.dll *.su + -rm -rf -- *.o *.a *.lo *.so *.dylib *.dll *.su test .testdir .SUFFIXES: .SUFFIXES: .c .o .lo -.PHONY: all install uninstall clean +.PHONY: all check install uninstall clean |