2022-03-27 13:00:05 +02:00
|
|
|
#! /usr/bin/env python
|
|
|
|
|
|
|
|
# SCSub
|
|
|
|
#
|
|
|
|
# FRT - A Godot platform targeting single board computers
|
|
|
|
# Copyright (c) 2017-2022 Emanuele Fornara
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
#
|
|
|
|
|
|
|
|
Import('env')
|
|
|
|
|
|
|
|
import sys
|
|
|
|
dl_path = './dl'
|
|
|
|
sys.path.append(dl_path)
|
|
|
|
import procdl
|
|
|
|
sys.path.remove(dl_path)
|
|
|
|
|
|
|
|
env.Append(BUILDERS={'DLH': env.Builder(action=procdl.build_h_action, suffix='.gen.h', src_suffix='.dl')})
|
|
|
|
env.Append(BUILDERS={'DLCPP': env.Builder(action=procdl.build_cc_action, suffix='.gen.cc', src_suffix='.dl')})
|
|
|
|
|
|
|
|
for dl in Glob('dl/*.dl'):
|
|
|
|
env.DLH(str(dl))
|
|
|
|
env.DLCPP(str(dl))
|
2022-03-27 13:18:59 +02:00
|
|
|
|
2024-07-21 10:33:13 +02:00
|
|
|
for libname in ['gles2', 'gles3']:
|
|
|
|
env.Depends('platform_config.h', 'dl/' + libname + '.gen.h')
|
2022-03-27 13:00:05 +02:00
|
|
|
|
|
|
|
frt_env = env.Clone()
|
|
|
|
frt_env.ParseConfig(env['FRT_PKG_CONFIG'] + ' sdl2 --cflags --libs')
|
|
|
|
|
2024-07-21 10:33:13 +02:00
|
|
|
common_sources = [ 'frt_exe.cc', 'frt.cc', 'frt_godot3.cc', 'dl/gles2.gen.cc', 'dl/gles3.gen.cc' ]
|
2022-03-27 13:00:05 +02:00
|
|
|
|
|
|
|
std = env['frt_std']
|
2022-03-27 13:18:59 +02:00
|
|
|
|
2022-03-27 13:00:05 +02:00
|
|
|
if std != 'no':
|
2022-03-27 13:18:59 +02:00
|
|
|
frt_env.Append(CCFLAGS=['-std=c++14'])
|
2022-03-27 13:00:05 +02:00
|
|
|
|
2022-03-27 13:18:59 +02:00
|
|
|
prog = frt_env.add_program('#bin/pandemonium', common_sources)
|