Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[make] Generate haxelib binary with nekotools boot -c on Mac/Linux #11653

Merged
merged 10 commits into from
May 16, 2024
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,17 @@ copy_haxetoolkit: /cygdrive/c/HaxeToolkit/haxe/haxe.exe
endif

# haxelib should depends on haxe, but we don't want to do that...
haxelib:
(cd $(CURDIR)/extra/haxelib_src && $(CURDIR)/$(HAXE_OUTPUT) client.hxml && nekotools boot run.n)
mv extra/haxelib_src/run$(EXTENSION) $(HAXELIB_OUTPUT)
haxelib_unix:
cd $(CURDIR)/extra/haxelib_src && \
HAXE_STD_PATH=$(CURDIR)/std $(CURDIR)/$(HAXE_OUTPUT) client.hxml && \
nekotools boot -c run.n
${CC} $(CURDIR)/extra/haxelib_src/run.c -o $(HAXELIB_OUTPUT) -lneko

ifeq ($(SYSTEM_NAME),Windows)
haxelib: haxelib_$(PLATFORM)
else
haxelib: haxelib_unix
endif

tools: haxelib

Expand Down
7 changes: 7 additions & 0 deletions Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ PACKAGE_FILES=$(HAXE_OUTPUT) $(HAXELIB_OUTPUT) std \
"$$(cygcheck $(CURDIR)/$(HAXE_OUTPUT) | grep libmbedtls.dll | sed -e 's/^\s*//')" \
"$$(cygcheck $(CURDIR)/$(HAXE_OUTPUT) | grep libmbedx509.dll | sed -e 's/^\s*//')"

# haxelib should depends on haxe, but we don't want to do that...
haxelib_win:
cd $(CURDIR)/extra/haxelib_src && \
HAXE_STD_PATH=$(CURDIR)/std $(CURDIR)/$(HAXE_OUTPUT) client.hxml && \
nekotools boot run.n
mv extra/haxelib_src/run$(EXTENSION) $(HAXELIB_OUTPUT)

echo_package_files:
echo $(PACKAGE_FILES)

Expand Down
Loading