blob: 710df5ae48bacd1c3202904cf26f28e87ba0e01e (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
SDL = -L/usr/lib -lSDL2
MAIN_COMPONENTS = cpu.a video.a apple.a
TARGET_CPU = cpu/6502.o cpu/addressing.o cpu/instructions.o cpu/table.o
TARGET_VIDEO = video/ncurses.o
# Executable Targets
default: cpu.a apple.a
gcc -o ../build/apple-c main.c $^
interpreter: cpu.a apple.a
gcc -o ../build/interpreter interpreter.c $^
# Internal Libraries
cpu.a: $(TARGET_CPU)
ar cr $@ $^
video.a: $(TARGET_VIDEO)
ar cr $@ $^
apple.a: apple.o $(TARGET_CPU) $(TARGET_VIDEO)
ar -rcs $@ $^
*.o: *.c
gcc -c $^
# Clean
clean:
rm *.a
rm *.o
rm cpu/*.o
rm video/*.o
|