diff options
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 31 |
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* |