summary refs log tree commit diff stats
path: root/target/avr
diff options
context:
space:
mode:
Diffstat (limited to 'target/avr')
-rw-r--r--target/avr/Makefile.objs34
-rw-r--r--target/avr/disas.c2
-rw-r--r--target/avr/meson.build20
-rw-r--r--target/avr/translate.c2
4 files changed, 22 insertions, 36 deletions
diff --git a/target/avr/Makefile.objs b/target/avr/Makefile.objs
deleted file mode 100644
index 6e35ba2c5c..0000000000
--- a/target/avr/Makefile.objs
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-#  QEMU AVR
-#
-#  Copyright (c) 2016-2020 Michael Rolnik
-#
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License, or (at your option) any later version.
-#
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
-#
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, see
-#  <http://www.gnu.org/licenses/lgpl-2.1.html>
-#
-
-DECODETREE = $(SRC_PATH)/scripts/decodetree.py
-decode-y = $(SRC_PATH)/target/avr/insn.decode
-
-target/avr/decode_insn.inc.c: $(decode-y) $(DECODETREE)
-	$(call quiet-command, \
-	  $(PYTHON) $(DECODETREE) -o $@ --decode decode_insn --insnwidth 16 $<, \
-	  "GEN", $(TARGET_DIR)$@)
-
-target/avr/translate.o: target/avr/decode_insn.inc.c
-
-obj-y += translate.o cpu.o helper.o
-obj-y += gdbstub.o
-obj-y += disas.o
-obj-$(CONFIG_SOFTMMU) += machine.o
diff --git a/target/avr/disas.c b/target/avr/disas.c
index 8e1bac4d76..b7689e8d7c 100644
--- a/target/avr/disas.c
+++ b/target/avr/disas.c
@@ -60,7 +60,7 @@ static int append_16(DisasContext *ctx, int x)
 
 /* Include the auto-generated decoder.  */
 static bool decode_insn(DisasContext *ctx, uint16_t insn);
-#include "decode_insn.inc.c"
+#include "decode-insn.c.inc"
 
 #define output(mnemonic, format, ...) \
     (pctx->info->fprintf_func(pctx->info->stream, "%-9s " format, \
diff --git a/target/avr/meson.build b/target/avr/meson.build
new file mode 100644
index 0000000000..7e8e29c59d
--- /dev/null
+++ b/target/avr/meson.build
@@ -0,0 +1,20 @@
+gen = [
+  decodetree.process('insn.decode', extra_args: [ '--decode', 'decode_insn',
+                                                  '--insnwidth', '16' ])
+]
+
+avr_ss = ss.source_set()
+avr_softmmu_ss = ss.source_set()
+
+avr_ss.add(gen)
+avr_ss.add(files(
+  'translate.c',
+  'helper.c',
+  'cpu.c',
+  'gdbstub.c',
+  'disas.c'))
+
+avr_softmmu_ss.add(files('machine.c'))
+
+target_arch += {'avr': avr_ss}
+target_softmmu_arch += {'avr': avr_softmmu_ss}
diff --git a/target/avr/translate.c b/target/avr/translate.c
index 648dcd5c3e..850c5941d9 100644
--- a/target/avr/translate.c
+++ b/target/avr/translate.c
@@ -198,7 +198,7 @@ static bool avr_have_feature(DisasContext *ctx, int feature)
 }
 
 static bool decode_insn(DisasContext *ctx, uint16_t insn);
-#include "decode_insn.inc.c"
+#include "decode-insn.c.inc"
 
 /*
  * Arithmetic Instructions