diff --git a/Makefile.freebsd.mk b/Makefile.freebsd.mk index a03db3e2c2..3aaf573f5f 100644 --- a/Makefile.freebsd.mk +++ b/Makefile.freebsd.mk @@ -73,7 +73,7 @@ gum: build/frida-freebsd-$(build_arch)/libdata/pkgconfig/frida-gum-1.0.pc ##@gum build/frida-%/libdata/pkgconfig/frida-gum-1.0.pc: build/frida-env-%.rc build/.frida-gum-submodule-stamp - . build/frida-meson-env-$*.rc; \ + . build/frida-env-$*.rc; \ builddir=build/tmp-$*/frida-gum; \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,$*) \ @@ -91,7 +91,7 @@ check-gum: gum ##@gum Run tests core: build/frida-freebsd-$(build_arch)/libdata/pkgconfig/frida-core-1.0.pc ##@core Build build/tmp-%/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp build/frida-%/libdata/pkgconfig/frida-gum-1.0.pc - . build/frida-meson-env-$*.rc; \ + . build/frida-env-$*.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,$*) \ @@ -102,7 +102,7 @@ build/tmp-%/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp bui @touch $@ build/frida-%/libdata/pkgconfig/frida-core-1.0.pc: build/tmp-%/frida-core/.frida-ninja-stamp - . build/frida-meson-env-$*.rc && $(MESON) install -C build/tmp-$*/frida-core + . build/frida-env-$*.rc && $(MESON) install -C build/tmp-$*/frida-core @touch $@ check-core: core ##@core Run tests @@ -112,7 +112,7 @@ check-core: core ##@core Run tests python: build/tmp-freebsd-$(build_arch)/frida-$(PYTHON_NAME)/.frida-stamp ##@python Build Python bindings build/tmp-%/frida-$(PYTHON_NAME)/.frida-stamp: build/.frida-python-submodule-stamp build/frida-%/libdata/pkgconfig/frida-core-1.0.pc - . build/frida-meson-env-$*.rc; \ + . build/frida-env-$*.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,$*) \ @@ -165,7 +165,7 @@ check-node: node ##@node Test Node.js bindings tools: build/tmp-freebsd-$(build_arch)/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools build/tmp-%/frida-tools-$(PYTHON_NAME)/.frida-stamp: build/.frida-tools-submodule-stamp build/tmp-%/frida-$(PYTHON_NAME)/.frida-stamp - . build/frida-meson-env-$*.rc; \ + . build/frida-env-$*.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,$*) \ diff --git a/Makefile.linux.mk b/Makefile.linux.mk index cd0e078237..8d22ae4f39 100644 --- a/Makefile.linux.mk +++ b/Makefile.linux.mk @@ -96,7 +96,7 @@ gum-qnx-armeabi: build/frida_thin-qnx-armeabi/lib/pkgconfig/frida-gum-1.0.pc ##@ define make-gum-rules build/$1-%/lib/pkgconfig/frida-gum-1.0.pc: build/$1-env-%.rc build/.frida-gum-submodule-stamp - . build/$1-meson-env-$$*.rc; \ + . build/$1-env-$$*.rc; \ builddir=build/$2-$$*/frida-gum; \ if [ ! -f $$$$builddir/build.ninja ]; then \ $$(call meson-setup-for-env,$1,$$*) \ @@ -146,7 +146,7 @@ core-qnx-arm: build/frida_thin-qnx-arm/lib/pkgconfig/frida-core-1.0.pc ##@core B core-qnx-armeabi: build/frida_thin-qnx-armeabi/lib/pkgconfig/frida-core-1.0.pc ##@core Build for QNX/armeabi build/tmp-linux-x86/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp build/frida-linux-x86/lib/pkgconfig/frida-gum-1.0.pc - . build/frida-meson-env-linux-x86.rc; \ + . build/frida-env-linux-x86.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,linux-x86) \ @@ -157,7 +157,7 @@ build/tmp-linux-x86/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-s fi @touch $@ build/tmp-linux-x86_64/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp build/frida-linux-x86_64/lib/pkgconfig/frida-gum-1.0.pc - . build/frida-meson-env-linux-x86_64.rc; \ + . build/frida-env-linux-x86_64.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,linux-x86_64) \ @@ -172,7 +172,7 @@ build/tmp-linux-x86_64/frida-core/.frida-ninja-stamp: build/.frida-core-submodul fi @touch $@ build/tmp-android-x86/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp build/frida-android-x86/lib/pkgconfig/frida-gum-1.0.pc - . build/frida-meson-env-android-x86.rc; \ + . build/frida-env-android-x86.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,android-x86) \ @@ -184,7 +184,7 @@ build/tmp-android-x86/frida-core/.frida-ninja-stamp: build/.frida-core-submodule fi @touch $@ build/tmp-android-x86_64/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp build/frida-android-x86_64/lib/pkgconfig/frida-gum-1.0.pc - . build/frida-meson-env-android-x86_64.rc; \ + . build/frida-env-android-x86_64.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,android-x86_64) \ @@ -201,7 +201,7 @@ build/tmp-android-x86_64/frida-core/.frida-ninja-stamp: build/.frida-core-submod fi @touch $@ build/tmp-android-arm/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp build/frida-android-arm/lib/pkgconfig/frida-gum-1.0.pc - . build/frida-meson-env-android-arm.rc; \ + . build/frida-env-android-arm.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,android-arm) \ @@ -212,7 +212,7 @@ build/tmp-android-arm/frida-core/.frida-ninja-stamp: build/.frida-core-submodule fi @touch $@ build/tmp-android-arm64/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp build/frida-android-arm64/lib/pkgconfig/frida-gum-1.0.pc - . build/frida-meson-env-android-arm64.rc; \ + . build/frida-env-android-arm64.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,android-arm64) \ @@ -227,7 +227,7 @@ build/tmp-android-arm64/frida-core/.frida-ninja-stamp: build/.frida-core-submodu fi @touch $@ build/tmp_thin-%/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp build/frida_thin-%/lib/pkgconfig/frida-gum-1.0.pc - . build/frida_thin-meson-env-$*.rc; \ + . build/frida_thin-env-$*.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup-thin,$*) \ @@ -240,41 +240,41 @@ build/tmp_thin-%/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stam build/frida-linux-x86/lib/pkgconfig/frida-core-1.0.pc: build/tmp-linux-x86/frida-core/.frida-helper-and-agent-stamp @rm -f build/tmp-linux-x86/frida-core/src/frida-data-{helper,agent}* - . build/frida-meson-env-linux-x86.rc && $(MESON) install -C build/tmp-linux-x86/frida-core + . build/frida-env-linux-x86.rc && $(MESON) install -C build/tmp-linux-x86/frida-core @touch $@ build/frida-linux-x86_64/lib/pkgconfig/frida-core-1.0.pc: build/tmp-linux-x86/frida-core/.frida-helper-and-agent-stamp build/tmp-linux-x86_64/frida-core/.frida-helper-and-agent-stamp @rm -f build/tmp-linux-x86_64/frida-core/src/frida-data-{helper,agent}* - . build/frida-meson-env-linux-x86_64.rc && $(MESON) install -C build/tmp-linux-x86_64/frida-core + . build/frida-env-linux-x86_64.rc && $(MESON) install -C build/tmp-linux-x86_64/frida-core @touch $@ build/frida-android-x86/lib/pkgconfig/frida-core-1.0.pc: build/tmp-android-x86/frida-core/.frida-helper-and-agent-stamp build/tmp-android-arm/frida-core/.frida-agent-stamp @rm -f build/tmp-android-x86/frida-core/src/frida-data-{helper,agent}* - . build/frida-meson-env-android-x86.rc && $(MESON) install -C build/tmp-android-x86/frida-core + . build/frida-env-android-x86.rc && $(MESON) install -C build/tmp-android-x86/frida-core @touch $@ build/frida-android-x86_64/lib/pkgconfig/frida-core-1.0.pc: build/tmp-android-x86/frida-core/.frida-helper-and-agent-stamp build/tmp-android-x86_64/frida-core/.frida-helper-and-agent-stamp build/tmp-android-arm/frida-core/.frida-agent-stamp build/tmp-android-arm64/frida-core/.frida-agent-stamp @rm -f build/tmp-android-x86_64/frida-core/src/frida-data-{helper,agent}* - . build/frida-meson-env-android-x86_64.rc && $(MESON) install -C build/tmp-android-x86_64/frida-core + . build/frida-env-android-x86_64.rc && $(MESON) install -C build/tmp-android-x86_64/frida-core @touch $@ build/frida-android-arm/lib/pkgconfig/frida-core-1.0.pc: build/tmp-android-arm/frida-core/.frida-helper-and-agent-stamp @rm -f build/tmp-android-arm/frida-core/src/frida-data-{helper,agent}* - . build/frida-meson-env-android-arm.rc && $(MESON) install -C build/tmp-android-arm/frida-core + . build/frida-env-android-arm.rc && $(MESON) install -C build/tmp-android-arm/frida-core @touch $@ build/frida-android-armbe8/lib/pkgconfig/frida-core-1.0.pc: build/tmp-android-armbe8/frida-core/.frida-helper-and-agent-stamp @rm -f build/tmp-android-armbe8/frida-core/src/frida-data-{helper,agent}* - . build/frida-meson-env-android-armbe8.rc && $(MESON) install -C build/tmp-android-armbe8/frida-core + . build/frida-env-android-armbe8.rc && $(MESON) install -C build/tmp-android-armbe8/frida-core @touch $@ build/frida-android-arm64/lib/pkgconfig/frida-core-1.0.pc: build/tmp-android-arm/frida-core/.frida-helper-and-agent-stamp build/tmp-android-arm64/frida-core/.frida-helper-and-agent-stamp @rm -f build/tmp-android-arm64/frida-core/src/frida-data-{helper,agent}* - . build/frida-meson-env-android-arm64.rc && $(MESON) install -C build/tmp-android-arm64/frida-core + . build/frida-env-android-arm64.rc && $(MESON) install -C build/tmp-android-arm64/frida-core @touch $@ build/frida_thin-%/lib/pkgconfig/frida-core-1.0.pc: build/tmp_thin-%/frida-core/.frida-ninja-stamp - . build/frida_thin-meson-env-$*.rc && $(MESON) install -C build/tmp_thin-$*/frida-core + . build/frida_thin-env-$*.rc && $(MESON) install -C build/tmp_thin-$*/frida-core @touch $@ build/tmp-%/frida-core/.frida-helper-and-agent-stamp: build/tmp-%/frida-core/.frida-ninja-stamp - . build/frida-meson-env-$*.rc && ninja -C build/tmp-$*/frida-core src/frida-helper lib/agent/frida-agent.so + . build/frida-env-$*.rc && ninja -C build/tmp-$*/frida-core src/frida-helper lib/agent/frida-agent.so @touch $@ build/tmp-%/frida-core/.frida-agent-stamp: build/tmp-%/frida-core/.frida-ninja-stamp - . build/frida-meson-env-$*.rc && ninja -C build/tmp-$*/frida-core lib/agent/frida-agent.so + . build/frida-env-$*.rc && ninja -C build/tmp-$*/frida-core lib/agent/frida-agent.so @touch $@ check-core-linux-x86: core-linux-x86 ##@core Run tests for Linux/x86 @@ -300,7 +300,7 @@ python-linux-arm64: build/tmp_thin-linux-arm64/frida-$(PYTHON_NAME)/.frida-stamp define make-python-rule build/$2-%/frida-$$(PYTHON_NAME)/.frida-stamp: build/.frida-python-submodule-stamp build/$1-%/lib/pkgconfig/frida-core-1.0.pc - . build/$1-meson-env-$$*.rc; \ + . build/$1-env-$$*.rc; \ builddir=$$(@D); \ if [ ! -f $$$$builddir/build.ninja ]; then \ $$(call meson-setup-for-env,$1,$$*) \ @@ -406,7 +406,7 @@ tools-linux-arm64: build/tmp_thin-linux-arm64/frida-tools-$(PYTHON_NAME)/.frida- define make-tools-rule build/$2-%/frida-tools-$$(PYTHON_NAME)/.frida-stamp: build/.frida-tools-submodule-stamp build/$2-%/frida-$$(PYTHON_NAME)/.frida-stamp - . build/$1-meson-env-$$*.rc; \ + . build/$1-env-$$*.rc; \ builddir=$$(@D); \ if [ ! -f $$$$builddir/build.ninja ]; then \ $$(call meson-setup-for-env,$1,$$*) \ diff --git a/Makefile.macos.mk b/Makefile.macos.mk index 67a8af1016..efca590e7e 100644 --- a/Makefile.macos.mk +++ b/Makefile.macos.mk @@ -89,7 +89,7 @@ gum-android-arm64: build/frida-android-arm64/lib/pkgconfig/frida-gum-1.0.pc ##@g define make-gum-rules build/$1-%/lib/pkgconfig/frida-gum-1.0.pc: build/$1-env-%.rc build/.frida-gum-submodule-stamp - . build/$1-meson-env-$$*.rc; \ + . build/$1-env-$$*.rc; \ builddir=build/$2-$$*/frida-gum; \ if [ ! -f $$$$builddir/build.ninja ]; then \ $$(call meson-setup-for-env,$1,$$*) \ @@ -126,7 +126,7 @@ core-android-arm: build/frida-android-arm/lib/pkgconfig/frida-core-1.0.pc ##@cor core-android-arm64: build/frida-android-arm64/lib/pkgconfig/frida-core-1.0.pc ##@core Build for Android/arm64 build/tmp-macos-arm64/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp build/frida-macos-arm64/lib/pkgconfig/frida-gum-1.0.pc - . build/frida-meson-env-macos-arm64.rc; \ + . build/frida-env-macos-arm64.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,macos-arm64) \ @@ -140,7 +140,7 @@ build/tmp-macos-arm64/frida-core/.frida-ninja-stamp: build/.frida-core-submodule fi @touch $@ build/tmp-macos-arm64e/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp build/frida-macos-arm64e/lib/pkgconfig/frida-gum-1.0.pc - . build/frida-meson-env-macos-arm64e.rc; \ + . build/frida-env-macos-arm64e.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,macos-arm64e) \ @@ -154,7 +154,7 @@ build/tmp-macos-arm64e/frida-core/.frida-ninja-stamp: build/.frida-core-submodul fi @touch $@ build/tmp-macos-x86_64/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp build/frida-macos-x86_64/lib/pkgconfig/frida-gum-1.0.pc - . build/frida-meson-env-macos-x86_64.rc; \ + . build/frida-env-macos-x86_64.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,macos-x86_64) \ @@ -166,7 +166,7 @@ build/tmp-macos-x86_64/frida-core/.frida-ninja-stamp: build/.frida-core-submodul fi @touch $@ build/tmp-android-x86/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp build/frida-android-x86/lib/pkgconfig/frida-gum-1.0.pc - . build/frida-meson-env-android-x86.rc; \ + . build/frida-env-android-x86.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,android-x86) \ @@ -177,7 +177,7 @@ build/tmp-android-x86/frida-core/.frida-ninja-stamp: build/.frida-core-submodule fi @touch $@ build/tmp-android-x86_64/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp build/frida-android-x86_64/lib/pkgconfig/frida-gum-1.0.pc - . build/frida-meson-env-android-x86_64.rc; \ + . build/frida-env-android-x86_64.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,android-x86_64) \ @@ -193,7 +193,7 @@ build/tmp-android-x86_64/frida-core/.frida-ninja-stamp: build/.frida-core-submod fi @touch $@ build/tmp-android-arm/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp build/frida-android-arm/lib/pkgconfig/frida-gum-1.0.pc - . build/frida-meson-env-android-arm.rc; \ + . build/frida-env-android-arm.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,android-arm) \ @@ -203,7 +203,7 @@ build/tmp-android-arm/frida-core/.frida-ninja-stamp: build/.frida-core-submodule fi @touch $@ build/tmp-android-arm64/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp build/frida-android-arm64/lib/pkgconfig/frida-gum-1.0.pc - . build/frida-meson-env-android-arm64.rc; \ + . build/frida-env-android-arm64.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,android-arm64) \ @@ -217,7 +217,7 @@ build/tmp-android-arm64/frida-core/.frida-ninja-stamp: build/.frida-core-submodu fi @touch $@ build/tmp_thin-%/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stamp build/frida_thin-%/lib/pkgconfig/frida-gum-1.0.pc - . build/frida_thin-meson-env-$*.rc; \ + . build/frida_thin-env-$*.rc; \ builddir=$(@D); \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup-thin,$*) \ @@ -229,47 +229,47 @@ build/tmp_thin-%/frida-core/.frida-ninja-stamp: build/.frida-core-submodule-stam build/frida-macos-x86_64/lib/pkgconfig/frida-core-1.0.pc: build/tmp-macos-x86_64/frida-core/.frida-helper-and-agent-stamp @rm -f build/tmp-macos-x86_64/frida-core/src/frida-data-{helper,agent}* - . build/frida-meson-env-macos-x86_64.rc && $(MESON) install -C build/tmp-macos-x86_64/frida-core + . build/frida-env-macos-x86_64.rc && $(MESON) install -C build/tmp-macos-x86_64/frida-core @touch $@ build/frida-macos-arm64/lib/pkgconfig/frida-core-1.0.pc: build/tmp-macos-arm64/frida-core/.frida-helper-and-agent-stamp build/tmp-macos-arm64e/frida-core/.frida-helper-and-agent-stamp @rm -f build/tmp-macos-arm64/frida-core/src/frida-data-{helper,agent}* - . build/frida-meson-env-macos-arm64.rc && $(MESON) install -C build/tmp-macos-arm64/frida-core + . build/frida-env-macos-arm64.rc && $(MESON) install -C build/tmp-macos-arm64/frida-core @touch $@ build/frida-macos-arm64e/lib/pkgconfig/frida-core-1.0.pc: build/tmp-macos-arm64/frida-core/.frida-helper-and-agent-stamp build/tmp-macos-arm64e/frida-core/.frida-helper-and-agent-stamp @rm -f build/tmp-macos-arm64e/frida-core/src/frida-data-{helper,agent}* - . build/frida-meson-env-macos-arm64e.rc && $(MESON) install -C build/tmp-macos-arm64e/frida-core + . build/frida-env-macos-arm64e.rc && $(MESON) install -C build/tmp-macos-arm64e/frida-core @touch $@ build/frida-android-x86/lib/pkgconfig/frida-core-1.0.pc: build/tmp-android-x86/frida-core/.frida-helper-and-agent-stamp build/tmp-android-arm/frida-core/.frida-agent-stamp @rm -f build/tmp-android-x86/frida-core/src/frida-data-{helper,agent}* - . build/frida-meson-env-android-x86.rc && $(MESON) install -C build/tmp-android-x86/frida-core + . build/frida-env-android-x86.rc && $(MESON) install -C build/tmp-android-x86/frida-core @touch $@ build/frida-android-x86_64/lib/pkgconfig/frida-core-1.0.pc: build/tmp-android-x86/frida-core/.frida-helper-and-agent-stamp build/tmp-android-x86_64/frida-core/.frida-helper-and-agent-stamp build/tmp-android-arm/frida-core/.frida-agent-stamp build/tmp-android-arm64/frida-core/.frida-agent-stamp @rm -f build/tmp-android-x86_64/frida-core/src/frida-data-{helper,agent}* - . build/frida-meson-env-android-x86_64.rc && $(MESON) install -C build/tmp-android-x86_64/frida-core + . build/frida-env-android-x86_64.rc && $(MESON) install -C build/tmp-android-x86_64/frida-core @touch $@ build/frida-android-arm/lib/pkgconfig/frida-core-1.0.pc: build/tmp-android-arm/frida-core/.frida-helper-and-agent-stamp @rm -f build/tmp-android-arm/frida-core/src/frida-data-{helper,agent}* - . build/frida-meson-env-android-arm.rc && $(MESON) install -C build/tmp-android-arm/frida-core + . build/frida-env-android-arm.rc && $(MESON) install -C build/tmp-android-arm/frida-core @touch $@ build/frida-android-arm64/lib/pkgconfig/frida-core-1.0.pc: build/tmp-android-arm/frida-core/.frida-helper-and-agent-stamp build/tmp-android-arm64/frida-core/.frida-helper-and-agent-stamp @rm -f build/tmp-android-arm64/frida-core/src/frida-data-{helper,agent}* - . build/frida-meson-env-android-arm64.rc && $(MESON) install -C build/tmp-android-arm64/frida-core + . build/frida-env-android-arm64.rc && $(MESON) install -C build/tmp-android-arm64/frida-core @touch $@ build/frida_thin-%/lib/pkgconfig/frida-core-1.0.pc: build/tmp_thin-%/frida-core/.frida-ninja-stamp - . build/frida_thin-meson-env-$*.rc && $(MESON) install -C build/tmp_thin-$*/frida-core + . build/frida_thin-env-$*.rc && $(MESON) install -C build/tmp_thin-$*/frida-core @touch $@ build/tmp-macos-%/frida-core/.frida-helper-and-agent-stamp: build/tmp-macos-%/frida-core/.frida-ninja-stamp - . build/frida-meson-env-macos-$*.rc && ninja -C build/tmp-macos-$*/frida-core src/frida-helper lib/agent/frida-agent.dylib + . build/frida-env-macos-$*.rc && ninja -C build/tmp-macos-$*/frida-core src/frida-helper lib/agent/frida-agent.dylib @touch $@ build/tmp-macos-%/frida-core/.frida-agent-stamp: build/tmp-macos-%/frida-core/.frida-ninja-stamp - . build/frida-meson-env-macos-$*.rc && ninja -C build/tmp-macos-$*/frida-core lib/agent/frida-agent.dylib + . build/frida-env-macos-$*.rc && ninja -C build/tmp-macos-$*/frida-core lib/agent/frida-agent.dylib @touch $@ build/tmp-android-%/frida-core/.frida-helper-and-agent-stamp: build/tmp-android-%/frida-core/.frida-ninja-stamp - . build/frida-meson-env-android-$*.rc && ninja -C build/tmp-android-$*/frida-core src/frida-helper lib/agent/frida-agent.so + . build/frida-env-android-$*.rc && ninja -C build/tmp-android-$*/frida-core src/frida-helper lib/agent/frida-agent.so @touch $@ build/tmp-android-%/frida-core/.frida-agent-stamp: build/tmp-android-%/frida-core/.frida-ninja-stamp - . build/frida-meson-env-android-$*.rc && ninja -C build/tmp-android-$*/frida-core lib/agent/frida-agent.so + . build/frida-env-android-$*.rc && ninja -C build/tmp-android-$*/frida-core lib/agent/frida-agent.so @touch $@ build/frida-macos-universal/lib/frida/frida-gadget.dylib: \ @@ -277,7 +277,7 @@ build/frida-macos-universal/lib/frida/frida-gadget.dylib: \ build/frida-macos-arm64/lib/pkgconfig/frida-core-1.0.pc \ build/frida-macos-arm64e/lib/pkgconfig/frida-core-1.0.pc @mkdir -p $(@D) - . build/frida-meson-env-macos-$(build_arch).rc \ + . build/frida-env-macos-$(build_arch).rc \ && $$LIPO \ build/frida-macos-x86_64/lib/frida/frida-gadget.dylib \ build/frida-macos-arm64/lib/frida/frida-gadget.dylib \ @@ -293,7 +293,7 @@ build/frida-ios-universal/usr/bin/frida-server: \ build/frida-ios-arm64e/usr/lib/pkgconfig/frida-core-1.0.pc \ $(ios_arm64eoabi_target) @mkdir -p $(@D) build/frida-ios-universal/usr/lib/frida - . build/frida-meson-env-ios-arm64e.rc \ + . build/frida-env-ios-arm64e.rc \ && agent=build/frida-ios-universal/usr/lib/frida/frida-agent.dylib \ && $$LIPO \ build/frida-ios-arm64/usr/lib/frida/frida-agent.dylib \ @@ -318,7 +318,7 @@ build/frida-ios-universal/usr/lib/frida/frida-gadget.dylib: \ build/frida-ios-arm64/usr/lib/pkgconfig/frida-core-1.0.pc \ build/frida-ios-arm64e/usr/lib/pkgconfig/frida-core-1.0.pc @mkdir -p $(@D) - . build/frida-meson-env-ios-arm64e.rc \ + . build/frida-env-ios-arm64e.rc \ && $$LIPO \ build/frida-ios-x86_64/usr/lib/frida/frida-gadget.dylib \ build/frida-ios-arm64/usr/lib/frida/frida-gadget.dylib \ @@ -330,13 +330,11 @@ build/frida-ios-universal/usr/lib/frida/frida-gadget.dylib: \ && mv $@.tmp $@ define make-ios-env-rule -build/frida-meson-env-ios-$1.rc: releng/setup-env.sh releng/config.site.in build/frida-version.h +build/frida-env-ios-$1.rc: releng/setup-env.sh build/frida-version.h @for os_arch in $$(build_os_arch) ios-$1; do \ - if [ ! -f build/frida-meson-env-$$$$os_arch.rc ]; then \ + if [ ! -f build/frida-env-$$$$os_arch.rc ]; then \ FRIDA_HOST=$$$$os_arch \ FRIDA_PREFIX="$$(abspath build/frida-ios-$1/usr)" \ - FRIDA_ACOPTFLAGS="$$(FRIDA_ACOPTFLAGS_COMMON)" \ - FRIDA_ACDBGFLAGS="$$(FRIDA_ACDBGFLAGS_COMMON)" \ FRIDA_ASAN=$$(FRIDA_ASAN) \ XCODE11="$$(XCODE11)" \ ./releng/setup-env.sh || exit 1; \ @@ -349,8 +347,8 @@ $(eval $(call make-ios-env-rule,arm64)) $(eval $(call make-ios-env-rule,arm64e)) $(eval $(call make-ios-env-rule,arm64eoabi)) -build/frida-ios-%/usr/lib/pkgconfig/frida-gum-1.0.pc: build/frida-meson-env-ios-%.rc build/.frida-gum-submodule-stamp - . build/frida-meson-env-ios-$*.rc; \ +build/frida-ios-%/usr/lib/pkgconfig/frida-gum-1.0.pc: build/frida-env-ios-%.rc build/.frida-gum-submodule-stamp + . build/frida-env-ios-$*.rc; \ builddir=build/tmp-ios-$*/frida-gum; \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,ios-$*) \ @@ -362,7 +360,7 @@ build/frida-ios-%/usr/lib/pkgconfig/frida-gum-1.0.pc: build/frida-meson-env-ios- && DESTDIR="$(abspath build/frida-ios-$*)" $(MESON) install -C $$builddir @touch $@ build/frida-ios-%/usr/lib/pkgconfig/frida-core-1.0.pc: build/.frida-core-submodule-stamp build/frida-ios-%/usr/lib/pkgconfig/frida-gum-1.0.pc - . build/frida-meson-env-ios-$*.rc; \ + . build/frida-env-ios-$*.rc; \ builddir=build/tmp-ios-$*/frida-core; \ if [ ! -f $$builddir/build.ninja ]; then \ $(call meson-setup,ios-$*) \ @@ -402,7 +400,7 @@ python-macos-intel: build/frida-macos-intel/lib/$(PYTHON_NAME)/site-packages/fri define make-python-rule build/$2-%/frida-$$(PYTHON_NAME)/.frida-stamp: build/.frida-python-submodule-stamp build/$1-%$(PYTHON_PREFIX)/lib/pkgconfig/frida-core-1.0.pc - . build/$1-meson-env-$$*.rc; \ + . build/$1-env-$$*.rc; \ builddir=$$(@D); \ if [ ! -f $$$$builddir/build.ninja ]; then \ $$(call meson-setup-for-env,$1,$$*) \ @@ -507,7 +505,7 @@ tools-macos: build/frida-macos-$(build_cpu_flavor)/bin/frida build/frida-macos-$ define make-tools-rule build/$2-%/frida-tools-$$(PYTHON_NAME)/.frida-stamp: build/.frida-tools-submodule-stamp build/$2-%/frida-$$(PYTHON_NAME)/.frida-stamp - . build/$1-meson-env-$$*.rc; \ + . build/$1-env-$$*.rc; \ builddir=$$(@D); \ if [ ! -f $$$$builddir/build.ninja ]; then \ $$(call meson-setup-for-env,$1,$$*) \ diff --git a/Makefile.sdk.mk b/Makefile.sdk.mk index 25e5a6af30..b4e7dc6178 100644 --- a/Makefile.sdk.mk +++ b/Makefile.sdk.mk @@ -467,7 +467,7 @@ build/fs-%/manifest/gn.pkg: build/fs-tmp-%/gn/build.ninja @prefix=build/fs-$*; \ builddir=build/fs-tmp-$*/gn; \ (set -x \ - && . build/fs-meson-env-$*.rc \ + && . build/fs-env-$*.rc \ && ninja -C $$builddir \ && install -d $$prefix/bin \ && install -m 755 $$builddir/gn $$prefix/bin \ @@ -545,7 +545,7 @@ build/fs-%/manifest/v8.pkg: build/fs-tmp-%/v8/build.ninja srcdir=deps/v8-checkout/v8; \ builddir=build/fs-tmp-$*/v8; \ (set -x \ - && . build/fs-meson-env-$*.rc \ + && . build/fs-env-$*.rc \ && $(xcode_env_setup) \ && ninja -C $$builddir v8_monolith \ && install -d $$prefix/include/v8-$(v8_api_version)/v8 \ @@ -609,7 +609,7 @@ build/fs-%/manifest/libcxx.pkg: build/fs-%/manifest/v8.pkg srcdir=deps/v8-checkout/v8; \ builddir=build/fs-tmp-$*/v8; \ (set -x \ - && . build/fs-meson-env-$*.rc \ + && . build/fs-env-$*.rc \ && $(xcode_env_setup) \ && ninja -C $$builddir libc++ \ && install -d $$prefix/include/c++/ \ @@ -649,8 +649,6 @@ build/fs-env-%.rc: @for os_arch in $(build_os_arch) $*; do \ if [ ! -f build/fs-env-$$os_arch.rc ]; then \ FRIDA_HOST=$$os_arch \ - FRIDA_ACOPTFLAGS="$(FRIDA_ACOPTFLAGS_BOTTLE)" \ - FRIDA_ACDBGFLAGS="$(FRIDA_ACDBGFLAGS_BOTTLE)" \ FRIDA_ASAN=$(FRIDA_ASAN) \ FRIDA_ENV_NAME=fs \ FRIDA_ENV_SDK=none \ diff --git a/Makefile.toolchain.mk b/Makefile.toolchain.mk index 7c08e9d532..c009ae0515 100644 --- a/Makefile.toolchain.mk +++ b/Makefile.toolchain.mk @@ -25,8 +25,6 @@ export_ldflags := -Wl,--version-script,$(shell pwd)/build/ft-executable.version endif frida_env_config := \ - FRIDA_ACOPTFLAGS="$(FRIDA_ACOPTFLAGS_BOTTLE)" \ - FRIDA_ACDBGFLAGS="$(FRIDA_ACDBGFLAGS_BOTTLE)" \ FRIDA_EXTRA_LDFLAGS="$(export_ldflags)" \ FRIDA_ASAN=$(FRIDA_ASAN) \ FRIDA_ENV_NAME=ft \ diff --git a/config.mk b/config.mk index c4321d146e..de23dfeea5 100644 --- a/config.mk +++ b/config.mk @@ -14,20 +14,14 @@ FRIDA_SWIFT_BRIDGE ?= auto FRIDA_ASAN ?= no ifeq ($(FRIDA_ASAN), yes) -FRIDA_MESONFLAGS_COMMON := -Doptimization=1 -Db_sanitize=address -FRIDA_MESONFLAGS_BOTTLE := -Doptimization=1 -Db_sanitize=address -FRIDA_ACOPTFLAGS_COMMON ?= -O1 -FRIDA_ACOPTFLAGS_BOTTLE ?= -O1 +FRIDA_FLAGS_COMMON := -Doptimization=1 -Db_sanitize=address +FRIDA_FLAGS_BOTTLE := -Doptimization=1 -Db_sanitize=address else -FRIDA_MESONFLAGS_COMMON := -Doptimization=s -Db_ndebug=true --strip -FRIDA_MESONFLAGS_BOTTLE := -Doptimization=s -Db_ndebug=true -FRIDA_ACOPTFLAGS_COMMON ?= -Os -FRIDA_ACOPTFLAGS_BOTTLE ?= -Os +FRIDA_FLAGS_COMMON := -Doptimization=s -Db_ndebug=true --strip +FRIDA_FLAGS_BOTTLE := -Doptimization=s -Db_ndebug=true endif -FRIDA_ACDBGFLAGS_COMMON ?= -g3 -FRIDA_ACDBGFLAGS_BOTTLE ?= -g1 -FRIDA_MAPPER_FLAGS := -Dmapper=auto +FRIDA_MAPPER := -Dmapper=auto XCODE11 ?= /Applications/Xcode-11.7.app diff --git a/releng/config.site.in b/releng/config.site.in deleted file mode 100644 index 16ccb94ae6..0000000000 --- a/releng/config.site.in +++ /dev/null @@ -1,137 +0,0 @@ -# config.site for configure - -if [ -z "$PACKAGE_TARNAME" ]; then - PACKAGE_TARNAME=$(basename $(dirname "$0")) -fi - -frida_build_os_arch=@frida_build_os_arch@ -frida_host_os_arch=@frida_host_os_arch@ -frida_libc=@frida_libc@ -frida_prefix=@frida_prefix@ - -test "$prefix" = NONE && prefix="$frida_prefix" - -enable_nls=no -enable_silent_rules=yes - -frida_flags="@frida_optimization_flags@ -pipe @frida_debug_flags@" - -case $frida_host_os_arch in - linux-arm) - host_alias="arm-linux-gnueabi" - ;; - linux-armbe8) - host_alias="arm-linux-gnueabi" - ;; - linux-armhf) - host_alias="arm-linux-gnueabihf" - - frida_flags="$frida_flags -mthumb" - ;; - linux-arm64) - host_alias="aarch64-linux-gnu" - ;; - linux-mips) - host_alias="mips-linux-$frida_libc" - ;; - linux-mipsel) - host_alias="mipsel-linux-$frida_libc" - ;; - linux-mips64) - host_alias="mips64-linux-$frida_libc" - ;; - linux-x86) - host_alias="i686-linux-gnu" - ;; - linux-x86_64) - host_alias="x86_64-linux-gnu" - ;; - linux-s390x) - host_alias="s390x-linux-gnu" - ;; - qnx-x86) - host_alias="i486-pc-nto-qnx6.6.0" - ;; - qnx-armeabi) - host_alias="arm-unknown-nto-qnx6.5.0eabi" - ;; - qnx-arm) - host_alias="arm-unknown-nto-qnx6.5.0" - ;; - android-x86) - host_alias="i686-none-linux-android" - ;; - android-x86_64) - host_alias="x86_64-none-linux-android" - ;; - android-arm) - host_alias="armv7-none-linux-androideabi" - - frida_flags="$frida_flags -mthumb" - ;; - android-arm64) - host_alias="aarch64-none-linux-android" - ;; - macos-x86|ios-x86) - host_alias="i686-apple-darwin" - ;; - ios-x86_64) - host_alias="x86_64-apple-darwin" - ;; - ios-arm) - host_alias="arm-apple-darwin" - - frida_flags="$frida_flags -mthumb" - ;; - macos-arm64|macos-arm64e|ios-arm64|ios-arm64e|ios-arm64eoabi) - host_alias="aarch64-apple-darwin" - ;; -esac - -if [ $frida_host_os_arch != $frida_build_os_arch ]; then - cross_compiling=yes -else - cross_compiling=no -fi - -ac_cv_func_malloc_0_nonnull=yes -ac_cv_func_realloc_0_nonnull=yes - -case $frida_host_os_arch in - android-*) - ac_cv_sys_file_offset_bits=no - ;; -esac - -# Work around a bug in stdint generation m4, where CFLAGS is overwritten, -# causing this check to conclude that there's no stdint.h support... -ac_cv_header_stdint_t=yes - -if [ -x /usr/bin/install ]; then - ac_cv_path_install="/usr/bin/install -p" -fi - -if [ -z "$enable_shared" ]; then - enable_shared=no -fi -if [ -z "$enable_static" ]; then - enable_static=yes -fi - -case "$PACKAGE_TARNAME" in - elfutils) - case $frida_host_os_arch in - android-x86|android-arm) - ac_cv_have_decl_mempcpy=no - ;; - esac - ;; - libunwind) - CFLAGS="$CFLAGS -I$frida_prefix/include" - LDFLAGS="$LDFLAGS -L$frida_prefix/lib" - ;; -esac - -CFLAGS="$CFLAGS $frida_flags" -CXXFLAGS="$CXXFLAGS $frida_flags" -OBJCFLAGS="$OBJCFLAGS $frida_flags" diff --git a/releng/deps.mk b/releng/deps.mk index e76924a92c..57b4ee60c3 100644 --- a/releng/deps.mk +++ b/releng/deps.mk @@ -639,7 +639,7 @@ build/$2-%/manifest/$1.pkg: build/$2-env-%.rc deps/.$1-stamp \ $(RM) -r $$$$builddir; \ mkdir -p $$$$builddir; \ (set -x \ - && . build/$2-meson-env-$$*.rc \ + && . build/$2-env-$$*.rc \ && export PATH="$$(shell pwd)/build/$2-$(build_os_arch)/bin:$$$$PATH" \ && $(call print-status,$1,Configuring) \ && $(MESON) \ @@ -647,7 +647,7 @@ build/$2-%/manifest/$1.pkg: build/$2-env-%.rc deps/.$1-stamp \ --prefix "$$$$prefix" \ --libdir "$$$$prefix/lib" \ --default-library static \ - $$(FRIDA_MESONFLAGS_BOTTLE) \ + $$(FRIDA_FLAGS_BOTTLE) \ $$($$(subst -,_,$1)_options) \ $$$$builddir \ deps/$1 \ @@ -702,7 +702,9 @@ build/$2-tmp-%/$1/Makefile: build/$2-env-%.rc deps/.$1-stamp \ && . $$< \ && export PATH="$$(shell pwd)/build/$2-$(build_os_arch)/bin:$$$$PATH" \ && cd $$(@D) \ - && ../../../deps/$1/configure $$($$(subst -,_,$1)_options) \ + && ../../../deps/$1/configure \ + --prefix=$$(shell pwd)/build/$2-$$* \ + $$($$(subst -,_,$1)_options) \ ) >$$(@D)/build.log 2>&1 || (echo "failed - see $$(@D)/build.log for more information"; exit 1) endef @@ -765,7 +767,7 @@ $1: build/$2-$3/manifest/$1.pkg builddir=build/$2-tmp-$3/$1; \ export PATH="$$(shell pwd)/build/$2-$(build_os_arch)/bin:$$$$PATH"; \ if [ -f deps/$1/meson.build ]; then \ - . build/$2-meson-env-$3.rc; \ + . build/$2-env-$3.rc; \ $(MESON) install -C $$$$builddir; \ else \ echo "Incremental compilation not supported for: $1"; \ diff --git a/releng/frida.mk b/releng/frida.mk index 77cf97065e..0f9843e77a 100644 --- a/releng/frida.mk +++ b/releng/frida.mk @@ -6,7 +6,7 @@ FOR_HOST ?= $(build_os_arch) frida_gum_flags := \ --default-library static \ - $(FRIDA_MESONFLAGS_COMMON) \ + $(FRIDA_FLAGS_COMMON) \ -Dgumpp=enabled \ -Dgumjs=enabled \ -Dv8=$(FRIDA_V8) \ @@ -18,31 +18,27 @@ frida_gum_flags := \ $(NULL) frida_core_flags := \ --default-library static \ - $(FRIDA_MESONFLAGS_COMMON) \ + $(FRIDA_FLAGS_COMMON) \ -Dconnectivity=$(FRIDA_CONNECTIVITY) \ - $(FRIDA_MAPPER_FLAGS) + $(FRIDA_MAPPER) frida_tools = frida frida-discover frida-kill frida-ls-devices frida-ps frida-trace v8_api_version = 8.0 -build/frida-env-%.rc: releng/setup-env.sh releng/config.site.in build/frida-version.h +build/frida-env-%.rc: releng/setup-env.sh build/frida-version.h @for os_arch in $(build_os_arch) $*; do \ if [ ! -f build/frida-env-$$os_arch.rc ]; then \ FRIDA_HOST=$$os_arch \ - FRIDA_ACOPTFLAGS="$(FRIDA_ACOPTFLAGS_COMMON)" \ - FRIDA_ACDBGFLAGS="$(FRIDA_ACDBGFLAGS_COMMON)" \ FRIDA_ASAN=$(FRIDA_ASAN) \ XCODE11="$(XCODE11)" \ ./releng/setup-env.sh || exit 1; \ fi \ done -build/frida_thin-env-%.rc: releng/setup-env.sh releng/config.site.in build/frida-version.h +build/frida_thin-env-%.rc: releng/setup-env.sh build/frida-version.h @for os_arch in $(build_os_arch) $*; do \ if [ ! -f build/frida_thin-env-$$os_arch.rc ]; then \ FRIDA_HOST=$$os_arch \ - FRIDA_ACOPTFLAGS="$(FRIDA_ACOPTFLAGS_COMMON)" \ - FRIDA_ACDBGFLAGS="$(FRIDA_ACDBGFLAGS_COMMON)" \ FRIDA_ASAN=$(FRIDA_ASAN) \ FRIDA_ENV_NAME=frida_thin \ XCODE11="$(XCODE11)" \ @@ -51,17 +47,14 @@ build/frida_thin-env-%.rc: releng/setup-env.sh releng/config.site.in build/frida done @cd $(FRIDA)/build/; \ [ ! -e frida-env-$*.rc ] && ln -s frida_thin-env-$*.rc frida-env-$*.rc; \ - [ ! -e frida-meson-env-$*.rc ] && ln -s frida_thin-meson-env-$*.rc frida-meson-env-$*.rc; \ [ ! -d frida-$* ] && ln -s frida_thin-$* frida-$*; \ [ ! -d sdk-$* ] && ln -s frida_thin-sdk-$* sdk-$*; \ [ ! -d toolchain-$* ] && ln -s frida_thin-toolchain-$* toolchain-$*; \ true -build/frida_gir-env-%.rc: releng/setup-env.sh releng/config.site.in build/frida-version.h +build/frida_gir-env-%.rc: releng/setup-env.sh build/frida-version.h @for os_arch in $(build_os_arch) $*; do \ if [ ! -f build/frida_gir-env-$$os_arch.rc ]; then \ FRIDA_HOST=$$os_arch \ - FRIDA_ACOPTFLAGS="$(FRIDA_ACOPTFLAGS_COMMON)" \ - FRIDA_ACDBGFLAGS="$(FRIDA_ACDBGFLAGS_COMMON)" \ FRIDA_ASAN=$(FRIDA_ASAN) \ FRIDA_ENV_NAME=frida_gir \ XCODE11="$(XCODE11)" \ @@ -70,7 +63,6 @@ build/frida_gir-env-%.rc: releng/setup-env.sh releng/config.site.in build/frida- done @cd $(FRIDA)/build/; \ [ ! -e frida-env-$*.rc ] && ln -s frida_gir-env-$*.rc frida-env-$*.rc; \ - [ ! -e frida-meson-env-$*.rc ] && ln -s frida_gir-meson-env-$*.rc frida-meson-env-$*.rc; \ [ ! -d frida-$* ] && ln -s frida_gir-$* frida-$*; \ [ ! -d sdk-$* ] && ln -s frida_gir-sdk-$* sdk-$*; \ [ ! -d toolchain-$* ] && ln -s frida_gir-toolchain-$* toolchain-$*; \ diff --git a/releng/setup-env.sh b/releng/setup-env.sh index 1c4eb328a8..e46d8f46e4 100755 --- a/releng/setup-env.sh +++ b/releng/setup-env.sh @@ -978,14 +978,6 @@ else meson_version_include="" fi -ACLOCAL_FLAGS="-I $FRIDA_PREFIX/share/aclocal" -if [ "$FRIDA_ENV_SDK" != 'none' ]; then - ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $FRIDA_SDKROOT/share/aclocal" -fi -ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $FRIDA_TOOLROOT/share/aclocal" -ACLOCAL="aclocal $ACLOCAL_FLAGS" -CONFIG_SITE="$FRIDA_BUILD/${frida_env_name_prefix}config-${host_os_arch}.site" - VALAC="$FRIDA_BUILD/${FRIDA_ENV_NAME:-frida}-${host_os_arch}-valac" vala_impl="$FRIDA_TOOLROOT/bin/valac-$vala_api_version" vala_flags="--vapidir=\"$FRIDA_PREFIX/share/vala/vapi\"" @@ -1043,7 +1035,6 @@ fi chmod 755 "$PKG_CONFIG" env_rc=${FRIDA_BUILD}/${FRIDA_ENV_NAME:-frida}-env-${host_os_arch}.rc -meson_env_rc=${FRIDA_BUILD}/${FRIDA_ENV_NAME:-frida}-meson-env-${host_os_arch}.rc if [ "$FRIDA_ENV_SDK" != 'none' ]; then env_path_sdk="$FRIDA_SDKROOT/bin:" @@ -1056,35 +1047,17 @@ fi echo "export PKG_CONFIG=\"$PKG_CONFIG\"" echo "export PKG_CONFIG_PATH=\"$pkg_config_path\"" echo "export VALAC=\"$VALAC\"" - echo "export CPP=\"$CPP\"" echo "export CPPFLAGS=\"$CPPFLAGS\"" echo "export CC=\"$CC\"" echo "export CFLAGS=\"$CFLAGS\"" echo "export CXX=\"$CXX\"" echo "export CXXFLAGS=\"$CXXFLAGS\"" - echo "export LD=\"$LD\"" echo "export LDFLAGS=\"$LDFLAGS\"" echo "export AR=\"$AR\"" echo "export NM=\"$NM\"" - echo "export RANLIB=\"$RANLIB\"" echo "export STRIP=\"$strip_wrapper\"" - echo "export ACLOCAL_FLAGS=\"$ACLOCAL_FLAGS\"" - echo "export ACLOCAL=\"$ACLOCAL\"" - echo "export CONFIG_SITE=\"$CONFIG_SITE\"" ) > $env_rc -if [ -n "$READELF" ]; then - echo "export READELF=\"$READELF\"" >> $env_rc -fi - -if [ -n "$OBJCOPY" ]; then - echo "export OBJCOPY=\"$OBJCOPY\"" >> $env_rc -fi - -if [ -n "$OBJDUMP" ]; then - echo "export OBJDUMP=\"$OBJDUMP\"" >> $env_rc -fi - case $host_os in macos|ios) ( @@ -1100,88 +1073,24 @@ case $host_os in ;; esac -case $host_os in - macos) - ( - echo "export MACOSX_DEPLOYMENT_TARGET=$macos_minver" - ) >> $env_rc - ;; -esac - -sed \ - -e "s,@frida_build_os_arch@,$build_os_arch,g" \ - -e "s,@frida_host_os_arch@,$host_os_arch,g" \ - -e "s,@frida_prefix@,$FRIDA_PREFIX,g" \ - -e "s,@frida_optimization_flags@,$FRIDA_ACOPTFLAGS,g" \ - -e "s,@frida_debug_flags@,$FRIDA_ACDBGFLAGS,g" \ - -e "s,@frida_libc@,$frida_libc,g" \ - "$FRIDA_RELENG/config.site.in" > "$CONFIG_SITE" - -( - echo "export PATH=\"${env_path_sdk}${FRIDA_TOOLROOT}/bin:\$PATH\"" - echo "export PKG_CONFIG=\"$PKG_CONFIG\"" - echo "export PKG_CONFIG_PATH=\"$pkg_config_path\"" - echo "export VALAC=\"$VALAC\"" - echo "export CPPFLAGS=\"$CPPFLAGS\"" - echo "export CC=\"$CC\"" - echo "export CFLAGS=\"$CFLAGS\"" - echo "export CXX=\"$CXX\"" - echo "export CXXFLAGS=\"$CXXFLAGS\"" - echo "export LDFLAGS=\"$LDFLAGS\"" - echo "export AR=\"$AR\"" - echo "export NM=\"$NM\"" - echo "export STRIP=\"$strip_wrapper\"" -) > $meson_env_rc - -case $host_os in - macos|ios) - ( - echo "export INSTALL_NAME_TOOL=\"$INSTALL_NAME_TOOL\"" - echo "export OTOOL=\"$OTOOL\"" - echo "export CODESIGN=\"$CODESIGN\"" - echo "export LIPO=\"$LIPO\"" - echo "export OBJC=\"$OBJC\"" - echo "export OBJCXX=\"$OBJCXX\"" - echo "export OBJCFLAGS=\"$CFLAGS\"" - echo "export OBJCXXFLAGS=\"$CXXFLAGS\"" - ) >> $meson_env_rc - ;; -esac - if [ -n "$meson_linker_flavor" ]; then ( echo "export CC_LD=$meson_linker_flavor" echo "export CXX_LD=$meson_linker_flavor" - ) >> $meson_env_rc - [ -n "$meson_objc" ] && echo "export OBJC_LD=$meson_linker_flavor" >> $meson_env_rc - [ -n "$meson_objcpp" ] && echo "export OBJCXX_LD=$meson_linker_flavor" >> $meson_env_rc + ) >> $env_rc + [ -n "$meson_objc" ] && echo "export OBJC_LD=$meson_linker_flavor" >> $env_rc + [ -n "$meson_objcpp" ] && echo "export OBJCXX_LD=$meson_linker_flavor" >> $env_rc fi case $host_os in macos) ( echo "export MACOSX_DEPLOYMENT_TARGET=$macos_minver" - ) >> $meson_env_rc + ) >> $env_rc ;; esac -build_env_rc=${FRIDA_BUILD}/${FRIDA_ENV_NAME:-frida}-meson-env-${build_os_arch}.rc -if [ ! -f $build_env_rc ]; then - ( - echo "" - echo "Need an environment for the build machine to be able to generate an environment for $host_os_arch." - echo "It can be generated like this:" - echo "" - echo " FRIDA_HOST=$build_os_arch releng/setup-env.sh" - echo "" - ) > /dev/stderr - exit 1 -fi -egrep "^export (PKG_CONFIG|CC|CXX|OBJC|OBJCXX|CPPFLAGS|CFLAGS|CXXFLAGS|CC_LD|CXX_LD|OBJC_LD|OBJCXX_LD|LDFLAGS|AR)=" $build_env_rc \ - | sed -e "s,=,_FOR_BUILD=," \ - >> $meson_env_rc - -meson_cross_file=${FRIDA_BUILD}/${FRIDA_ENV_NAME:-frida}-${host_os_arch}.txt +meson_machine_file=${FRIDA_BUILD}/${FRIDA_ENV_NAME:-frida}-${host_os_arch}.txt ( echo "[constants]" @@ -1262,4 +1171,4 @@ meson_cross_file=${FRIDA_BUILD}/${FRIDA_ENV_NAME:-frida}-${host_os_arch}.txt echo "cpu_family = '$meson_host_cpu_family'" echo "cpu = '$meson_host_cpu'" echo "endian = '$meson_host_endian'" -) > $meson_cross_file +) > $meson_machine_file