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