diff options
| -rw-r--r-- | .travis.yml | 15 | ||||
| -rw-r--r-- | Makefile | 19 |
2 files changed, 28 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..25e7f01 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +sudo: false + +language: c + +os: + - linux + - osx + +compiler: + - clang + - gcc + - g++ + +script: + - make test @@ -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 |