diff --git a/.gitignore b/.gitignore index a049cb95a..6a2a7a52d 100644 --- a/.gitignore +++ b/.gitignore @@ -67,4 +67,4 @@ genblitter gencomp gencpu genlinetoscr -winuae +quaesar diff --git a/Makefile b/Makefile index b5b29feaf..8de5e3c09 100644 --- a/Makefile +++ b/Makefile @@ -1,36 +1,36 @@ .PHONY: all clean -all: winuae +all: quaesar # build68k build68k: FORCE - $(MAKE) -f Makefile.build68k + $(MAKE) -f build/Makefile.build68k -cpudefs.cpp: build68k table68k - ./build68k < table68k > $@ +src/cpudefs.cpp: build68k src/table68k + ./build68k < src/table68k > $@ -generated += cpudefs.cpp +generated += src/cpudefs.cpp # gencomp gencomp: FORCE $(generated) - $(MAKE) -f Makefile.gencomp + $(MAKE) -f build/Makefile.gencomp -jit/comptbl.h: gencomp +src/jit/comptbl.h: gencomp ./gencomp -generated += jit/comptbl.h +generated += src/jit/comptbl.h # gencpu gencpu: FORCE $(generated) - $(MAKE) -f Makefile.gencpu + $(MAKE) -f build/Makefile.gencpu -cputbl.h: gencpu - ./gencpu +src/cputbl.h: gencpu + cd src && ../gencpu && cd .. -generated += cputbl.h +generated += src/cputbl.h # genblitter @@ -38,40 +38,40 @@ genblitter: FORCE $(MAKE) -f Makefile.genblitter blit.h: genblitter - ./genblitter i > $@ + ./genblitter i > src/$@ blitfunc.cpp: genblitter - ./genblitter f > $@ + ./genblitter f > src/$@ blitfunc.h: genblitter - ./genblitter h > $@ + ./genblitter h > src/$@ blittable.cpp: genblitter - ./genblitter t > $@ + ./genblitter t > src/$@ -generated += blit.h blitfunc.cpp blitfunc.h blittable.cpp +generated += src/blit.h src/blitfunc.cpp src/blitfunc.h src/blittable.cpp # genlinetoscr genlinetoscr: FORCE - $(MAKE) -f Makefile.genlinetoscr + $(MAKE) -f build/Makefile.genlinetoscr linetoscr.cpp: genlinetoscr - ./genlinetoscr > linetoscr.cpp + ./genlinetoscr > src/linetoscr.cpp -generated += linetoscr.cpp +generated += src/linetoscr.cpp -# winuae +# quasar -winuae: FORCE $(generated) - $(MAKE) -f Makefile.winuae +quaesar: FORCE $(generated) + $(MAKE) -f build/Makefile.quaesar # clean clean: - make -f Makefile.build68k clean - make -f Makefile.genblitter clean - make -f Makefile.gencomp clean - make -f Makefile.gencpu clean - make -f Makefile.genlinetoscr clean - make -f Makefile.winuae clean + make -f build/Makefile.build68k clean + make -f build/Makefile.genblitter clean + make -f build/Makefile.gencomp clean + make -f build/Makefile.gencpu clean + make -f build/Makefile.genlinetoscr clean + make -f build/Makefile.quaesar clean rm -rf out FORCE: ; diff --git a/build/Makefile.build68k b/build/Makefile.build68k index 9b1418960..10a55381f 100644 --- a/build/Makefile.build68k +++ b/build/Makefile.build68k @@ -1,6 +1,6 @@ # ./build68k < table68k > cpudefs.cpp target = build68k -srcs = build68k.cpp +srcs = src/build68k.cpp -include Makefile.inc +include build/Makefile.inc diff --git a/build/Makefile.genblitter b/build/Makefile.genblitter index 0676d1c38..131b5c219 100644 --- a/build/Makefile.genblitter +++ b/build/Makefile.genblitter @@ -4,6 +4,6 @@ # ./genblitter t > blittable.c target = genblitter -srcs = blitops.cpp genblitter.cpp +srcs = src/blitops.cpp src/genblitter.cpp -include Makefile.inc +include build/Makefile.inc diff --git a/build/Makefile.gencomp b/build/Makefile.gencomp index 4646fb847..83b85f5b8 100644 --- a/build/Makefile.gencomp +++ b/build/Makefile.gencomp @@ -1,7 +1,7 @@ # ./gencomp target = gencomp -srcs = cpudefs.cpp jit/gencomp.cpp missing.cpp readcpu.cpp od-cross/unicode.cpp +srcs = src/cpudefs.cpp jit/gencomp.cpp src/missing.cpp src/readcpu.cpp od-cross/unicode.cpp -include Makefile.inc +include build/Makefile.inc diff --git a/build/Makefile.gencpu b/build/Makefile.gencpu index 9b0edaf74..f72984274 100644 --- a/build/Makefile.gencpu +++ b/build/Makefile.gencpu @@ -1,6 +1,6 @@ # ./gencpu target = gencpu -srcs = cpudefs.cpp gencpu.cpp missing.cpp readcpu.cpp od-cross/unicode.cpp +srcs = src/cpudefs.cpp src/gencpu.cpp src/missing.cpp src/readcpu.cpp od-cross/unicode.cpp -include Makefile.inc +include build/Makefile.inc diff --git a/build/Makefile.genlinetoscr b/build/Makefile.genlinetoscr index ac6551dc4..c1dbcb482 100644 --- a/build/Makefile.genlinetoscr +++ b/build/Makefile.genlinetoscr @@ -1,6 +1,6 @@ # ./genlinetoscr > linetoscr.cpp target = genlinetoscr -srcs = genlinetoscr.cpp +srcs = src/genlinetoscr.cpp -include Makefile.inc +include build/Makefile.inc diff --git a/build/Makefile.inc b/build/Makefile.inc new file mode 100644 index 000000000..f4066c99a --- /dev/null +++ b/build/Makefile.inc @@ -0,0 +1,28 @@ +CPPFLAGS += -g -DFSUAE -I . -I include -I od-cross -MMD + +OUT=out/$(target) + +objs = $(srcs:%.cpp=$(OUT)/%.o) +deps = $(objs:.o=.d) + +# bash Create Dir rule +MD = mkdir -p $(1) > /dev/null + +# Create output dirs +dirs:=$(sort $(OUT) $(patsubst %/,%,$(dir $(objs)))) +$(foreach dir,$(dirs),$(shell $(call MD,$(dir)))) + +.PHONY: all clean + +all: $(target) + +clean: + rm -f $(objs) $(deps) $(target) -r $(OUT) + +$(objs): $(OUT)/%.o : %.cpp + $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@ $< + +$(target) : $(objs) + $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LOADLIBES) $(LDLIBS) -o $@ + +-include $(objs:.o=.d) diff --git a/build/Makefile.quaesar b/build/Makefile.quaesar index 92493a7fb..c7b0bfeb6 100644 --- a/build/Makefile.quaesar +++ b/build/Makefile.quaesar @@ -1,105 +1,105 @@ target = quaesar -srcs = aros.rom.cpp \ - akiko.cpp \ - amax.cpp \ - ar.cpp \ - audio.cpp \ - autoconf.cpp \ - blitfunc.cpp \ - blittable.cpp \ - blitter.cpp \ - calc.cpp \ - cd32_fmv_genlock.cpp \ - cdrom.cpp \ - cdtvcr.cpp \ - cfgfile.cpp \ - cia.cpp \ - consolehook.cpp \ - cpudefs.cpp \ - cpuemu_0.cpp \ - cpuemu_11.cpp \ - cpuemu_13.cpp \ - cpuemu_20.cpp \ - cpuemu_21.cpp \ - cpuemu_22.cpp \ - cpuemu_23.cpp \ - cpuemu_24.cpp \ - cpuemu_31.cpp \ - cpuemu_32.cpp \ - cpuemu_33.cpp \ - cpuemu_34.cpp \ - cpuemu_35.cpp \ - cpuemu_40.cpp \ - cpuemu_50.cpp \ - cpummu.cpp \ - cpummu30.cpp \ - cpustbl.cpp \ - crc32.cpp \ - custom.cpp \ - debug.cpp \ - debugmem.cpp \ - def_icons.cpp \ - devices.cpp \ - disasm.cpp \ - disk.cpp \ - diskutil.cpp \ - dlopen.cpp \ - dongle.cpp \ - drawing.cpp \ - driveclick.cpp \ - enforcer.cpp \ - ethernet.cpp \ - events.cpp \ - expansion.cpp \ - fdi2raw.cpp \ - filesys.cpp \ - flashrom.cpp \ - fpp.cpp \ - fpp_native.cpp \ - fpp_softfloat.cpp \ - fsdb.cpp \ - gayle.cpp \ - hardfile.cpp \ - hrtmon.rom.cpp \ - ide.cpp \ - idecontrollers.cpp \ - identify.cpp \ - ini.cpp \ - inputdevice.cpp \ - inputrecord.cpp \ - isofs.cpp \ - keybuf.cpp \ - logging.cpp \ - main.cpp \ - memory.cpp \ - missing.cpp \ - native2amiga.cpp \ - newcpu.cpp \ - newcpu_common.cpp \ - readcpu.cpp \ - rommgr.cpp \ - rtc.cpp \ - sana2.cpp \ - savestate.cpp \ - scp.cpp \ - scsi.cpp \ - scsiemul.cpp \ - scsitape.cpp \ - sndboard.cpp \ - statusline.cpp \ - tabletlibrary.cpp \ - test_card.cpp \ - tinyxml2.cpp \ - traps.cpp \ - uaeexe.cpp \ - uaelib.cpp \ - uaenative.cpp \ - uaeresource.cpp \ - uaeserial.cpp \ - quaesar.cpp \ - blkdev.cpp \ +srcs = src/aros.rom.cpp \ + src/akiko.cpp \ + src/amax.cpp \ + src/ar.cpp \ + src/audio.cpp \ + src/autoconf.cpp \ + src/blitfunc.cpp \ + src/blittable.cpp \ + src/blitter.cpp \ + src/calc.cpp \ + src/cd32_fmv_genlock.cpp \ + src/cdrom.cpp \ + src/cdtvcr.cpp \ + src/cfgfile.cpp \ + src/cia.cpp \ + src/consolehook.cpp \ + src/cpudefs.cpp \ + src/cpuemu_0.cpp \ + src/cpuemu_11.cpp \ + src/cpuemu_13.cpp \ + src/cpuemu_20.cpp \ + src/cpuemu_21.cpp \ + src/cpuemu_22.cpp \ + src/cpuemu_23.cpp \ + src/cpuemu_24.cpp \ + src/cpuemu_31.cpp \ + src/cpuemu_32.cpp \ + src/cpuemu_33.cpp \ + src/cpuemu_34.cpp \ + src/cpuemu_35.cpp \ + src/cpuemu_40.cpp \ + src/cpuemu_50.cpp \ + src/cpummu.cpp \ + src/cpummu30.cpp \ + src/cpustbl.cpp \ + src/crc32.cpp \ + src/custom.cpp \ + src/debug.cpp \ + src/debugmem.cpp \ + src/def_icons.cpp \ + src/devices.cpp \ + src/disasm.cpp \ + src/disk.cpp \ + src/diskutil.cpp \ + src/dlopen.cpp \ + src/dongle.cpp \ + src/drawing.cpp \ + src/driveclick.cpp \ + src/enforcer.cpp \ + src/ethernet.cpp \ + src/events.cpp \ + src/expansion.cpp \ + src/fdi2raw.cpp \ + src/filesys.cpp \ + src/flashrom.cpp \ + src/fpp.cpp \ + src/fpp_native.cpp \ + src/fpp_softfloat.cpp \ + src/fsdb.cpp \ + src/gayle.cpp \ + src/hardfile.cpp \ + src/hrtmon.rom.cpp \ + src/ide.cpp \ + src/idecontrollers.cpp \ + src/identify.cpp \ + src/ini.cpp \ + src/inputdevice.cpp \ + src/inputrecord.cpp \ + src/isofs.cpp \ + src/keybuf.cpp \ + src/logging.cpp \ + src/main.cpp \ + src/memory.cpp \ + src/missing.cpp \ + src/native2amiga.cpp \ + src/newcpu.cpp \ + src/newcpu_common.cpp \ + src/readcpu.cpp \ + src/rommgr.cpp \ + src/rtc.cpp \ + src/sana2.cpp \ + src/savestate.cpp \ + src/scp.cpp \ + src/scsi.cpp \ + src/scsiemul.cpp \ + src/scsitape.cpp \ + src/sndboard.cpp \ + src/statusline.cpp \ + src/tabletlibrary.cpp \ + src/test_card.cpp \ + src/tinyxml2.cpp \ + src/traps.cpp \ + src/uaeexe.cpp \ + src/uaelib.cpp \ + src/uaenative.cpp \ + src/uaeresource.cpp \ + src/uaeserial.cpp \ + src/quaesar.cpp \ + src/blkdev.cpp \ od-cross/gfx.cpp \ od-cross/gui.cpp \ od-cross/mman.cpp \ @@ -113,15 +113,15 @@ srcs = aros.rom.cpp \ od-cross/time.cpp \ od-cross/dummy.cpp \ od-cross/input.cpp \ - zfile.cpp \ - zfile_archive.cpp \ - vm.cpp \ + src/zfile.cpp \ + src/zfile_archive.cpp \ + src/vm.cpp \ softfloat/softfloat.cpp \ softfloat/softfloat_fpsp.cpp \ softfloat/softfloat_decimal.cpp \ -include Makefile.inc +include build/Makefile.inc CPPFLAGS += -DUAE=1 CPPFLAGS += -D_cdecl= -DFILEFLAG_WRITE=1 -DOS_NAME=\"linux\" diff --git a/include/inputdevice.h b/include/inputdevice.h index cba4ff568..34fa7caa2 100644 --- a/include/inputdevice.h +++ b/include/inputdevice.h @@ -216,7 +216,7 @@ extern int input_get_default_keyboard (int num); enum inputevents { INPUTEVENT_ZERO, -#include "../inputevents.def" +#include "../src/inputevents.def" INPUTEVENT_END }; #undef DEFEVENT diff --git a/include/keyboard.h b/include/keyboard.h index 0d3ae8064..7d0598ad4 100644 --- a/include/keyboard.h +++ b/include/keyboard.h @@ -138,7 +138,7 @@ #define AKS(A) AKS_ ## A, enum aks { AKS_START = 0x1ff, -#include "../aks.def" +#include "../src/aks.def" }; #undef AKS