diff options
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: |