mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 19:19:53 +00:00
Merge pull request #840 from bradms/android-termux
Support Android (termux)
This commit is contained in:
commit
51ada4d70b
4
Makefile
4
Makefile
@ -67,6 +67,10 @@ ifeq ($(UNAME), Haiku)
|
|||||||
LDCONFIG:=true
|
LDCONFIG:=true
|
||||||
LDFLAGS=-Wl,--export-dynamic
|
LDFLAGS=-Wl,--export-dynamic
|
||||||
endif
|
endif
|
||||||
|
# For Android (termux)
|
||||||
|
ifeq ($(shell uname -o), Android)
|
||||||
|
CLIBS:=$(CLIBS) -landroid-spawn
|
||||||
|
endif
|
||||||
|
|
||||||
$(shell mkdir -p build/core build/c build/boot)
|
$(shell mkdir -p build/core build/c build/boot)
|
||||||
all: $(JANET_TARGET) $(JANET_LIBRARY) $(JANET_STATIC_LIBRARY) build/janet.h
|
all: $(JANET_TARGET) $(JANET_LIBRARY) $(JANET_STATIC_LIBRARY) build/janet.h
|
||||||
|
@ -30,6 +30,7 @@ header_path = join_paths(get_option('prefix'), get_option('includedir'), 'janet'
|
|||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
m_dep = cc.find_library('m', required : false)
|
m_dep = cc.find_library('m', required : false)
|
||||||
dl_dep = cc.find_library('dl', required : false)
|
dl_dep = cc.find_library('dl', required : false)
|
||||||
|
android_spawn_dep = cc.find_library('android-spawn', required : false)
|
||||||
thread_dep = dependency('threads')
|
thread_dep = dependency('threads')
|
||||||
|
|
||||||
# Link options
|
# Link options
|
||||||
@ -160,7 +161,7 @@ mainclient_src = [
|
|||||||
janet_boot = executable('janet-boot', core_src, boot_src,
|
janet_boot = executable('janet-boot', core_src, boot_src,
|
||||||
include_directories : incdir,
|
include_directories : incdir,
|
||||||
c_args : '-DJANET_BOOTSTRAP',
|
c_args : '-DJANET_BOOTSTRAP',
|
||||||
dependencies : [m_dep, dl_dep, thread_dep],
|
dependencies : [m_dep, dl_dep, thread_dep, android_spawn_dep],
|
||||||
native : true)
|
native : true)
|
||||||
|
|
||||||
# Build janet.c
|
# Build janet.c
|
||||||
@ -173,7 +174,7 @@ janetc = custom_target('janetc',
|
|||||||
'JANET_PATH', janet_path
|
'JANET_PATH', janet_path
|
||||||
])
|
])
|
||||||
|
|
||||||
janet_dependencies = [m_dep, dl_dep]
|
janet_dependencies = [m_dep, dl_dep, android_spawn_dep]
|
||||||
if not get_option('single_threaded')
|
if not get_option('single_threaded')
|
||||||
janet_dependencies += thread_dep
|
janet_dependencies += thread_dep
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user