add debug build option to x86 standalone target.

This commit is contained in:
aliaspider 2014-12-09 02:43:59 +01:00
parent 3510bfb528
commit 3cc3944725
4 changed files with 25 additions and 16 deletions

View file

@ -43,6 +43,7 @@ static inline void switch_to_cpu_thread(void)
static void cpu_thread_entry(void) static void cpu_thread_entry(void)
{ {
execute_arm_translate(execute_cycles); execute_arm_translate(execute_cycles);
execute_arm(execute_cycles);
} }
static inline void init_context_switch(void) static inline void init_context_switch(void)

1
main.h
View file

@ -92,6 +92,7 @@ u32 update_gba();
void reset_gba(); void reset_gba();
#ifdef __LIBRETRO__ #ifdef __LIBRETRO__
#define synchronize() #define synchronize()
void init_main();
#else #else
void synchronize(); void synchronize();
#endif #endif

View file

@ -101,7 +101,6 @@ const u32 video_scale = 1;
#define get_screen_pitch() \ #define get_screen_pitch() \
(screen->pitch / 2) \ (screen->pitch / 2) \
#endif
#endif #endif

View file

@ -8,8 +8,8 @@ STRIP = strip
AS = as AS = as
PREFIX = /usr PREFIX = /usr
OBJS = main.o cpu.o memory.o video.o input.o sound.o \ OBJS = ../main.o ../cpu.o ../memory.o ../video.o ../input.o ../sound.o \
cpu_threaded.o gui.o x86_stub.o cheats.o zip.o ../cpu_threaded.o ../gui.o x86_stub.o ../cheats.o ../zip.o
# Platform specific definitions # Platform specific definitions
@ -23,30 +23,38 @@ endif
BIN ?= gpsp$(EXE_EXT) BIN ?= gpsp$(EXE_EXT)
VPATH += ..
CFLAGS += -DPC_BUILD -Wall -m32 CFLAGS += -DPC_BUILD -Wall -m32
INCLUDES = -I${PREFIX}/include `sdl-config --cflags` INCLUDES = -I$(PREFIX)/include `sdl-config --cflags`
LIBS = -L${PREFIX}/lib32 `sdl-config --libs` -lz -m32 LIBS = -L$(PREFIX)/lib32 `sdl-config --libs` -lz -m32
# Compilation: # Compilation:
ifeq ($(DEBUG), 1)
OPTIMIZE := -O0 -g
OPTIMIZE_SAFE := -O0 -g
else
OPTIMIZE := -O3
OPTIMIZE_SAFE := -O2
endif
.SUFFIXES: .c .S all: $(BIN)
all: ${BIN}
%.o: %.c %.o: %.c
${CC} ${CFLAGS} ${INCLUDES} -c -o $@ $< $(CC) $(CFLAGS) $(OPTIMIZE) $(INCLUDES) -c -o $@ $<
%.o: %.S %.o: %.S
${CC} ${CFLAGS} -c -o $@ $< $(CC) $(CFLAGS) $(OPTIMIZE) -c -o $@ $<
cpu.o cpu_threaded.o: CFLAGS += -Wno-unused-variable -Wno-unused-label ../cpu.o: ../cpu.c
$(CC) -c -o $@ $< $(CFLAGS) -Wno-unused-variable -Wno-unused-label $(OPTIMIZE_SAFE) $(INCLUDES)
${BIN}: ${OBJS} ../cpu_threaded.o: ../cpu_threaded.c
${CC} ${OBJS} ${LIBS} -o ${BIN} $(CC) -c -o $@ $< $(CFLAGS) -Wno-unused-variable -Wno-unused-label $(OPTIMIZE_SAFE) $(INCLUDES)
# ${STRIP} ${BIN}
$(BIN): $(OBJS)
$(CC) $(OBJS) $(LIBS) -o $(BIN)
clean: clean:
rm -f *.o ${BIN} rm -f $(OBJS) $(BIN)