+ config/wasm/global.mk
+ config/wasm/libs.mk
+ config/wasm/emcc.mk
* utils/hbmk2/hbmk2.prg
* contrib/hbrun/hbrun.hbp
+ add basic support for build Harbour into JS/WebAssembly using
emscripten, using these settings:
HB_PLATFORM=wasm HB_COMPILER=emcc HB_BUILD_3RDEXT=no
* {abstr} is now a hbmk2 keyword to possibly group all
toolsets similar in flavour: WASI/clang, JS/emscripten
These most likely will be targeting plaforms which are not
full operating-systems, they are also commonly qualified as
sandbox solutions.
* introduced __PLATFORM__WASM and __PLATFORM__ABSTRACT .prg defines
* utils/hbmk2/hbmk2.prg
+ allow to specify hb_ProgName() value at build-time for platforms
where the function cannot return a meaningful value (f.e.
JS/WebAssembly)
; TODO: Add support for passing hb_ProgName() value command-line
parameter, f.e. `--hb:self=hbrun`
* config/global.mk
* include/hbsetup.h
* consider abstract/emscripten targets similar to linux-like
* src/rtl/arc4.c
! fix to build under emscripten (which is assumed to be a
linux-like environment)
; though platform/compiler names are not currently compatible
with origin, this WebAssembly platform support was guided by
Harbour 3.4:
2017-06-09 01:10 UTC Viktor Szakats (vszakats users.noreply.github.com)
as usual Viktor was here before, many thanks!
; example project, how to make a multi-platform GUI application which
also targets WebAssembly, can be found here:
https://github.com/alcz/harbour-cimgui-sokol-starterkit/
37 lines
1.5 KiB
Plaintext
37 lines
1.5 KiB
Plaintext
@../../utils/hbmk2/hbmk2.hbp
|
|
|
|
-o${hb_name}
|
|
|
|
-DHBMK_PROGNAME=hbrun{abstr}
|
|
|
|
-DHBMK_WITH_BUILTIN_HEADERS_ALL
|
|
|
|
-DHBMK_WITH_GTXWC{HBMK_WITH_GTXWC='yes'}
|
|
-gtxwc{HBMK_WITH_GTXWC='yes'}
|
|
|
|
# Build in shared mode for these platforms because
|
|
# it's required for dynamic extension loading. (only
|
|
# do that if HB_BUILD_CONTRIB_DYN is enabled, so there
|
|
# are actual dynamic extensions to load.)
|
|
{_HB_BUILD_&(!(HB_BUILD_DYN='no')&!(HB_BUILD_CONTRIB_DYN='no')&(win|wce|os2))}-shared
|
|
{shared|(unix&!(HB_BUILD_CONTRIB_DYN='no'))}-env:__HBMKDYN=yes
|
|
|
|
{__HBMKDYN='yes'}-env:_HBMK_WITH_EXTS=hbct|hbexpat|hbmemio|hbmzip|hbnetio
|
|
{__HBMKDYN='yes'&unix}-env:_HBMK_WITH_EXTS+|hbunix
|
|
{__HBMKDYN='yes'&allwin}-env:_HBMK_WITH_EXTS+|hbwin
|
|
{__HBMKDYN='yes'}-DHBMK_WITH_EXTS=${_HBMK_WITH_EXTS}
|
|
|
|
{!(__HBMKDYN='yes')}hbct.hbc {!(__HBMKDYN='yes')}-request=__HBEXTERN__HBCT__
|
|
{!(__HBMKDYN='yes')}hbexpat.hbc {!(__HBMKDYN='yes')}-request=__HBEXTERN__HBEXPAT__
|
|
{!(__HBMKDYN='yes')}hbmemio.hbc {!(__HBMKDYN='yes')}-request=__HBEXTERN__HBMEMIO__
|
|
{!(__HBMKDYN='yes')}hbmzip.hbc {!(__HBMKDYN='yes')}-request=__HBEXTERN__HBMZIP__
|
|
{!(__HBMKDYN='yes')}hbnetio.hbc {!(__HBMKDYN='yes')}-request=__HBEXTERN__HBNETIO__
|
|
{!(__HBMKDYN='yes')&unix}hbunix.hbc {!(__HBMKDYN='yes')&unix}-request=__HBEXTERN__HBUNIX__
|
|
{!(__HBMKDYN='yes')&allwin}hbwin.hbc {!(__HBMKDYN='yes')&allwin}-request=__HBEXTERN__HBWIN__
|
|
|
|
# localization (for automatization with config/lang.hb)
|
|
-3rd=_langhb_entry=../../utils/hbmk2/
|
|
-3rd=_langhb_docext=.md
|
|
-3rd=_langhb_docoption=-lang={LNG}
|
|
-3rd=_langhb_docoption=-longhelpmdsh
|