--- hatari/src/uae-cpu/Makefile 2019/04/01 07:11:36 1.1.1.5 +++ hatari/src/uae-cpu/Makefile 2019/04/01 07:13:12 1.1.1.7 @@ -5,9 +5,8 @@ include ../../Makefile.cnf CFLAGS += -I. $(SDL_CFLAGS) -QUIETCFLAGS = $(CFLAGS) -Wno-unused - -HOSTCFLAGS += $(SDL_CFLAGS) +# disable several warnings for the CPU emu code as it comes from elsewhere +QUIETCFLAGS = $(CFLAGS) -Wno-unused -Wno-sign-compare -Wno-shadow CPUCSRCS = hatari-glue.c memory.c newcpu.c readcpu.c fpp.c cpustbl.c cpudefs.c @@ -21,15 +20,21 @@ CPU_OBS = $(CPUCSRCS:.c=.o) $(CPUEMUSRCS all: $(CPU_OBS) -clean: - rm -f *.o gencpu build68k cpudefs.c cpustbl.c cputbl.h cpuemu.c - - build68k: build68k.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< -cpudefs.c: ./build68k ./table68k - ./build68k <./table68k >cpudefs.c +# Hack for compiling with MinGW (it does not like the "./" before build68k): +ifeq ($(SHELL),sh.exe) + +cpudefs.c: build68k table68k + build68k cpudefs.c + +else + +cpudefs.c: build68k table68k + ./build68k cpudefs.c + +endif cpudefs-host.o: cpudefs.c $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $< @@ -70,3 +75,11 @@ cpuemu8.o: cpuemu.c newcpu.o: sysdeps.h hatari-glue.h maccess.h memory.h newcpu.h + + +clean: + $(RM) *.o gencpu build68k + +distclean: clean + $(RM) cpudefs.c cpustbl.c cputbl.h cpuemu.c + $(RM) *~ *.bak *.orig