mirror of
https://github.com/zekexiao/pocketlang.git
synced 2025-02-06 04:37:47 +08:00
c67572d552
a buffer of classes for primitive types added to PKVM, but they'll not be initialized in this commit. names buffer and constant pool of a module are now merged (just like java's constant pool). VM's core libraries and scirpt modules are merged into a single map name modules. creating a new module doesn't register it automatically anymore, you need to call pkRegisterModule(...) each time. newModule() function refactored with a simpler interface, we're not setting path or registering globals anymore, the caller is responsible for that.
50 lines
1.8 KiB
C
50 lines
1.8 KiB
C
/*
|
|
* Copyright (c) 2020-2022 Thakee Nathees
|
|
* Copyright (c) 2021-2022 Pocketlang Contributors
|
|
* Distributed Under The MIT License
|
|
*/
|
|
|
|
// This file will include all source files from the modules, modules/thirdparty
|
|
// sub directories here into this single file. That'll make it easy to compile
|
|
// with the command `gcc cli/*.c ...` instead of having to add every single
|
|
// sub directory to the list of source directory.
|
|
|
|
/*****************************************************************************/
|
|
/* STD MODULE SOURCES */
|
|
/*****************************************************************************/
|
|
|
|
#include "modules/modules.c"
|
|
|
|
#include "modules/std_file.c"
|
|
#include "modules/std_path.c"
|
|
|
|
/*****************************************************************************/
|
|
/* THIRDPARTY SOURCES */
|
|
/*****************************************************************************/
|
|
|
|
// Library : cwalk
|
|
// License : MIT
|
|
// Source : https://github.com/likle/cwalk/
|
|
// Doc : https://likle.github.io/cwalk/
|
|
// About : Path library for C/C++. Cross-Platform for Windows, MacOS and
|
|
// Linux. Supports UNIX and Windows path styles on those platforms.
|
|
#include "modules/thirdparty/cwalk/cwalk.c"
|
|
|
|
// Library : argparse
|
|
// License : MIT
|
|
// Source : https://github.com/cofyc/argparse/
|
|
// About : Command-line arguments parsing library.
|
|
#include "thirdparty/argparse/argparse.c"
|
|
|
|
// Library : dlfcn-win32
|
|
// License : MIT
|
|
// Source : https://github.com/dlfcn-win32/dlfcn-win32/
|
|
// About : An implementation of dlfcn for Windows.
|
|
#ifdef _WIN32
|
|
// FIXME:
|
|
// This library redefine the malloc family macro, which cause a compile
|
|
// time warning.
|
|
//
|
|
// #include "modules/thirdparty/dlfcn-win32/dlfcn.c"
|
|
#endif
|