--- hatari/src/uae-cpu/Makefile 2019/04/01 07:13:12 1.1.1.7 +++ hatari/src/uae-cpu/Makefile 2019/04/01 07:13:47 1.1.1.8 @@ -4,7 +4,7 @@ include ../../Makefile.cnf -CFLAGS += -I. $(SDL_CFLAGS) +CFLAGS += -I. -I../.. $(CPPFLAGS) $(SDL_CFLAGS) # disable several warnings for the CPU emu code as it comes from elsewhere QUIETCFLAGS = $(CFLAGS) -Wno-unused -Wno-sign-compare -Wno-shadow @@ -17,25 +17,18 @@ CPUEMUSRCS = cpuemu1.c cpuemu2.c cpuemu3 CPU_OBS = $(CPUCSRCS:.c=.o) $(CPUEMUSRCS:.c=.o) -all: $(CPU_OBS) +all: cpu68k.a +cpu68k.a: $(CPU_OBS) + $(AR) cru $@ $^ + $(RANLIB) $@ build68k: build68k.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< -# 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 $@ $< @@ -51,34 +44,35 @@ gencpu: gencpu.o readcpu-host.o cpudefs- cpuemu.c: gencpu ./gencpu + cpustbl.c: cpuemu.c cputbl.h: cpuemu.c # this is for people with low memory (is there a way do do this with a single rule ?) cpuemu1.o: cpuemu.c - $(CC) -DPART_1 -c $(CPPFLAGS) $(QUIETCFLAGS) $< -o $@ + $(CC) -DPART_1 -c $(QUIETCFLAGS) $< -o $@ cpuemu2.o: cpuemu.c - $(CC) -DPART_2 -c $(CPPFLAGS) $(QUIETCFLAGS) $< -o $@ + $(CC) -DPART_2 -c $(QUIETCFLAGS) $< -o $@ cpuemu3.o: cpuemu.c - $(CC) -DPART_3 -c $(CPPFLAGS) $(QUIETCFLAGS) $< -o $@ + $(CC) -DPART_3 -c $(QUIETCFLAGS) $< -o $@ cpuemu4.o: cpuemu.c - $(CC) -DPART_4 -c $(CPPFLAGS) $(QUIETCFLAGS) $< -o $@ + $(CC) -DPART_4 -c $(QUIETCFLAGS) $< -o $@ cpuemu5.o: cpuemu.c - $(CC) -DPART_5 -c $(CPPFLAGS) $(QUIETCFLAGS) $< -o $@ + $(CC) -DPART_5 -c $(QUIETCFLAGS) $< -o $@ cpuemu6.o: cpuemu.c - $(CC) -DPART_6 -c $(CPPFLAGS) $(QUIETCFLAGS) $< -o $@ + $(CC) -DPART_6 -c $(QUIETCFLAGS) $< -o $@ cpuemu7.o: cpuemu.c - $(CC) -DPART_7 -c $(CPPFLAGS) $(QUIETCFLAGS) $< -o $@ + $(CC) -DPART_7 -c $(QUIETCFLAGS) $< -o $@ cpuemu8.o: cpuemu.c - $(CC) -DPART_8 -c $(CPPFLAGS) $(QUIETCFLAGS) $< -o $@ + $(CC) -DPART_8 -c $(QUIETCFLAGS) $< -o $@ newcpu.o: sysdeps.h hatari-glue.h maccess.h memory.h newcpu.h clean: - $(RM) *.o gencpu build68k + $(RM) *.o gencpu build68k cpu68k.a distclean: clean $(RM) cpudefs.c cpustbl.c cputbl.h cpuemu.c