include ../../../../../tools/d2c/d2c.mk D2C_BIN = ../../../../../tools/d2c/d2c D2C_OUTDIR = $(PWD)/.. D2C_ARCH = armv7 D2C_HEADER = _ARCH_ARM_V7 D2C_ENCODINGS = \ -e A=arm_ \ -e t=thumb_16_ \ -e T=thumb_32_ D2C_MACROS = \ -M SetFlags=g_armv7_instruction_define_setflags \ -M Condition=g_arm_instruction_set_cond \ -M Register=translate_armv7_register \ -M "ExpandImmC32=g_imm_operand_new_from_value(MDS_32_BITS_UNSIGNED, " \ -M SignExtend=sign_extend_armv7_imm ARMV7_DEFS = \ adc_A881.d \ adc_A882.d \ add_A885.d \ add_A887.d \ and_A8813.d \ and_A8814.d \ bic_A8821.d \ bic_A8822.d \ bl_A8825.d \ bx_A8827.d \ cmn_A8834.d \ cmn_A8835.d \ cmp_A8837.d \ cmp_A8838.d \ eor_A8846.d \ eor_A8847.d \ ldr_A8862.d \ ldr_A8864.d \ mla_A88100.d \ mls_A88101.d \ mov_A88102.d \ mov_A88103.d \ mov_A88104.d \ mul_A88114.d \ mvn_A88115.d \ mvn_A88116.d \ orr_A88122.d \ orr_A88123.d \ rsb_A88152.d \ rsb_A88153.d \ rsc_A88155.d \ rsc_A88156.d \ sbc_A88161.d \ sbc_A88162.d \ smlal_A88178.d \ smull_A88189.d \ str_A88203.d \ sub_A88222.d \ sub_A88223.d \ teq_A88237.d \ teq_A88238.d \ tst_A88240.d \ tst_A88241.d \ umaal_A88255.d \ umlal_A88256.d \ umull_A88257.d \ yield_A88426.d \ subs_B9320.d all: $(ARMV7_DEFS:.d=.g) untabify_disass fix_includes_in_c finish_disass fix_includes_in_c: @for f in `find ../opcodes -name '*c'`; do \ if grep -q '##INCLUDES##' $$f; then \ $(fix_verbose)sed -i 's/##INCLUDES##/\n#include "..\/instruction.h"\n#include "..\/..\/instruction.h"\n#include "..\/helpers.h"\n#include "..\/..\/..\/..\/common\/bconst.h"\n\n/' $$f; \ fi; \ done finish_disass: finish_disass_t16 finish_disass_t32 finish_disass_arm finish_disass_t16: $(D2C_OUTDIR)/opcodes/thumb_16_opcodes.h @if grep -q '##INCLUDES##' $<; then \ $(fix2_verbose)sed -i 's/##INCLUDES##/#include\ \n\n#include "..\/..\/..\/instruction.h"/' $< ; \ fi @if ! grep -q 'endif' $<; then \ $(fix2_verbose)echo -en "\n\n#endif /* _ARCH_ARM_V7_OPCODES_OPCODES_H */\n" >> $< ; \ fi finish_disass_t32: $(D2C_OUTDIR)/opcodes/thumb_32_opcodes.h @if grep -q '##INCLUDES##' $<; then \ $(fix2_verbose)sed -i 's/##INCLUDES##/#include\ \n\n#include "..\/..\/..\/instruction.h"/' $< ; \ fi @if ! grep -q 'endif' $<; then \ $(fix2_verbose)echo -en "\n\n#endif /* _ARCH_ARM_V7_OPCODES_OPCODES_H */\n" >> $< ; \ fi finish_disass_arm: $(D2C_OUTDIR)/opcodes/arm_opcodes.h @if grep -q '##INCLUDES##' $<; then \ $(fix2_verbose)sed -i 's/##INCLUDES##/#include\ \n\n#include "..\/..\/..\/instruction.h"/' $< ; \ fi @if ! grep -q 'endif' $<; then \ $(fix2_verbose)echo -en "\n\n#endif /* _ARCH_ARM_V7_OPCODES_OPCODES_H */\n" >> $< ; \ fi clean: rm -f $(ARMV7_DEFS:.d=.g) $(D2C_OUTDIR)/opcodes/*c $(D2C_OUTDIR)/opcodes/{thumb_16_,thumb_32_,}opcodes.h