diff options
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/arm/v7/opdefs/Makefile.am | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/src/arch/arm/v7/opdefs/Makefile.am b/src/arch/arm/v7/opdefs/Makefile.am index 5483f92..607b27f 100644 --- a/src/arch/arm/v7/opdefs/Makefile.am +++ b/src/arch/arm/v7/opdefs/Makefile.am @@ -5,6 +5,8 @@ include ../../../../../tools/d2c/d2c.mk D2C_BIN = ../../../../../tools/d2c/d2c GEN_BIN = ../../../../../tools/d2c/d2c_genmakefile.sh +D2C_TYPE = raw + D2C_OUTDIR = $(PWD)/.. D2C_ARCH = armv7 @@ -23,6 +25,25 @@ D2C_MACROS = \ -M SignExtend=sign_extend_armv7_imm \ -M SetInsFlag=g_arch_instruction_set_flag + +FIXED_C_INCLUDES = \ + \n\#include \"..\/helpers.h\" \ + \n\#include \"..\/instruction.h\" \ + \n\#include \"..\/fetch.h\" \ + \n\#include \"..\/post.h\" \ + \n\#include \"..\/..\/instruction.h\" \ + \n\#include \"..\/..\/link.h\" \ + \n\#include \"..\/..\/..\/link.h\" \ + \n\#include \"..\/..\/..\/..\/common\/bconst.h\" \ + \n\n + +FIXED_H_INCLUDES = \ + \n\#include \<stdint.h\> \ + \n \ + \n\#include \"..\/..\/..\/instruction.h\" \ + \n\n + + ARMV7_DEFS = \ adc_A881.d \ adc_A882.d \ @@ -101,25 +122,11 @@ ARMV7_DEFS = \ subs_B9320.d -all: $(ARMV7_DEFS:.d=.g) fmk.done fix_includes_in_c_templates fix_includes_in_h_templates untabify_disass +all: $(ARMV7_DEFS:.d=.g) fmk.done d2c_final_rules fmk.done: $(ARMV7_DEFS) $(GEN_BIN) ../opcodes/ ../opdefs/.gen ../../../../../tools/d2c/globalgen.mk arm thumb_32 thumb_16 touch $@ -fix_includes_in_c_templates: - @for f in `find .gen/ -name '*tmpl.c'`; do \ - if grep -q '##INCLUDES##' $$f; then \ - $(fix_verbose)sed -i 's/##INCLUDES##/\n#include "..\/helpers.h"\n#include "..\/instruction.h"\n#include "..\/fetch.h"\n#include "..\/post.h"\n#include "..\/..\/instruction.h"\n#include "..\/..\/link.h"\n#include "..\/..\/..\/link.h"\n#include "..\/..\/..\/..\/common\/bconst.h"\n\n/' $$f; \ - fi; \ - done - -fix_includes_in_h_templates: - @for f in `find .gen/ -name '*tmpl.h'`; do \ - if grep -q '##INCLUDES##' $$f; then \ - $(fix_verbose)sed -i 's/##INCLUDES##/#include\ <stdint.h>\n\n#include "..\/..\/..\/instruction.h"/' $$f ; \ - fi; \ - done - clean: rm -rf $(ARMV7_DEFS:.d=.g) .gen fmk.done |