1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-29 00:29:34 +00:00

Adds a c++1z fallback for SDL builds, too.

This commit is contained in:
Thomas Harte 2020-07-24 22:01:22 -04:00
parent fa95a17af5
commit e097a841d2

View File

@ -1,19 +1,19 @@
import glob
import sys
# establish UTF-8 encoding for Python 2
# Establish UTF-8 encoding for Python 2.
if sys.version_info < (3, 0):
reload(sys)
sys.setdefaultencoding('utf-8')
# create build environment
# Create build environment.
env = Environment()
# determine compiler and linker flags for SDL
# Determine compiler and linker flags for SDL.
env.ParseConfig('sdl2-config --cflags')
env.ParseConfig('sdl2-config --libs')
# gather a list of source files
# Gather a list of source files.
SOURCES = glob.glob('*.cpp')
SOURCES += glob.glob('../../Analyser/Dynamic/*.cpp')
@ -117,11 +117,11 @@ SOURCES += glob.glob('../../Storage/Tape/*.cpp')
SOURCES += glob.glob('../../Storage/Tape/Formats/*.cpp')
SOURCES += glob.glob('../../Storage/Tape/Parsers/*.cpp')
# add additional compiler flags
env.Append(CCFLAGS = ['--std=c++17', '-Wall', '-O2', '-DNDEBUG'])
# Add additional compiler flags; c++1z is insurance in case c++17 isn't fully implemented.
env.Append(CCFLAGS = ['--std=c++17', '--std=c++1z', '-Wall', '-O2', '-DNDEBUG'])
# add additional libraries to link against
# Add additional libraries to link against.
env.Append(LIBS = ['libz', 'pthread', 'GL'])
# build target
# Build target.
env.Program(target = 'clksignal', source = SOURCES)