diff --git a/.gitignore b/.gitignore index d6b0489b..2c81a18c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ base64 -test/test +test/test_base64 diff --git a/.travis.yml b/.travis.yml index bcac1a7b..ab1c3fcd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,5 +5,4 @@ compiler: - gcc script: - - make - - ( cd test && make && ./test ) + - make -C test test diff --git a/test/Makefile b/test/Makefile index a4dda2a0..e70f55a6 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,9 +1,12 @@ -CFLAGS += -std=c89 -O3 -march=native -Wall -Wextra -pedantic +CFLAGS += -std=c89 -O3 -Wall -Wextra -pedantic -test: test.c ../base64.c +.PHONY: clean test + +test_base64: test_base64.c ../base64.c $(CC) $(CFLAGS) -o $@ $^ -.PHONY: clean +test: clean test_base64 + ./test_base64 clean: - rm -f test + rm -f test_base64 diff --git a/test/test.c b/test/test_base64.c similarity index 100% rename from test/test.c rename to test/test_base64.c