1SubDir HAIKU_TOP src libs zydis ; 2 3local zydisSourceDirectory = [ FDirName $(HAIKU_TOP) src libs zydis ] ; 4UseHeaders [ LibraryHeaders zydis ] : true ; 5UseHeaders [ FDirName $(zydisSourceDirectory) Zydis ] : true ; 6 7SubDirCcFlags -Wno-error=missing-prototypes ; 8 9DEFINES += __posix ; 10DEFINES += ZYDIS_DISABLE_ENCODER ; 11 12local zydisSources = 13 Decoder.c 14 DecoderData.c 15 Disassembler.c 16 Formatter.c 17 FormatterBuffer.c 18 FormatterATT.c 19 FormatterBase.c 20 FormatterIntel.c 21 MetaInfo.c 22 Mnemonic.c 23 Register.c 24 SharedData.c 25 String.c 26 Utils.c 27 Zydis.c 28; 29 30local zycoreSources = 31 Zycore.c 32 Allocator.c 33 Bitset.c 34 Format.c 35 List.c 36 String.c 37 Vector.c 38; 39 40 41if $(TARGET_PACKAGING_ARCH) = x86_gcc2 { 42 # GCC 2 can't compile C11, so we use the modern GCC . 43 original_TARGET_CC_x86_gcc2 = $(TARGET_CC_x86_gcc2) ; 44 TARGET_CC_x86_gcc2 = $(TARGET_CC_x86) -Wa,-mrelax-relocations=no ; 45} 46 47SOURCE_GRIST = [ FGrist $(SUBDIR_TOKENS) zydis ] ; 48MakeLocate [ FGristFiles $(zydisSources:S=$(SUFOBJ)) ] 49 : [ FDirName $(TARGET_DEBUG_$(DEBUG)_LOCATE_TARGET) zydis ] ; 50StaticLibrary libzydis.a : $(zydisSources) ; 51LOCATE on [ FGristFiles $(zydisSources) ] = [ FDirName $(zydisSourceDirectory) Zydis ] ; 52 53SOURCE_GRIST = [ FGrist $(SUBDIR_TOKENS) zycore ] ; 54MakeLocate [ FGristFiles $(zycoreSources:S=$(SUFOBJ)) ] 55 : [ FDirName $(TARGET_DEBUG_$(DEBUG)_LOCATE_TARGET) zycore ] ; 56StaticLibrary libzydis.a : $(zycoreSources) 57; 58LOCATE on [ FGristFiles $(zycoreSources) ] = [ FDirName $(zydisSourceDirectory) Zycore ] ; 59 60if $(TARGET_PACKAGING_ARCH) = x86_gcc2 { 61 TARGET_CC_x86_gcc2 = $(original_TARGET_CC_x86_gcc2) ; 62} 63 64