Merge pull request #3 from zmwangx/travis

Test on Travis
This commit is contained in:
Arun Prakash Jana 2017-04-04 01:05:35 +05:30 committed by GitHub
commit 8fbd97a1ea
2 changed files with 20 additions and 5 deletions

17
.travis.yml Normal file
View File

@ -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'

View File

@ -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