From e1749c5b993f62646c99ff07a264b27a2cbb3c95 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 31 Dec 2017 19:08:54 +0100 Subject: Add a simple Travis script --- Makefile | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ac17e2e..9d5cf96 100644 --- a/Makefile +++ b/Makefile @@ -13,17 +13,22 @@ SRC = \ src/safe_rw.c \ src/safe_rw.h -all: bin +all: bin test bin: encpipe +$(OBJ): $(SRC) + .c.o: $(CC) $(CFLAGS) -o $@ -c $< encpipe: $(OBJ) $(CC) $(CFLAGS) -o encpipe $(OBJ) -install: bin +ext/libhydrogen/hydrogen.c: + git submodule update --init + +install: all -$(STRIP) --strip-all encpipe 2> /dev/null || $(STRIP) encpipe 2> /dev/null mkdir -p $(PREFIX)/bin install -o 0 -g 0 -m 0755 encpipe $(PREFIX)/bin 2> /dev/null || install -m 0755 encpipe $(PREFIX)/bin @@ -31,10 +36,8 @@ install: bin uninstall: rm -f $(PREFIX)/bin/encpipe -$(OBJ): $(SRC) - -ext/libhydrogen/hydrogen.c: - git submodule update --init +test: bin + @echo test | ./encpipe -e -p password | ./encpipe -d -p password -o /dev/null .PHONY: clean @@ -44,3 +47,7 @@ clean: distclean: clean .SUFFIXES: .c .o + +check: test + +distclean: clean -- cgit v1.2.3-70-g09d2