-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
22 lines (17 loc) · 845 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
CC=gcc
CFLAGS=-std=gnu89 -march=native -g3 -ggdb -O0 -Wall -Wpedantic -Wextra
all: asm emu
asmtest: src/assembler.c src/include/assembler.h src/assemblertest.c
$(CC) $(CFLAGS) -c -o assembler.o src/assembler.c
$(CC) $(CFLAGS) assembler.o src/assemblertest.c -o assemblertest.out
asm: src/assembler.c src/include/assembler.h src/assemblerdriver.c
$(CC) $(CFLAGS) -c -o assembler.o src/assembler.c
$(CC) $(CFLAGS) assembler.o src/assemblerdriver.c -o assembler.out
emu: src/VM.c src/include/VM.h src/interrupt.c src/include/interrupt.h src/instruction.c src/include/instruction.h src/VMdriver.c
$(CC) $(CFLAGS) -c -o VM.o src/VM.c
$(CC) $(CFLAGS) -c -o interrupt.o src/interrupt.c
$(CC) $(CFLAGS) -c -o instruction.o src/instruction.c
$(CC) $(CFLAGS) -o VM.out VM.o interrupt.o instruction.o src/VMdriver.c
clean:
rm *.o
rm *.out