aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml17
-rw-r--r--Makefile8
2 files changed, 20 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..1ff932a
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,17 @@
+language: c
+matrix:
+ include:
+ # Access more recent gcc and clang via a Trusty image
+ - os: linux
+ dist: trusty
+ compiler: gcc
+ - os: linux
+ dist: trusty
+ compiler: clang
+ - os: osx
+ compiler: gcc
+ - os: osx
+ compiler: clang
+script:
+ - make CFLAGS='-Werror'
+ - make CFLAGS='-Wall -Wextra -Werror'
diff --git a/Makefile b/Makefile
index 02f4661..af8b10b 100644
--- a/Makefile
+++ b/Makefile
@@ -3,9 +3,7 @@ VERSION = 0.6
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/man
-#CPPFLAGS = -DDEBUG
-#CFLAGS = -g
-CFLAGS = -O3 -march=native
+CFLAGS += -O3 -march=native
LDLIBS = -lcurses
DISTFILES = nnn.c config.def.h nnn.1 Makefile README.md LICENSE
@@ -21,8 +19,8 @@ $(LOCALCONFIG): config.def.h
$(SRC): $(LOCALCONFIG)
$(BIN): $(SRC)
- $(CC) $(CFLAGS) -o $@ $(SRC) $(LDFLAGS) $(LDLIBS)
- strip $(BIN)
+ $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
+ strip $@
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin