summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authoralekseiplusplus <alekseijeaves@protonmail.com>2023-12-12 10:29:53 +1100
committeralekseiplusplus <alekseijeaves@protonmail.com>2023-12-12 10:29:53 +1100
commit79456640c548cff9125a5ba137538642e3c41141 (patch)
treefbfd474833b644b123e6f1d9dac78fedeceaf9bc /src/Makefile
parent8968f471650d25c9df68347644e0e5c0ecdbda6e (diff)
added cmd args; changed video implementation
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile31
1 files changed, 11 insertions, 20 deletions
diff --git a/src/Makefile b/src/Makefile
index c7bf2a8..1502ab7 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,27 +1,21 @@
-SDL = -L/usr/lib -lSDL2
-
-OBJECTS_CPU = cpu/6502.o cpu/addressing.o cpu/instructions.o cpu/table.o
-
-BUILD_STATIC_LIBRARY = ar -rcs $@ $^
-
+# Executable Targets
+default: apple-c
-# Executable Targets
+apple-c: computer.a video.a
+ gcc -o ../$@ -lncurses -lSDL main.c $^
-default: computer.a video.a
- gcc -o ../apple-c -lncurses main.c $^
-test: computer.a video.a
- gcc -o ../test.out -lncurses test.c $^
+# Internal Static Libraries
+computer.a: cpu/6502.o cpu/addressing.o cpu/instructions.o cpu/table.o apple.o
+ ar -rcs $@ $^
-# Internal Libraries
+video.a: video/mode.o video/ncurses.o video/sdl.o
+ ar -rcs $@ $^
-computer.a: $(OBJECTS_CPU) apple.o
- $(BUILD_STATIC_LIBRARY)
-video.a: video/ncurses.o
- $(BUILD_STATIC_LIBRARY)
+# Object Files
*.o: *.c
gcc -c $^
@@ -30,7 +24,4 @@ video.a: video/ncurses.o
# Clean
clean:
- rm *.a
- rm *.o
- rm cpu/*.o
- rm video/*.o
+ rm *.a *.o cpu/*.o video/*.o ../apple-c*