Initial import of AMBuild infrastructure for C++ projects.
Former-commit-id: 53baa4f8c25525674f5e71f8f6ff2663928500ab
This commit is contained in:
26
compiler/amxxpc/AMBuilder
Normal file
26
compiler/amxxpc/AMBuilder
Normal file
@ -0,0 +1,26 @@
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os.path
|
||||
|
||||
binary = AMXX.Program(builder, 'amxxpc')
|
||||
|
||||
binary.compiler.defines += [
|
||||
'AMX_ANSIONLY',
|
||||
]
|
||||
|
||||
if builder.target_platform == 'linux':
|
||||
binary.compiler.postlink += [
|
||||
'-ldl',
|
||||
binary.Dep('libz.a'),
|
||||
]
|
||||
elif builder.target_platform == 'mac':
|
||||
binary.compiler.postlink += [binary.Dep('libz-darwin.a')]
|
||||
elif builder.target_platform == 'windows':
|
||||
binary.compiler.postlink += [binary.Dep('zlib.lib')]
|
||||
|
||||
binary.sources = [
|
||||
'amx.cpp',
|
||||
'amxxpc.cpp',
|
||||
'Binary.cpp',
|
||||
]
|
||||
|
||||
AMXX.modules += [builder.Add(binary)]
|
@ -775,7 +775,7 @@ static void expand(unsigned char *code, long codesize, long memsize)
|
||||
do {
|
||||
codesize--;
|
||||
/* no input byte should be shifted out completely */
|
||||
assert(shift<8*sizeof(cell));
|
||||
assert(size_t(shift)<8*sizeof(cell));
|
||||
/* we work from the end of a sequence backwards; the final code in
|
||||
* a sequence may not have the continuation bit set */
|
||||
assert(shift>0 || (code[(size_t)codesize] & 0x80)==0);
|
||||
|
38
compiler/libpc300/AMBuilder
Normal file
38
compiler/libpc300/AMBuilder
Normal file
@ -0,0 +1,38 @@
|
||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||
import os.path
|
||||
|
||||
binary = AMXX.Library(builder, 'amxxpc32')
|
||||
|
||||
binary.compiler.includes += [builder.currentSourcePath]
|
||||
|
||||
if builder.target_platform in ['mac', 'linux']:
|
||||
binary.compiler.defines += ['ENABLE_BINRELOC']
|
||||
binary.compiler.postlink += ['-lm', '-lpthread']
|
||||
|
||||
binary.compiler.defines += [
|
||||
'NO_MAIN',
|
||||
'PAWNC_DLL',
|
||||
'HAVE_STDINT_H',
|
||||
]
|
||||
|
||||
binary.sources = [
|
||||
'sc1.c',
|
||||
'sc2.c',
|
||||
'sc3.c',
|
||||
'sc4.c',
|
||||
'sc5.c',
|
||||
'sc6.c',
|
||||
'sc7.c',
|
||||
'scvars.c',
|
||||
'scmemfil.c',
|
||||
'scstate.c',
|
||||
'sclist.c',
|
||||
'sci18n.c',
|
||||
'scexpand.c',
|
||||
'pawncc.c',
|
||||
'libpawnc.c',
|
||||
'prefix.c',
|
||||
'memfile.c',
|
||||
]
|
||||
|
||||
AMXX.libpc300 = [builder.Add(binary)]
|
Reference in New Issue
Block a user