diff options
author | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-11-28 02:51:33 +1100 |
---|---|---|
committer | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-11-28 02:51:33 +1100 |
commit | 2ded6baaab3946e461a7cf0b39618b31e5806c89 (patch) | |
tree | a30e4069d9c9e98e16651eadb0875d48ecc7c91e /src/Makefile | |
parent | d24ee5f20483aee9acbec9deb0dcc833d78cae49 (diff) |
days end
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/Makefile b/src/Makefile index 710df5a..866334d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,37 +1,33 @@ SDL = -L/usr/lib -lSDL2 -MAIN_COMPONENTS = cpu.a video.a apple.a +OBJECTS_CPU = cpu/6502.o cpu/addressing.o cpu/instructions.o cpu/table.o + +BUILD_STATIC_LIBRARY = ar -rcs $@ $^ -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 $^ +default: computer.a video.a + gcc -o ../build/apple-c -lncurses main.c $^ -interpreter: cpu.a apple.a +interpreter: computer.a gcc -o ../build/interpreter interpreter.c $^ # Internal Libraries -cpu.a: $(TARGET_CPU) - ar cr $@ $^ - -video.a: $(TARGET_VIDEO) - ar cr $@ $^ +computer.a: $(OBJECTS_CPU) apple.o + $(BUILD_STATIC_LIBRARY) -apple.a: apple.o $(TARGET_CPU) $(TARGET_VIDEO) - ar -rcs $@ $^ +video.a: video/ncurses.o + $(BUILD_STATIC_LIBRARY) *.o: *.c gcc -c $^ - # Clean clean: |