2017-02-26 16:00:41 +00:00
|
|
|
LDFLAGS=-L/usr/local/lib
|
2017-02-19 23:55:54 +00:00
|
|
|
|
2018-02-07 15:20:26 +00:00
|
|
|
SDLLIBS=-lSDL2 -lpthread
|
|
|
|
FBLIBS=-lpthread
|
2017-02-26 16:00:41 +00:00
|
|
|
|
2020-07-11 11:39:56 +00:00
|
|
|
CFLAGS=-Wall -I/usr/include/SDL2 -I .. -I . -I apple -I nix -I sdl -I/usr/local/include/SDL2 -g -DSUPPRESSREALTIME -DSTATICALLOC
|
|
|
|
CXXFLAGS=-Wall -I/usr/include/SDL2 -I .. -I . -I apple -I nix -I sdl -I/usr/local/include/SDL2 -g -DSUPPRESSREALTIME -DSTATICALLOC
|
2017-02-19 18:46:13 +00:00
|
|
|
|
|
|
|
TSRC=cpu.cpp util/testharness.cpp
|
|
|
|
|
2020-07-10 13:31:42 +00:00
|
|
|
COMMONSRCS=cpu.cpp apple/appledisplay.cpp apple/applekeyboard.cpp apple/applemmu.cpp apple/applevm.cpp apple/diskii.cpp apple/nibutil.cpp LRingBuffer.cpp globals.cpp apple/parallelcard.cpp apple/fx80.cpp lcg.cpp apple/hd32.cpp images.cpp apple/appleui.cpp vmram.cpp bios.cpp apple/noslotclock.cpp apple/woz.cpp apple/crc32.c apple/woz-serializer.cpp
|
|
|
|
|
2020-12-29 14:12:33 +00:00
|
|
|
COMMONOBJS=cpu.o apple/appledisplay.o apple/applekeyboard.o apple/applemmu.o apple/applevm.o apple/diskii.o apple/nibutil.o LRingBuffer.o globals.o apple/parallelcard.o apple/fx80.o lcg.o apple/hd32.o images.o apple/appleui.o vmram.o bios.o apple/noslotclock.o apple/woz.o apple/crc32.o apple/woz-serializer.o apple/mouse.o apple/pia6821.o
|
2017-02-26 16:00:41 +00:00
|
|
|
|
2020-07-10 13:31:42 +00:00
|
|
|
FBSRCS=linuxfb/linux-speaker.cpp linuxfb/fb-display.cpp linuxfb/linux-keyboard.cpp linuxfb/fb-paddles.cpp nix/nix-filemanager.cpp linuxfb/aiie.cpp linuxfb/linux-printer.cpp nix/nix-clock.cpp nix/nix-prefs.cpp
|
|
|
|
|
2018-02-18 01:44:04 +00:00
|
|
|
FBOBJS=linuxfb/linux-speaker.o linuxfb/fb-display.o linuxfb/linux-keyboard.o linuxfb/fb-paddles.o nix/nix-filemanager.o linuxfb/aiie.o linuxfb/linux-printer.o nix/nix-clock.o nix/nix-prefs.o
|
2018-02-07 15:20:26 +00:00
|
|
|
|
2020-07-10 13:31:42 +00:00
|
|
|
SDLSRCS=sdl/sdl-speaker.cpp sdl/sdl-display.cpp sdl/sdl-keyboard.cpp sdl/sdl-paddles.cpp nix/nix-filemanager.cpp sdl/aiie.cpp sdl/sdl-printer.cpp nix/nix-clock.cpp nix/nix-prefs.cpp nix/debugger.cpp nix/disassembler.cpp
|
|
|
|
|
2018-02-18 01:44:04 +00:00
|
|
|
SDLOBJS=sdl/sdl-speaker.o sdl/sdl-display.o sdl/sdl-keyboard.o sdl/sdl-paddles.o nix/nix-filemanager.o sdl/aiie.o sdl/sdl-printer.o nix/nix-clock.o nix/nix-prefs.o nix/debugger.o nix/disassembler.o
|
2017-02-19 23:55:54 +00:00
|
|
|
|
2020-12-29 14:12:33 +00:00
|
|
|
ROMS=apple/applemmu-rom.h apple/diskii-rom.h apple/parallel-rom.h apple/hd32-rom.h MouseInterface.rom
|
2017-02-19 23:55:54 +00:00
|
|
|
|
2020-07-10 13:31:42 +00:00
|
|
|
.PHONY: roms clean
|
2018-02-07 15:20:26 +00:00
|
|
|
|
|
|
|
all:
|
|
|
|
@echo You want \'make sdl\' or \'make linuxfb\'.
|
2017-02-26 16:00:41 +00:00
|
|
|
|
|
|
|
sdl: roms $(COMMONOBJS) $(SDLOBJS)
|
2017-02-26 16:31:07 +00:00
|
|
|
g++ $(LDFLAGS) $(SDLLIBS) -o aiie-sdl $(COMMONOBJS) $(SDLOBJS)
|
2017-02-19 18:46:13 +00:00
|
|
|
|
2018-02-07 15:20:26 +00:00
|
|
|
linuxfb: roms $(COMMONOBJS) $(FBOBJS)
|
|
|
|
g++ $(LDFLAGS) $(FBLIBS) -o aiie-fb $(COMMONOBJS) $(FBOBJS)
|
|
|
|
|
2017-02-19 18:46:13 +00:00
|
|
|
test: $(TSRC)
|
2018-06-16 03:13:06 +00:00
|
|
|
g++ $(CXXFLAGS) -DEXIT_ON_ILLEGAL -DVERBOSE_CPU_ERRORS -DTESTHARNESS $(TSRC) -o testharness
|
|
|
|
./testharness -f tests/6502_functional_test_verbose.bin -s 0x400 && \
|
|
|
|
./testharness -f tests/65C02_extended_opcodes_test.bin -s 0x400 && \
|
|
|
|
./testharness -f tests/65c02-all.bin -s 0x200
|
2017-02-19 18:46:13 +00:00
|
|
|
|
2017-12-29 19:08:49 +00:00
|
|
|
roms: apple2e.rom disk.rom parallel.rom HDDRVR.BIN
|
2020-12-29 14:12:33 +00:00
|
|
|
./util/genrom.pl apple2e.rom disk.rom parallel.rom HDDRVR.BIN MouseInterface.rom
|
2017-02-19 23:55:54 +00:00
|
|
|
|
|
|
|
apple/applemmu-rom.h: roms
|
|
|
|
|
|
|
|
apple/diskii-rom.h: roms
|
|
|
|
|
2017-02-20 23:41:46 +00:00
|
|
|
apple/parallel-rom.h: roms
|
2020-07-10 13:31:42 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o *~ */*.o */*~ testharness.basic testharness.verbose testharness.extended testharness apple/diskii-rom.h apple/applemmu-rom.h apple/parallel-rom.h aiie-sdl *.d */*.d
|
|
|
|
|
|
|
|
# Automatic dependency handling
|
2020-07-10 14:27:10 +00:00
|
|
|
-include *.d
|
|
|
|
-include apple/*.d
|
|
|
|
-include nix/*.d
|
|
|
|
-include sdl/*.d
|
2020-07-10 13:31:42 +00:00
|
|
|
|
2020-07-10 14:27:10 +00:00
|
|
|
%.o: %.cpp
|
|
|
|
g++ $(CXXFLAGS) -MMD -MP -c $< -o $@
|