From 593f2554287b979dd7fd3640eaad273bee08688d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 21 Oct 2017 23:01:36 +0200 Subject: Add test and fix bugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 65566cb..5c112a2 100644 --- a/Makefile +++ b/Makefile @@ -6,10 +6,12 @@ LIB_MINOR = 0 CONFIGFILE = config.mk include $(CONFIGFILE) -all: sbusd libsbus.so libsbus.a +all: sbusd libsbus.so libsbus.a test sbusd.o: arg.h libsbus.o: libsbus.h +test.o: libsbus.h +test: test.o libsbus.a libsbus.so: libsbus.o $(CC) -shared -Wl,-soname,libsbus.so.$(LIB_MAJOR) -o $@ $^ $(LDFLAGS) @@ -18,6 +20,9 @@ libsbus.a: libsbus.o $(AR) rc $@ $? $(AR) -s $@ +check: test sbusd + ./test + install: sbusd libsbus.a libsbus.so mkdir -p -- "$(DESTDIR)$(PREFIX)/bin" mkdir -p -- "$(DESTDIR)$(PREFIX)/lib" @@ -38,6 +43,6 @@ uninstall: -rm -rf -- "$(DESTDIR)$(PREFIX)/share/licenses/sbus" clean: - -rm -f -- sbusd *.o *.so *.a + -rm -f -- sbusd test *.o *.so *.a .test.sock .test.pid -.PHONY: all install uninstall clean +.PHONY: all check install uninstall clean -- cgit v1.2.3-70-g09d2