Libretro .o files are now in the build/obj folder and are suffixed with _libretro (since they have different compilation flags). This also lets us rename gbmemory.c/h back to its original name.
This commit is contained in:
parent
7c0ad24175
commit
441781cbe9
@ -14,7 +14,7 @@
|
|||||||
#include "display.h"
|
#include "display.h"
|
||||||
#include "joypad.h"
|
#include "joypad.h"
|
||||||
#include "mbc.h"
|
#include "mbc.h"
|
||||||
#include "gbmemory.h"
|
#include "memory.h"
|
||||||
#include "printer.h"
|
#include "printer.h"
|
||||||
#include "timing.h"
|
#include "timing.h"
|
||||||
#include "z80_cpu.h"
|
#include "z80_cpu.h"
|
||||||
|
@ -3,7 +3,7 @@ INCFLAGS := -I$(CORE_DIR) \
|
|||||||
|
|
||||||
SOURCES_C := $(CORE_DIR)/Core/gb.c \
|
SOURCES_C := $(CORE_DIR)/Core/gb.c \
|
||||||
$(CORE_DIR)/Core/apu.c \
|
$(CORE_DIR)/Core/apu.c \
|
||||||
$(CORE_DIR)/Core/gbmemory.c \
|
$(CORE_DIR)/Core/memory.c \
|
||||||
$(CORE_DIR)/Core/mbc.c \
|
$(CORE_DIR)/Core/mbc.c \
|
||||||
$(CORE_DIR)/Core/timing.c \
|
$(CORE_DIR)/Core/timing.c \
|
||||||
$(CORE_DIR)/Core/display.c \
|
$(CORE_DIR)/Core/display.c \
|
||||||
@ -20,5 +20,7 @@ SOURCES_C += $(CORE_DIR)/Core/debugger.c \
|
|||||||
else
|
else
|
||||||
CFLAGS += -DDISABLE_DEBUGGER
|
CFLAGS += -DDISABLE_DEBUGGER
|
||||||
endif
|
endif
|
||||||
|
CFLAGS += -DDISABLE_TIMEKEEPING
|
||||||
|
|
||||||
|
|
||||||
SOURCES_CXX :=
|
SOURCES_CXX :=
|
||||||
|
@ -113,6 +113,9 @@ else
|
|||||||
SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=$(CORE_DIR)/libretro/link.T -Wl,--no-undefined
|
SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=$(CORE_DIR)/libretro/link.T -Wl,--no-undefined
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# To force use of the Unix version instead of the Windows version
|
||||||
|
MKDIR := $(shell which mkdir)
|
||||||
|
|
||||||
LDFLAGS += $(LIBM)
|
LDFLAGS += $(LIBM)
|
||||||
|
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
@ -123,7 +126,7 @@ endif
|
|||||||
|
|
||||||
include Makefile.common
|
include Makefile.common
|
||||||
|
|
||||||
OBJECTS := $(SOURCES_C:.c=.o) $(SOURCES_CXX:.cpp=.o)
|
OBJECTS := $(patsubst %.c,build/obj/%_libretro.c.o,$(SOURCES_C))
|
||||||
|
|
||||||
CFLAGS += -Wall -D__LIBRETRO__ $(fpic) $(INCFLAGS) -std=gnu11 -D_GNU_SOURCE -D_USE_MATH_DEFINES
|
CFLAGS += -Wall -D__LIBRETRO__ $(fpic) $(INCFLAGS) -std=gnu11 -D_GNU_SOURCE -D_USE_MATH_DEFINES
|
||||||
CXXFLAGS += -Wall -D__LIBRETRO__ $(fpic)
|
CXXFLAGS += -Wall -D__LIBRETRO__ $(fpic)
|
||||||
@ -137,7 +140,8 @@ else
|
|||||||
$(CC) $(fpic) $(SHARED) $(INCFLAGS) -o $@ $(OBJECTS) $(LDFLAGS)
|
$(CC) $(fpic) $(SHARED) $(INCFLAGS) -o $@ $(OBJECTS) $(LDFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
Core/%.o: Core/%.c
|
build/obj/%_libretro.c.o: %.c
|
||||||
|
-@$(MKDIR) -p $(dir $@)
|
||||||
$(CC) -c -o $@ $< $(CFLAGS) $(fpic) -DGB_INTERNAL
|
$(CC) -c -o $@ $< $(CFLAGS) $(fpic) -DGB_INTERNAL
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
|
Loading…
Reference in New Issue
Block a user