--- hatari/src/uae-cpu/Makefile 2019/04/01 07:12:19 1.1.1.6 +++ hatari/src/uae-cpu/Makefile 2019/04/01 07:13:12 1.1.1.7 @@ -8,8 +8,6 @@ CFLAGS += -I. $(SDL_CFLAGS) # disable several warnings for the CPU emu code as it comes from elsewhere QUIETCFLAGS = $(CFLAGS) -Wno-unused -Wno-sign-compare -Wno-shadow -HOSTCFLAGS += $(SDL_CFLAGS) - CPUCSRCS = hatari-glue.c memory.c newcpu.c readcpu.c fpp.c cpustbl.c cpudefs.c @@ -22,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 $@ $< @@ -71,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