summaryrefslogtreecommitdiff
path: root/Makefile
blob: 54f76f784344ea445f541ff65366881e7b89bfaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
CFLAGS = -Wall -Wextra -Wpedantic

EXECUTABLES = assembler disassembler

ASM_OBJECTS = lex.o parse.o output.o assembler.o util.o
DISASM_OBJECTS = disassembler.o util.o input_bin.o output_asm.o

all: $(EXECUTABLES)

assembler: $(ASM_OBJECTS)

disassembler: $(DISASM_OBJECTS)

lex.o: lex.h

parse.o: lex.h parse.h instruction.h util.h

output.o: parse.h

util.o: lex.h instruction.h

.PHONY: clean test
clean:
	- rm -f $(EXECUTABLES) $(ASM_OBJECTS) $(DISASM_OBJECTS)

test: all
	make -C test test