--- uae/src/Makefile.dos 2018/04/24 16:38:39 1.1.1.1 +++ uae/src/Makefile.dos 2018/04/24 16:39:53 1.1.1.3 @@ -1,23 +1,27 @@ # -# Makefile.dos for UAE +# Makefile.dos for DosUAE # CC = gcc CPP = gcc -E -CFLAGS = -O3 -fomit-frame-pointer -fstrength-reduce -malign-jumps=0 -malign-loops=0 -malign-functions=0 -Wall -Wno-unused -Wno-format -W -Wmissing-prototypes -Wstrict-prototypes -D__DOS__ -DX86_ASSEMBLY -D__inline__=inline -DSTATFS_NO_ARGS=2 -DSTATBUF_BAVAIL=f_bfree -CFLAGS_NOT_OPT = -D__DOS__ -DX86_ASSEMBLY -D__inline__=inline -DSTATFS_NO_ARGS=2 -DSTATBUF_BAVAIL=f_bfree -GFXOBJS = dos-vbe.o dos-ui.o +CFLAGS = -O3 -fomit-frame-pointer -Wall -Wtraditional -Wno-unused -Wno-format -W -Wmissing-prototypes -Wstrict-prototypes -DGCCCONSTFUNC="__attribute__((const))" -DX86_ASSEMBLY -DUSE_UNDERSCORE -fno-strength-reduce -DINTEL_FLAG_OPT=1 -DREGPARAM="__attribute__((regparm(3)))" -DUSE_ZFILE -D__inline__=inline -DSTATFS_NO_ARGS=2 -DSTATBUF_BAVAIL=f_bfree -D__DOS__ +GFXOBJS = tui.o machdep/video/conio-ui.o machdep/video/vbe.o machdep/video/video.o +SNDOBJS = machdep/sound/dma.o machdep/sound/sb.o machdep/sound/gus.o +MISCOBJS = machdep/misc/misc.o machdep/misc/handlers.o ASMOBJS = X86.o -CPUOBJS = cpufast0.o cpufast1.o cpufast2.o cpufast3.o cpufast4.o cpufast5.o cpufast6.o cpufast7.o cpufast8.o cpufast9.o cpufastA.o cpufastB.o cpufastC.o cpufastD.o cpufastE.o cpufastF.o - -.SUFFIXES: .o .c .h .m - -INCLUDES=-Iinclude - -OBJS = main.o newcpu.o memory.o debug.o custom.o cia.o disk.o blitter.o $(GFXOBJS) \ - autoconf.o os.o ersatz.o filesys.o hardfile.o keybuf.o expansion.o zfile.o \ - fpp.o readcpu.o cpudefs.o gfxutil.o gfxlib.o blitfunc.o blittable.o $(ASMOBJS) \ - serial.o uaelib.o $(CPUOBJS) cpustbl.o dos-sb.o dos-dma.o +CPUOBJS = cpu_f0.o cpu_f1.o cpu_f2.o cpu_f3.o cpu_f4.o cpu_f5.o cpu_f6.o cpu_f7.o cpu_f8.o cpu_f9.o cpu_fA.o cpu_fB.o cpu_fC.o cpu_fD.o cpu_fE.o cpu_fF.o +DEBUGOBJS = debug.o +MATHLIB = -lm + +.SUFFIXES: .o .c .h .m .i + +INCLUDES=-I../src/include/ -I../src/ -I../src/machdep/ + +OBJS = main.o newcpu.o memory.o custom.o cia.o serial.o disk.o blitter.o os.o \ + autoconf.o ersatz.o filesys.o hardfile.o keybuf.o expansion.o zfile.o \ + fpp.o readcpu.o cpudefs.o gfxutil.o gfxlib.o blitfunc.o blittable.o \ + compiler.o uaelib.o execlib.o timerdev.o machdep/support.o cpustbl.o \ + $(ASMOBJS) $(CPUOBJS) $(GFXOBJS) $(DEBUGOBJS) $(SNDOBJS) $(MISCOBJS) \ all: uae.exe readdisk.exe @@ -27,33 +31,41 @@ readdisk.exe: readdisk.o coff2exe readdisk uae.exe: $(OBJS) - $(CC) $(OBJS) -o uae -lm + $(CC) $(OBJS) -o uae $(MATHLIB) strip uae coff2exe uae clean: - -del *.o - -del uae - -del uae.exe - -del readdisk - -del readdisk.exe - -del gencpu.exe - -del genblitter.exe - -del build68k.exe - -del cpudefs.c - -del cpuopti.exe - -del cpu?.c - -del blit.h - -del cputbl.h - -del cpustbl.c - -del cpufast?.s - -del blitfunc.c - -del blitfunc.h - -del blittable.c - -del config.h + del *.o + del machdep\*.o + del machdep\video\*.o + del machdep\sound\*.o + del machdep\misc\*.o + del uae + del uae.exe + del readdisk + del readdisk.exe + del gencpu.exe + del genblitter.exe + del build68k.exe + del cpudefs.c + del cpuopti.exe + del cpu?.c + del blit.h + del cputbl.h + del cpustbl.c + del cpu_f?.s + del blitfunc.c + del blitfunc.h + del blittable.c + del config.h halfclean: - -del *.o + del *.o + del machdep\*.o + del machdep\video\*.o + del machdep\sound\*.o + del machdep\misc\*.o blit.h: genblitter.exe genblitter i >blit.h @@ -64,19 +76,19 @@ blitfunc.h: genblitter.exe blittable.c: genblitter.exe blitfunc.h genblitter t >blittable.c -genblitter.exe: genblitter.o - $(CC) $(LDFLAGS) -o genblitter.exe genblitter.o +genblitter.exe: genblitter.o blitops.o + $(CC) -o genblitter.exe genblitter.o blitops.o build68k.exe: build68k.o - $(CC) $(LDFLAGS) -o build68k.exe build68k.o + $(CC) -o build68k.exe build68k.o cpuopti.exe: cpuopti.o - $(CC) $(LDFLAGS) -o cpuopti.exe cpuopti.o + $(CC) -o cpuopti.exe cpuopti.o gencpu.exe: gencpu.o readcpu.o cpudefs.o - $(CC) $(LDFLAGS) -o gencpu.exe gencpu.o readcpu.o cpudefs.o + $(CC) -o gencpu.exe gencpu.o readcpu.o cpudefs.o custom.o: blit.h cpudefs.c: build68k.exe table68k - build68k >cpudefs.c + build68k.exe >cpudefs.c cpustbl.c: gencpu.exe gencpu s >cpustbl.c cputbl.c: gencpu.exe @@ -150,100 +162,67 @@ cpuE.o: cpuE.c cputbl.h cpuF.o: cpuF.c cputbl.h $(CC) $(INCLUDES) -c $(CFLAGS) $*.c -cpufast0.o: cpufast0.s cputbl.h - $(CC) $(INCLUDES) -c $(CFLAGS) $*.s -cpufast1.o: cpufast1.s cputbl.h - $(CC) $(INCLUDES) -c $(CFLAGS) $*.s -cpufast2.o: cpufast2.s cputbl.h - $(CC) $(INCLUDES) -c $(CFLAGS) $*.s -cpufast3.o: cpufast3.s cputbl.h - $(CC) $(INCLUDES) -c $(CFLAGS) $*.s -cpufast4.o: cpufast4.s cputbl.h - $(CC) $(INCLUDES) -c $(CFLAGS) $*.s -cpufast5.o: cpufast5.s cputbl.h - $(CC) $(INCLUDES) -c $(CFLAGS) $*.s -cpufast6.o: cpufast6.s cputbl.h - $(CC) $(INCLUDES) -c $(CFLAGS) $*.s -cpufast7.o: cpufast7.s cputbl.h - $(CC) $(INCLUDES) -c $(CFLAGS) $*.s -cpufast8.o: cpufast8.s cputbl.h - $(CC) $(INCLUDES) -c $(CFLAGS) $*.s -cpufast9.o: cpufast9.s cputbl.h - $(CC) $(INCLUDES) -c $(CFLAGS) $*.s -cpufastA.o: cpufastA.s cputbl.h - $(CC) $(INCLUDES) -c $(CFLAGS) $*.s -cpufastB.o: cpufastB.s cputbl.h - $(CC) $(INCLUDES) -c $(CFLAGS) $*.s -cpufastC.o: cpufastC.s cputbl.h - $(CC) $(INCLUDES) -c $(CFLAGS) $*.s -cpufastD.o: cpufastD.s cputbl.h - $(CC) $(INCLUDES) -c $(CFLAGS) $*.s -cpufastE.o: cpufastE.s cputbl.h - $(CC) $(INCLUDES) -c $(CFLAGS) $*.s -cpufastF.o: cpufastF.s cputbl.h - $(CC) $(INCLUDES) -c $(CFLAGS) $*.s - -cpufast0.s: cpu0.c cputbl.h cpuopti.exe +cpu_f0.s: cpu0.c cputbl.h cpuopti.exe $(CC) $(INCLUDES) -S $(CFLAGS) $< -o cpu-tmp.s cpuopti $@ del cpu-tmp.s -cpufast1.s: cpu1.c cputbl.h cpuopti.exe +cpu_f1.s: cpu1.c cputbl.h cpuopti.exe $(CC) $(INCLUDES) -S $(CFLAGS) $< -o cpu-tmp.s cpuopti $@ del cpu-tmp.s -cpufast2.s: cpu2.c cputbl.h cpuopti.exe +cpu_f2.s: cpu2.c cputbl.h cpuopti.exe $(CC) $(INCLUDES) -S $(CFLAGS) $< -o cpu-tmp.s cpuopti $@ del cpu-tmp.s -cpufast3.s: cpu3.c cputbl.h cpuopti.exe +cpu_f3.s: cpu3.c cputbl.h cpuopti.exe $(CC) $(INCLUDES) -S $(CFLAGS) $< -o cpu-tmp.s cpuopti $@ del cpu-tmp.s -cpufast4.s: cpu4.c cputbl.h cpuopti.exe +cpu_f4.s: cpu4.c cputbl.h cpuopti.exe $(CC) $(INCLUDES) -S $(CFLAGS) $< -o cpu-tmp.s cpuopti $@ del cpu-tmp.s -cpufast5.s: cpu5.c cputbl.h cpuopti.exe +cpu_f5.s: cpu5.c cputbl.h cpuopti.exe $(CC) $(INCLUDES) -S $(CFLAGS) $< -o cpu-tmp.s cpuopti $@ del cpu-tmp.s -cpufast6.s: cpu6.c cputbl.h cpuopti.exe +cpu_f6.s: cpu6.c cputbl.h cpuopti.exe $(CC) $(INCLUDES) -S $(CFLAGS) $< -o cpu-tmp.s cpuopti $@ del cpu-tmp.s -cpufast7.s: cpu7.c cputbl.h cpuopti.exe +cpu_f7.s: cpu7.c cputbl.h cpuopti.exe $(CC) $(INCLUDES) -S $(CFLAGS) $< -o cpu-tmp.s cpuopti $@ del cpu-tmp.s -cpufast8.s: cpu8.c cputbl.h cpuopti.exe +cpu_f8.s: cpu8.c cputbl.h cpuopti.exe $(CC) $(INCLUDES) -S $(CFLAGS) $< -o cpu-tmp.s cpuopti $@ del cpu-tmp.s -cpufast9.s: cpu9.c cputbl.h cpuopti.exe +cpu_f9.s: cpu9.c cputbl.h cpuopti.exe $(CC) $(INCLUDES) -S $(CFLAGS) $< -o cpu-tmp.s cpuopti $@ del cpu-tmp.s -cpufastA.s: cpuA.c cputbl.h cpuopti.exe +cpu_fA.s: cpuA.c cputbl.h cpuopti.exe $(CC) $(INCLUDES) -S $(CFLAGS) $< -o cpu-tmp.s cpuopti $@ del cpu-tmp.s -cpufastB.s: cpuB.c cputbl.h cpuopti.exe +cpu_fB.s: cpuB.c cputbl.h cpuopti.exe $(CC) $(INCLUDES) -S $(CFLAGS) $< -o cpu-tmp.s cpuopti $@ del cpu-tmp.s -cpufastC.s: cpuC.c cputbl.h cpuopti.exe +cpu_fC.s: cpuC.c cputbl.h cpuopti.exe $(CC) $(INCLUDES) -S $(CFLAGS) $< -o cpu-tmp.s cpuopti $@ del cpu-tmp.s -cpufastD.s: cpuD.c cputbl.h cpuopti.exe +cpu_fD.s: cpuD.c cputbl.h cpuopti.exe $(CC) $(INCLUDES) -S $(CFLAGS) $< -o cpu-tmp.s cpuopti $@ del cpu-tmp.s -cpufastE.s: cpuE.c cputbl.h cpuopti.exe +cpu_fE.s: cpuE.c cputbl.h cpuopti.exe $(CC) $(INCLUDES) -S $(CFLAGS) $< -o cpu-tmp.s cpuopti $@ del cpu-tmp.s -cpufastF.s: cpuF.c cputbl.h cpuopti.exe +cpu_fF.s: cpuF.c cputbl.h cpuopti.exe $(CC) $(INCLUDES) -S $(CFLAGS) $< -o cpu-tmp.s cpuopti $@ del cpu-tmp.s @@ -251,25 +230,29 @@ cpufastF.s: cpuF.c cputbl.h cpuopti.exe X86.o: X86.S $(CC) $(INCLUDES) -c $(CFLAGS) X86.S -gencpu.o: gencpu.c - $(CC) $(INCLUDES) -c $(CFLAGS_NOT_OPT) gencpu.c - .m.o: - $(CC) $(INCLUDES) -c $(CFLAGS) $(DEBUGFLAGS) $*.m + $(CC) $(INCLUDES) -c $(CFLAGS) $*.m .c.o: - $(CC) $(INCLUDES) -c $(CFLAGS) $(DEBUGFLAGS) $*.c + $(CC) $(INCLUDES) -c $(CFLAGS) $*.c -o $@ .c.s: $(CC) $(INCLUDES) -S $(CFLAGS) $*.c +.c.i: + $(CC) $(INCLUDES) -E $(CFLAGS) $*.c > $@ .S.o: - $(CC) $(INCLUDES) -c $(CFLAGS) $(DEBUGFLAGS) $*.S + $(CC) $(INCLUDES) -c $(CFLAGS) $*.S +.s.o: + $(CC) $(INCLUDES) -c $(CFLAGS) $*.s # Saves recompiling... touch: touch *.o - touch build68k - touch cpudefs.* + touch machdep\*.o + touch machdep\video\*.o + touch machdep\sound\*.o + touch machdep\misc\*.o + touch build68k.exe + touch cpudefs.c touch gencpu.exe - touch genblitter.exe touch cpu*.* # Some more dependencies... @@ -293,8 +276,10 @@ memory.o: config.h debug.o: config.h fpp.o: config.h ersatz.o: config.h +filesys.o: config.h +execlib.o: config.h disk.o: config.h include/events.h blitter.o: config.h include/events.h config.h: ../config.h - -copy ..\config.h + copy ..\config.h