X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=jaguarcore.mak;h=9d44b4193375c4a5c5451b8d7482c12b00bb49ee;hb=ddac3e0e78a5c4b0236bdeaff18cf9a3ac4ba4f7;hp=d3cc25736ff8e753d723d5bc506b3faf2a5547f7;hpb=09b89af6f734ff6686ecc1ef1a5265680cbb0a6f;p=virtualjaguar diff --git a/jaguarcore.mak b/jaguarcore.mak index d3cc257..9d44b41 100644 --- a/jaguarcore.mak +++ b/jaguarcore.mak @@ -1,35 +1,30 @@ # # Makefile for Virtual Jaguar core library # -# by James L. Hammons +# by James Hammons # # This software is licensed under the GPL v3 or any later version. See the # file GPLv3 for details. ;-) # -# Figure out which system we're compiling for, and set the appropriate variables - -OSTYPE := $(shell uname -a) - -ifeq "$(findstring Msys,$(OSTYPE))" "Msys" # Win32 - -SYSTYPE := __GCCWIN32__ -SDLLIBTYPE := --libs - -else ifeq "$(findstring Darwin,$(OSTYPE))" "Darwin" # Should catch both 'darwin' and 'darwin7.0' - -SYSTYPE := __GCCUNIX__ -D_OSX_ -SDLLIBTYPE := --static-libs +ifeq ("$(V)","1") +Q := +else +Q := @ +endif -else ifeq "$(findstring Linux,$(OSTYPE))" "Linux" # Linux +# Cross compilation with MXE +#CROSS = i686-pc-mingw32- SYSTYPE := __GCCUNIX__ -SDLLIBTYPE := --libs - -else # ??? - -$(error OS TYPE UNDETECTED) +ifneq "$(CROSS)" "" +SYSTYPE := __GCCWIN32__ +else +OSTYPE := $(shell uname -o) +ifeq "$(OSTYPE)" "Msys" +SYSTYPE := __GCCWIN32__ +endif endif # Set vars for libcdio @@ -41,14 +36,14 @@ HAVECDIO := CDIOLIB := endif -CC := gcc -LD := gcc -AR := ar +CC := $(CROSS)gcc +LD := $(CROSS)gcc +AR := $(CROSS)ar ARFLAGS := -rs -# Note that we use optimization level 2 instead of 3--3 doesn't seem to gain much over 2 -CFLAGS := -MMD -O2 -ffast-math -fomit-frame-pointer `sdl-config --cflags` -D$(SYSTYPE) -CXXFLAGS := -MMD -O2 -ffast-math -fomit-frame-pointer `sdl-config --cflags` -D$(SYSTYPE) +SDL_CFLAGS = `$(CROSS)sdl-config --cflags` +DEFINES = -D$(SYSTYPE) +GCC_DEPS = -MMD INCS := -I./src @@ -64,6 +59,12 @@ OBJS := \ obj/file.o \ obj/filedb.o \ obj/gpu.o \ + obj/jagbios.o \ + obj/jagbios2.o \ + obj/jagcdbios.o \ + obj/jagdevcdbios.o \ + obj/jagstub1bios.o \ + obj/jagstub2bios.o \ obj/jagdasm.o \ obj/jaguar.o \ obj/jerry.o \ @@ -71,7 +72,7 @@ OBJS := \ obj/log.o \ obj/memory.o \ obj/mmu.o \ - obj/objectp.o \ + obj/op.o \ obj/settings.o \ obj/state.o \ obj/tom.o \ @@ -90,16 +91,12 @@ obj: # Library rules (might not be cross-platform compatible) obj/libjaguarcore.a: $(OBJS) - @$(AR) $(ARFLAGS) obj/libjaguarcore.a $(OBJS) + $(Q)$(AR) $(ARFLAGS) obj/libjaguarcore.a $(OBJS) # Main source compilation (implicit rules)... -obj/%.o: src/%.c - @echo -e "\033[01;33m***\033[00;32m Compiling $<...\033[00m" - @$(CC) $(CFLAGS) $(INCS) -c $< -o $@ - obj/%.o: src/%.cpp @echo -e "\033[01;33m***\033[00;32m Compiling $<...\033[00m" - @$(CC) $(CXXFLAGS) $(INCS) -c $< -o $@ + $(Q)$(CC) $(GCC_DEPS) $(CXXFLAGS) $(SDL_CFLAGS) $(DEFINES) $(INCS) -c $< -o $@ -include obj/*.d