2 # Makefile for modified UAE 68000 CPU core
5 # (C) 2011 Underground Software
7 # This makefile is released under the GPLv3 or later
16 # Cross compilation using MXE
17 CROSS
= i686-pc-mingw32-
18 #CROSS = i686-w64-mingw32-
19 #CROSS = x86_64-pc-msys-
28 INCS
:= -I.
-I.
/obj
`$(CROSS)sdl-config --cflags`
39 # Targets for convenience sake, not "real" targets
42 all: obj obj
/libm68k.a
45 # Library rules (might not be cross-platform compatible)
46 obj
/libm68k.a
: $(OBJS
)
47 $(Q
)$(AR
) $(ARFLAGS
) obj
/libm68k.a
$(OBJS
)
52 # Main source compilation (implicit rules)...
55 @echo
-e
"\033[01;33m***\033[00;32m Compiling $<...\033[00m"
56 $(Q
)$(CC
) $(GCC_DEPS
) $(CFLAGS
) $(INCS
) -c
$< -o
$@
59 @echo
-e
"\033[01;33m***\033[00;32m Compiling $<...\033[00m"
60 $(Q
)$(CC
) $(GCC_DEPS
) $(CFLAGS
) $(INCS
) -c
$< -o
$@
64 obj
/cpuemu.c
: obj
/gencpu
65 obj
/cpustbl.c
: obj
/gencpu
66 @echo
-e
"\033[01;33m***\033[00;32m Generating cpuemu.c...\033[00m"
69 obj
/gencpu
: obj
/cpudefs.c
70 @echo
-e
"\033[01;33m***\033[00;32m Generating gencpu...\033[00m"
71 $(Q
)$(HOSTCC
) $(GCC_DEPS
) $(CFLAGS
) gencpu.c readcpu.c obj
/cpudefs.c
-o obj
/gencpu
-I.
-I.
/obj
73 obj
/cpudefs.c
: obj
/build68k
74 @echo
-e
"\033[01;33m***\033[00;32m Generating cpudefs.c...\033[00m"
75 $(Q
)obj
/build68k
< table68k
> obj
/cpudefs.c
77 obj
/build68k
: build68k.c
78 @echo
-e
"\033[01;33m***\033[00;32m Compiling $< ...\033[00m"
79 $(Q
)$(HOSTCC
) $(GCC_DEPS
) $(CFLAGS
) build68k.c
-o obj
/build68k
82 @echo
-ne
"\033[01;33m***\033[00;32m Cleaning out the garbage...\033[00m"
86 # Pull in dependencies autogenerated by gcc's -MMD switch
87 # The "-" in front is there just in case they haven't been created yet