# This file is autogenerated by acr-wrap

WRAP_wrap_git_url:=https://github.com/radareorg/ghidra-native
WRAP_wrap_git_revision:=0.6.4
WRAP_wrap_git_directory:=ghidra-native
WRAP_wrap_git_patch_directory:=ghidra-native
WRAP_wrap_git_diff_files:=ghidra-native/patches/0001-space-after-comma.patch,ghidra-native/patches/0002-make-sleigharch-public.patch,ghidra-native/patches/0004-public-fields.patch,ghidra-native/patches/0006-readonly-warning.patch,ghidra-native/patches/0010-null-subflow.patch,ghidra-native/patches/0020-Fix-double-free-crash-when-deinitializing-multiple-X.patch,ghidra-native/patches/0023-Undef-LoadImage-for-windows.patch,ghidra-native/patches/0024-ignore-symbol-beyond-space.patch,ghidra-native/patches/0044-bad-unicode-codepoint.patch,ghidra-native/patches/0055-datatype-clone.patch,ghidra-native/patches/0056-nullderef-workaround.patch,ghidra-native/patches/0080-getparent-flow.patch,ghidra-native/patches/0090-nocasts-warnings.patch,ghidra-native/patches/0091-decompiler-xml-packer.patch,ghidra-native/patches/0092-badvar-segfault.patch,ghidra-native/patches/0093-no-virtual-destructor.patch,ghidra-native/patches/0100-CHAR-windows.patch,ghidra-native/patches/ghidra-native.patch
WRAP_wrap_git_depth:=1

.PHONY: ghidra-native_clean ghidra-native_all

ghidra-native:
	if [ ! -d "ghidra-native" -o "0.6.4" != "$(shell cd ghidra-native 2>/dev/null && git rev-parse HEAD)" ]; then rm -rf "ghidra-native"; ${MAKE} ghidra-native_all; fi

ghidra-native_all:
	git clone --no-checkout --depth=1 https://github.com/radareorg/ghidra-native ghidra-native
	cd ghidra-native && git fetch --depth=1 origin 0.6.4
	cd ghidra-native && git checkout FETCH_HEAD
	cp -rf packagefiles/ghidra-native/* ghidra-native
	for a in ghidra-native/patches/0001-space-after-comma.patch ghidra-native/patches/0002-make-sleigharch-public.patch ghidra-native/patches/0004-public-fields.patch ghidra-native/patches/0006-readonly-warning.patch ghidra-native/patches/0010-null-subflow.patch ghidra-native/patches/0020-Fix-double-free-crash-when-deinitializing-multiple-X.patch ghidra-native/patches/0023-Undef-LoadImage-for-windows.patch ghidra-native/patches/0024-ignore-symbol-beyond-space.patch ghidra-native/patches/0044-bad-unicode-codepoint.patch ghidra-native/patches/0055-datatype-clone.patch ghidra-native/patches/0056-nullderef-workaround.patch ghidra-native/patches/0080-getparent-flow.patch ghidra-native/patches/0090-nocasts-warnings.patch ghidra-native/patches/0091-decompiler-xml-packer.patch ghidra-native/patches/0092-badvar-segfault.patch ghidra-native/patches/0093-no-virtual-destructor.patch ghidra-native/patches/0100-CHAR-windows.patch ghidra-native/patches/ghidra-native.patch ; do echo "patch -d ghidra-native -p1 < $$a" ; patch -d ghidra-native -p1 < $$a ; done

ghidra-native_clean:
	rm -rf ghidra-native
