1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-24 05:17:17 +00:00
This commit is contained in:
Zeno Rogue 2020-04-06 13:23:29 +02:00
commit 67d057e8cf
2 changed files with 38 additions and 30 deletions

View File

@ -3,20 +3,6 @@ services:
- docker
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
- g++-5
env: >-
TRAVIS_OS_NAME=linux
TRAVIS_BUILD_SYSTEM=Makefile
HYPERROGUE_CXX=g++-5
HYPERROGUE_USE_GLEW=1
HYPERROGUE_USE_PNG=1
- os: linux
compiler: gcc
env: >-
@ -34,6 +20,23 @@ matrix:
HYPERROGUE_USE_GLEW=1
HYPERROGUE_USE_PNG=1
- os: linux
compiler: gcc
env: >-
TRAVIS_OS_NAME=linux
TRAVIS_COMPILER_NAME=gcc
TRAVIS_BUILD_SYSTEM=Makefile
HYPERROGUE_USE_GLEW=1
HYPERROGUE_USE_PNG=1
- os: linux
compiler: clang
env: >-
TRAVIS_OS_NAME=linux
TRAVIS_COMPILER_NAME=clang
TRAVIS_BUILD_SYSTEM=Makefile
HYPERROGUE_USE_GLEW=1
HYPERROGUE_USE_PNG=1
- os: linux
dist: bionic
compiler: gcc
env: >-
TRAVIS_OS_NAME=linux
@ -51,6 +54,14 @@ matrix:
HYPERROGUE_USE_GLEW=1
HYPERROGUE_USE_PNG=1
HYPERROGUE_USE_ROGUEVIZ=1
- os: osx
compiler: clang
env: >-
TRAVIS_OS_NAME=osx
TRAVIS_COMPILER_NAME=clang
TRAVIS_BUILD_SYSTEM=Makefile
HYPERROGUE_USE_GLEW=1
HYPERROGUE_USE_PNG=1
- os: osx
compiler: gcc
env: >-
@ -69,15 +80,6 @@ matrix:
HYPERROGUE_USE_GLEW=1
HYPERROGUE_USE_PNG=1
HYPERROGUE_USE_ROGUEVIZ=1
- os: osx
compiler: clang
env: >-
TRAVIS_OS_NAME=osx
TRAVIS_COMPILER_NAME=clang
TRAVIS_BUILD_SYSTEM=Makefile
HYPERROGUE_USE_GLEW=0
HYPERROGUE_USE_PNG=0
HYPERROGUE_USE_ROGUEVIZ=0
- os: linux
env: >-
TRAVIS_OS_NAME=linux
@ -140,7 +142,7 @@ script:
./configure CXXFLAGS="-W -Wall -Wextra -Werror -Wno-unused-parameter -Wno-maybe-uninitialized -Wno-unknown-warning-option"
make
elif [[ "$TRAVIS_BUILD_SYSTEM" == "Makefile" ]]; then
make -f Makefile.simple CXX="${HYPERROGUE_CXX-g++}"
make -f Makefile.simple
elif [[ "$TRAVIS_BUILD_SYSTEM" == "emscripten" ]]; then
docker run --rm -v $(pwd):/src trzeci/emscripten make -f Makefile.simple emscripten
else

View File

@ -80,19 +80,22 @@ ifeq (${OS},osx)
endif
ifeq (${TOOLCHAIN},clang)
CXXFLAGS_EARLY += -std=c++11 -march=native
CXXFLAGS_STD = -std=c++11
CXXFLAGS_EARLY += -march=native
CXXFLAGS_EARLY += -W -Wall -Wextra -Werror -pedantic
CXXFLAGS_EARLY += -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized -Wno-unknown-warning-option
endif
ifeq (${TOOLCHAIN},gcc)
CXXFLAGS_EARLY += -std=c++11 -march=native
CXXFLAGS_STD = -std=c++11
CXXFLAGS_EARLY += -march=native
CXXFLAGS_EARLY += -W -Wall -Wextra -Werror -pedantic
CXXFLAGS_EARLY += -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized
endif
ifeq (${TOOLCHAIN},mingw)
CXXFLAGS_EARLY += -std=c++11 -march=native
CXXFLAGS_STD = -std=c++11
CXXFLAGS_EARLY += -march=native
CXXFLAGS_EARLY += -W -Wall -Wextra -Werror
CXXFLAGS_EARLY += -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized
endif
@ -121,7 +124,8 @@ else
endif
ifeq (${HYPERROGUE_USE_ROGUEVIZ},1)
# Enable RogueViz.
# Enable RogueViz. RogueViz requires C++17.
CXXFLAGS_STD = -std=c++17
CXXFLAGS_EARLY += -DCAP_ROGUEVIZ=1
endif
@ -130,7 +134,7 @@ endif
## Begin the Makefile proper.
override CXXFLAGS := $(CXXFLAGS_EARLY) $(CXXFLAGS) ${EXTRA_CXXFLAGS}
override CXXFLAGS := $(CXXFLAGS_STD) $(CXXFLAGS_EARLY) $(CXXFLAGS) ${EXTRA_CXXFLAGS}
override LDFLAGS := $(LDFLAGS_EARLY) $(LDFLAGS) ${EXTRA_LDFLAGS}
hyperrogue$(EXE_EXTENSION): $(hyper_OBJS) $(hyper_RES)
@ -167,5 +171,7 @@ hyper.emscripten-sources: *.cpp autohdr.h
.PHONY: clean
clean:
rm -f hyperrogue$(EXE_EXTENSION) hyper$(OBJ_EXTENSION) $(hyper_RES) langen$(EXE_EXTENSION) language-data.cpp savepng$(OBJ_EXTENSION)
rm -f langen$(EXE_EXTENSION) language-data.cpp
rm -f makeh$(EXE_EXTENSION) autohdr.h
rm -f hyperrogue$(EXE_EXTENSION) hyper$(OBJ_EXTENSION) $(hyper_RES) savepng$(OBJ_EXTENSION)
rm -f hyper.html hyper.js hyper.wasm