2025-09-30 11:56:06 +08:00
|
|
|
from building import *
|
|
|
|
|
import rtconfig
|
|
|
|
|
|
|
|
|
|
# get current directory
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
# The set of source files associated with this SConscript file.
|
|
|
|
|
src = Glob('src/*.c')
|
|
|
|
|
|
|
|
|
|
if GetDepend('PROTOBUF_C_USING_EXAMPLE'):
|
|
|
|
|
src += Glob('examples/amessage.pb-c.c')
|
|
|
|
|
|
|
|
|
|
if GetDepend('PROTOBUF_C_USING_ENCODE_DECODE_EXAMPLE'):
|
|
|
|
|
src += Glob('examples/amessage_encode_decode.c')
|
|
|
|
|
|
|
|
|
|
if GetDepend('PROTOBUF_C_USING_ENCODE_DECODE_FILE_EXAMPLE'):
|
|
|
|
|
src += Glob('examples/amessage_encode_to_file.c')
|
|
|
|
|
src += Glob('examples/amessage_decode_from_file.c')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
path = [cwd + '/src']
|
|
|
|
|
path += [cwd + '/examples']
|
|
|
|
|
|
|
|
|
|
LOCAL_CCFLAGS = ''
|
|
|
|
|
|
|
|
|
|
group = DefineGroup('protobuf-c', src, depend = ['LPKG_USING_PROTOBUF_C'], CPPPATH = path, LOCAL_CCFLAGS = LOCAL_CCFLAGS)
|
|
|
|
|
|
|
|
|
|
Return('group')
|