From 085145a1f49ffcae235fa559df254919366fe497 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Sat, 3 Aug 2019 13:58:10 +1200 Subject: Add asmcat, bincat These tools are currently fairly useless for real-world programming. Each of them takes in either asm or binary, translates this to the internal intermediate representation of a list of instruction structs, and then translates and outputs in the same format that they took it in. These are mostly oly useful for testing purposes, but may one day be useful if e.g. an optimiser stage is put in between the input and output stages. --- Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 54f76f7..d361fc5 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,11 @@ CFLAGS = -Wall -Wextra -Wpedantic -EXECUTABLES = assembler disassembler +EXECUTABLES = assembler disassembler asmcat bincat -ASM_OBJECTS = lex.o parse.o output.o assembler.o util.o -DISASM_OBJECTS = disassembler.o util.o input_bin.o output_asm.o +ASM_OBJECTS = assembler.o lex.o parse.o output.o util.o +DISASM_OBJECTS = disassembler.o input_bin.o output_asm.o util.o +ASMCAT_OBJECTS = asmcat.o lex.o parse.o output_asm.o util.o +BINCAT_OBJECTS = bincat.o input_bin.o output.o util.o all: $(EXECUTABLES) @@ -11,6 +13,10 @@ assembler: $(ASM_OBJECTS) disassembler: $(DISASM_OBJECTS) +asmcat: $(ASMCAT_OBJECTS) + +bincat: $(BINCAT_OBJECTS) + lex.o: lex.h parse.o: lex.h parse.h instruction.h util.h @@ -21,7 +27,7 @@ util.o: lex.h instruction.h .PHONY: clean test clean: - - rm -f $(EXECUTABLES) $(ASM_OBJECTS) $(DISASM_OBJECTS) + - rm -f $(EXECUTABLES) $(ASM_OBJECTS) $(DISASM_OBJECTS) $(ASMCAT_OBJECTS) $(BINCAT_OBJECTS) test: all make -C test test -- cgit v1.1