Skip to content

Commit

Permalink
Upgrade dependencies and fix dependency versioning (frida#1533)
Browse files Browse the repository at this point in the history
  • Loading branch information
oleavr authored Nov 25, 2020
1 parent 1f4ad1f commit f0b3f8a
Show file tree
Hide file tree
Showing 37 changed files with 2,670 additions and 1,799 deletions.
30 changes: 1 addition & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,36 +1,8 @@
/.vs
/autoconf
/automake
/bison
/build
/elfutils
/flex
/gettext
/glib
/glib-networking
/glib-schannel
/gn
/deps
/ipch
/json-glib
/libdwarf
/libffi
/libgee
/libiconv
/libpsl
/libsoup
/libtool
/libunwind
/libxml2
/m4
/openssl
/pkg-config
/releng/*.user
/releng/__pycache__/
/releng/modules/frida-gadget-ios/*.dylib
/releng/modules/frida-gadget-ios/node_modules
/sqlite
/stlport
/v8-checkout
/vala
/xz
/zlib
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "capstone"]
path = capstone
url = https://github.com/frida/capstone.git
[submodule "frida-gum"]
path = frida-gum
url = https://github.com/frida/frida-gum.git
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
modules = capstone frida-gum frida-core frida-python frida-node frida-tools
modules = frida-gum frida-core frida-python frida-node frida-tools

all $(MAKECMDGOALS):
@build_os=$$(uname -s | tr '[A-Z]' '[a-z]' | sed 's,^darwin$$,macos,'); \
Expand Down
37 changes: 2 additions & 35 deletions Makefile.linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ help:
@LC_ALL=C perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)


include releng/common.mk
include releng/frida.mk

distclean: clean-submodules
rm -rf build/
Expand All @@ -63,45 +63,13 @@ clean: clean-submodules
rm -rf build/ft-tmp-*-*

clean-submodules:
cd capstone && git clean -xfd
cd frida-gum && git clean -xfd
cd frida-core && git clean -xfd
cd frida-python && git clean -xfd
cd frida-node && git clean -xfd
cd frida-tools && git clean -xfd


define make-capstone-rule
build/$1-%/lib/pkgconfig/capstone.pc: build/$1-env-%.rc build/.capstone-submodule-stamp
. build/$1-env-$$*.rc \
&& export PACKAGE_TARNAME=capstone \
&& . $$$$CONFIG_SITE \
&& case $$* in \
*-x86) capstone_archs="x86" ;; \
*-x86_64) capstone_archs="x86" ;; \
*-arm) capstone_archs="arm" ;; \
*-armbe8) capstone_archs="arm" ;; \
*-armhf) capstone_archs="arm" ;; \
*-armeabi) capstone_archs="arm" ;; \
*-arm64) capstone_archs="aarch64" ;; \
*-mips) capstone_archs="mips" ;; \
*-mipsel) capstone_archs="mips" ;; \
*-mips64) capstone_archs="mips64" ;; \
*-mips64el) capstone_archs="mips64" ;; \
esac \
&& CFLAGS="$$$$CPPFLAGS $$$$CFLAGS -w" make -C capstone \
PREFIX=$$$$frida_prefix \
BUILDDIR=../build/$2-$$*/capstone \
CAPSTONE_BUILD_CORE_ONLY=yes \
CAPSTONE_ARCHS="$$$$capstone_archs" \
CAPSTONE_SHARED=$$$$enable_shared \
CAPSTONE_STATIC=$$$$enable_static \
install
endef
$(eval $(call make-capstone-rule,frida,tmp))
$(eval $(call make-capstone-rule,frida_thin,tmp_thin))


gum-linux-x86: build/frida-linux-x86/lib/pkgconfig/frida-gum-1.0.pc ##@gum Build for Linux/x86
gum-linux-x86_64: build/frida-linux-x86_64/lib/pkgconfig/frida-gum-1.0.pc ##@gum Build for Linux/x86-64
gum-linux-x86-thin: build/frida_thin-linux-x86/lib/pkgconfig/frida-gum-1.0.pc ##@gum Build for Linux/x86 without cross-arch support
Expand All @@ -128,7 +96,7 @@ build/.$1-gum-npm-stamp: build/$1-env-linux-$$(build_arch).rc
. build/$1-meson-env-linux-$$(build_arch).rc && cd frida-gum/bindings/gumjs && $(NPM) install
@touch $$@

build/$1-%/lib/pkgconfig/frida-gum-1.0.pc: build/.frida-gum-submodule-stamp build/.$1-gum-npm-stamp build/$1-%/lib/pkgconfig/capstone.pc
build/$1-%/lib/pkgconfig/frida-gum-1.0.pc: build/.frida-gum-submodule-stamp build/.$1-gum-npm-stamp
. build/$1-meson-env-$$*.rc; \
builddir=build/$2-$$*/frida-gum; \
if [ ! -f $$$$builddir/build.ninja ]; then \
Expand Down Expand Up @@ -486,7 +454,6 @@ check-tools-linux-arm64: build/tmp_thin-linux-arm64/frida-tools-$(PYTHON_NAME)/.
.PHONY: \
help \
distclean clean clean-submodules git-submodules git-submodule-stamps \
capstone-update-submodule-stamp \
gum-linux-x86 gum-linux-x86_64 \
gum-linux-x86-thin gum-linux-x86_64-thin \
gum-linux-arm gum-linux-armbe8 gum-linux-armhf gum-linux-arm64 \
Expand Down
31 changes: 2 additions & 29 deletions Makefile.macos.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ help:
@LC_ALL=C perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)


include releng/common.mk
include releng/frida.mk

distclean: clean-submodules
rm -rf build/
Expand All @@ -69,39 +69,13 @@ clean: clean-submodules
rm -rf build/ft-tmp-*-*

clean-submodules:
cd capstone && git clean -xfd
cd frida-gum && git clean -xfd
cd frida-core && git clean -xfd
cd frida-python && git clean -xfd
cd frida-node && git clean -xfd
cd frida-tools && git clean -xfd


define make-capstone-rule
build/$1-%/lib/pkgconfig/capstone.pc: build/$1-env-%.rc build/.capstone-submodule-stamp
. build/$1-env-$$*.rc \
&& export PACKAGE_TARNAME=capstone \
&& . $$$$CONFIG_SITE \
&& case $1-$$* in \
*-x86) capstone_archs="x86" ;; \
*-x86_64) capstone_archs="x86" ;; \
*-arm) capstone_archs="arm" ;; \
*-arm64*) capstone_archs="aarch64" ;; \
esac \
&& CFLAGS="$$$$CPPFLAGS $$$$CFLAGS -w" make -C capstone \
PREFIX=$$$$frida_prefix \
BUILDDIR=../build/$2-$$*/capstone \
CAPSTONE_BUILD_CORE_ONLY=yes \
CAPSTONE_ARCHS="$$$$capstone_archs" \
CAPSTONE_SHARED=$$$$enable_shared \
CAPSTONE_STATIC=$$$$enable_static \
LIBARCHS="" \
install
endef
$(eval $(call make-capstone-rule,frida,tmp))
$(eval $(call make-capstone-rule,frida_thin,tmp_thin))


gum-macos: gum-macos-$(build_cpu_flavor) ##@gum Build for macOS
gum-macos-apple_silicon: build/frida-macos-arm64/lib/pkgconfig/frida-gum-1.0.pc build/frida-macos-arm64e/lib/pkgconfig/frida-gum-1.0.pc
gum-macos-intel: build/frida-macos-x86_64/lib/pkgconfig/frida-gum-1.0.pc
Expand All @@ -118,7 +92,7 @@ build/.$1-gum-npm-stamp: build/$1-env-macos-$$(build_arch).rc
. build/$1-meson-env-macos-$$(build_arch).rc && cd frida-gum/bindings/gumjs && npm install
@touch $$@

build/$1-%/lib/pkgconfig/frida-gum-1.0.pc: build/.frida-gum-submodule-stamp build/.$1-gum-npm-stamp build/$1-%/lib/pkgconfig/capstone.pc
build/$1-%/lib/pkgconfig/frida-gum-1.0.pc: build/.frida-gum-submodule-stamp build/.$1-gum-npm-stamp
. build/$1-meson-env-$$*.rc; \
builddir=build/$2-$$*/frida-gum; \
if [ ! -f $$$$builddir/build.ninja ]; then \
Expand Down Expand Up @@ -574,7 +548,6 @@ check-tools-macos: tools-macos ##@tools Test CLI tools for macOS

.PHONY: \
distclean clean clean-submodules git-submodules git-submodule-stamps \
capstone-update-submodule-stamp \
gum-macos \
gum-macos-apple_silicon gum-macos-intel \
gum-ios gum-ios-thin \
Expand Down
Loading

0 comments on commit f0b3f8a

Please sign in to comment.