2017-11-08 22:36:41 -05:00
|
|
|
import glob
|
2019-05-30 22:20:15 -04:00
|
|
|
import sys
|
|
|
|
|
2020-07-24 22:01:22 -04:00
|
|
|
# Establish UTF-8 encoding for Python 2.
|
2019-08-03 00:33:53 -04:00
|
|
|
if sys.version_info < (3, 0):
|
|
|
|
reload(sys)
|
|
|
|
sys.setdefaultencoding('utf-8')
|
2017-11-08 22:36:41 -05:00
|
|
|
|
2020-07-24 22:01:22 -04:00
|
|
|
# Create build environment.
|
2017-11-08 22:36:41 -05:00
|
|
|
env = Environment()
|
|
|
|
|
2020-07-24 22:01:22 -04:00
|
|
|
# Determine compiler and linker flags for SDL.
|
2017-11-08 22:36:41 -05:00
|
|
|
env.ParseConfig('sdl2-config --cflags')
|
|
|
|
env.ParseConfig('sdl2-config --libs')
|
|
|
|
|
2020-07-24 22:01:22 -04:00
|
|
|
# Gather a list of source files.
|
2017-11-08 22:36:41 -05:00
|
|
|
SOURCES = glob.glob('*.cpp')
|
|
|
|
|
2018-02-19 05:13:41 -08:00
|
|
|
SOURCES += glob.glob('../../Analyser/Dynamic/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Analyser/Dynamic/MultiMachine/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Analyser/Dynamic/MultiMachine/Implementation/*.cpp')
|
|
|
|
|
|
|
|
SOURCES += glob.glob('../../Analyser/Static/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Analyser/Static/Acorn/*.cpp')
|
2021-07-16 20:30:48 -04:00
|
|
|
SOURCES += glob.glob('../../Analyser/Static/Amiga/*.cpp')
|
2018-02-19 05:13:41 -08:00
|
|
|
SOURCES += glob.glob('../../Analyser/Static/AmstradCPC/*.cpp')
|
2018-04-20 10:58:57 -04:00
|
|
|
SOURCES += glob.glob('../../Analyser/Static/AppleII/*.cpp')
|
2020-10-20 22:18:11 -04:00
|
|
|
SOURCES += glob.glob('../../Analyser/Static/AppleIIgs/*.cpp')
|
2019-11-09 16:14:00 -05:00
|
|
|
SOURCES += glob.glob('../../Analyser/Static/Atari2600/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Analyser/Static/AtariST/*.cpp')
|
2018-03-01 22:19:50 -05:00
|
|
|
SOURCES += glob.glob('../../Analyser/Static/Coleco/*.cpp')
|
2018-02-19 05:13:41 -08:00
|
|
|
SOURCES += glob.glob('../../Analyser/Static/Commodore/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Analyser/Static/Disassembler/*.cpp')
|
2018-05-05 19:34:22 -04:00
|
|
|
SOURCES += glob.glob('../../Analyser/Static/DiskII/*.cpp')
|
2021-06-14 21:07:35 -04:00
|
|
|
SOURCES += glob.glob('../../Analyser/Static/Enterprise/*.cpp')
|
2019-07-08 17:38:43 -04:00
|
|
|
SOURCES += glob.glob('../../Analyser/Static/Macintosh/*.cpp')
|
2018-02-19 05:13:41 -08:00
|
|
|
SOURCES += glob.glob('../../Analyser/Static/MSX/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Analyser/Static/Oric/*.cpp')
|
2023-11-29 14:54:33 -05:00
|
|
|
SOURCES += glob.glob('../../Analyser/Static/PCCompatible/*.cpp')
|
2018-09-30 20:46:38 -04:00
|
|
|
SOURCES += glob.glob('../../Analyser/Static/Sega/*.cpp')
|
2018-02-19 05:13:41 -08:00
|
|
|
SOURCES += glob.glob('../../Analyser/Static/ZX8081/*.cpp')
|
2021-03-17 22:40:29 -04:00
|
|
|
SOURCES += glob.glob('../../Analyser/Static/ZXSpectrum/*.cpp')
|
2018-02-19 05:13:41 -08:00
|
|
|
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Components/1770/*.cpp')
|
2019-09-18 21:49:57 -04:00
|
|
|
SOURCES += glob.glob('../../Components/5380/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Components/6522/Implementation/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Components/6560/*.cpp')
|
2019-11-09 15:42:19 -05:00
|
|
|
SOURCES += glob.glob('../../Components/6850/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Components/68901/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Components/8272/*.cpp')
|
2019-07-08 18:18:49 -04:00
|
|
|
SOURCES += glob.glob('../../Components/8530/*.cpp')
|
2017-12-06 18:56:26 -08:00
|
|
|
SOURCES += glob.glob('../../Components/9918/*.cpp')
|
2017-12-14 20:27:26 -05:00
|
|
|
SOURCES += glob.glob('../../Components/9918/Implementation/*.cpp')
|
2018-04-20 10:56:59 -04:00
|
|
|
SOURCES += glob.glob('../../Components/AudioToggle/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Components/AY38910/*.cpp')
|
2018-04-21 14:33:42 -07:00
|
|
|
SOURCES += glob.glob('../../Components/DiskII/*.cpp')
|
2018-01-06 20:15:55 -05:00
|
|
|
SOURCES += glob.glob('../../Components/KonamiSCC/*.cpp')
|
2020-05-09 18:11:50 -04:00
|
|
|
SOURCES += glob.glob('../../Components/OPx/*.cpp')
|
2023-01-14 14:20:14 -05:00
|
|
|
SOURCES += glob.glob('../../Components/RP5C01/*.cpp')
|
2018-03-01 22:19:50 -05:00
|
|
|
SOURCES += glob.glob('../../Components/SN76489/*.cpp')
|
2019-11-09 15:42:19 -05:00
|
|
|
SOURCES += glob.glob('../../Components/Serial/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
|
2017-11-18 21:13:55 -05:00
|
|
|
SOURCES += glob.glob('../../Configurable/*.cpp')
|
2017-11-18 21:09:26 -05:00
|
|
|
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Inputs/*.cpp')
|
|
|
|
|
2021-01-15 22:30:02 -05:00
|
|
|
SOURCES += glob.glob('../../InstructionSets/M50740/*.cpp')
|
2022-04-27 08:05:36 -04:00
|
|
|
SOURCES += glob.glob('../../InstructionSets/M68k/*.cpp')
|
2021-01-15 22:30:02 -05:00
|
|
|
SOURCES += glob.glob('../../InstructionSets/PowerPC/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../InstructionSets/x86/*.cpp')
|
|
|
|
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Machines/*.cpp')
|
2021-07-16 20:30:48 -04:00
|
|
|
SOURCES += glob.glob('../../Machines/Amiga/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Machines/AmstradCPC/*.cpp')
|
2021-02-10 21:28:32 -05:00
|
|
|
SOURCES += glob.glob('../../Machines/Apple/ADB/*.cpp')
|
2019-07-08 18:10:39 -04:00
|
|
|
SOURCES += glob.glob('../../Machines/Apple/AppleII/*.cpp')
|
2020-10-20 22:18:11 -04:00
|
|
|
SOURCES += glob.glob('../../Machines/Apple/AppleIIgs/*.cpp')
|
2019-07-08 18:10:39 -04:00
|
|
|
SOURCES += glob.glob('../../Machines/Apple/Macintosh/*.cpp')
|
2019-11-09 15:42:19 -05:00
|
|
|
SOURCES += glob.glob('../../Machines/Atari/2600/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Machines/Atari/ST/*.cpp')
|
2018-03-01 22:19:50 -05:00
|
|
|
SOURCES += glob.glob('../../Machines/ColecoVision/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Machines/Commodore/*.cpp')
|
2017-11-10 21:56:15 -05:00
|
|
|
SOURCES += glob.glob('../../Machines/Commodore/1540/Implementation/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Machines/Commodore/Vic-20/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Machines/Electron/*.cpp')
|
2021-06-14 21:07:35 -04:00
|
|
|
SOURCES += glob.glob('../../Machines/Enterprise/*.cpp')
|
2018-09-30 20:48:55 -04:00
|
|
|
SOURCES += glob.glob('../../Machines/MasterSystem/*.cpp')
|
2017-12-06 18:56:26 -08:00
|
|
|
SOURCES += glob.glob('../../Machines/MSX/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Machines/Oric/*.cpp')
|
2023-11-15 11:02:44 -05:00
|
|
|
SOURCES += glob.glob('../../Machines/PCCompatible/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Machines/Utility/*.cpp')
|
2021-03-19 11:19:10 -04:00
|
|
|
SOURCES += glob.glob('../../Machines/Sinclair/Keyboard/*.cpp')
|
2021-03-17 22:40:29 -04:00
|
|
|
SOURCES += glob.glob('../../Machines/Sinclair/ZX8081/*.cpp')
|
2021-03-17 23:38:55 -04:00
|
|
|
SOURCES += glob.glob('../../Machines/Sinclair/ZXSpectrum/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
|
2019-01-25 20:26:20 -05:00
|
|
|
SOURCES += glob.glob('../../Outputs/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Outputs/CRT/*.cpp')
|
2020-07-23 23:14:10 -04:00
|
|
|
SOURCES += glob.glob('../../Outputs/ScanTargets/*.cpp')
|
2019-01-25 19:11:57 -05:00
|
|
|
SOURCES += glob.glob('../../Outputs/OpenGL/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Outputs/OpenGL/Primitives/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
|
|
|
|
SOURCES += glob.glob('../../Processors/6502/Implementation/*.cpp')
|
2020-04-02 19:16:22 -04:00
|
|
|
SOURCES += glob.glob('../../Processors/6502/State/*.cpp')
|
2020-09-29 18:43:39 -04:00
|
|
|
SOURCES += glob.glob('../../Processors/65816/Implementation/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Processors/Z80/Implementation/*.cpp')
|
2020-05-13 22:05:23 -04:00
|
|
|
SOURCES += glob.glob('../../Processors/Z80/State/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
|
2020-03-13 23:38:29 -04:00
|
|
|
SOURCES += glob.glob('../../Reflection/*.cpp')
|
|
|
|
|
2017-11-10 21:56:15 -05:00
|
|
|
SOURCES += glob.glob('../../SignalProcessing/*.cpp')
|
|
|
|
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Storage/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Storage/Cartridge/*.cpp')
|
2017-11-10 21:56:15 -05:00
|
|
|
SOURCES += glob.glob('../../Storage/Cartridge/Encodings/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Storage/Cartridge/Formats/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Storage/Data/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Storage/Disk/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Storage/Disk/Controller/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Storage/Disk/DiskImage/Formats/*.cpp')
|
2017-11-10 21:56:15 -05:00
|
|
|
SOURCES += glob.glob('../../Storage/Disk/DiskImage/Formats/Utility/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Storage/Disk/DPLL/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Storage/Disk/Encodings/*.cpp')
|
2018-05-05 19:34:22 -04:00
|
|
|
SOURCES += glob.glob('../../Storage/Disk/Encodings/AppleGCR/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
SOURCES += glob.glob('../../Storage/Disk/Encodings/MFM/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Storage/Disk/Parsers/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Storage/Disk/Track/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Storage/Disk/Data/*.cpp')
|
2019-09-18 21:49:57 -04:00
|
|
|
SOURCES += glob.glob('../../Storage/MassStorage/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Storage/MassStorage/Encodings/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Storage/MassStorage/Formats/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Storage/MassStorage/SCSI/*.cpp')
|
2021-04-24 23:25:08 -04:00
|
|
|
SOURCES += glob.glob('../../Storage/State/*.cpp')
|
2017-11-10 21:56:15 -05:00
|
|
|
SOURCES += glob.glob('../../Storage/Tape/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Storage/Tape/Formats/*.cpp')
|
|
|
|
SOURCES += glob.glob('../../Storage/Tape/Parsers/*.cpp')
|
2017-11-09 22:04:49 -05:00
|
|
|
|
2020-07-24 22:01:22 -04:00
|
|
|
# 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'])
|
2017-11-12 16:46:10 -05:00
|
|
|
|
2020-07-24 22:01:22 -04:00
|
|
|
# Add additional libraries to link against.
|
2017-11-09 22:04:49 -05:00
|
|
|
env.Append(LIBS = ['libz', 'pthread', 'GL'])
|
2017-11-08 22:36:41 -05:00
|
|
|
|
2020-07-24 22:01:22 -04:00
|
|
|
# Build target.
|
2017-11-09 22:04:49 -05:00
|
|
|
env.Program(target = 'clksignal', source = SOURCES)
|