mirror of
https://github.com/FunKey-Project/gpsp_libretro.git
synced 2026-05-02 10:59:35 +02:00
add debug build option to x86 standalone target.
This commit is contained in:
38
x86/Makefile
38
x86/Makefile
@@ -8,8 +8,8 @@ STRIP = strip
|
||||
AS = as
|
||||
|
||||
PREFIX = /usr
|
||||
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
|
||||
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
|
||||
|
||||
# Platform specific definitions
|
||||
|
||||
@@ -23,30 +23,38 @@ endif
|
||||
|
||||
BIN ?= gpsp$(EXE_EXT)
|
||||
|
||||
VPATH += ..
|
||||
CFLAGS += -DPC_BUILD -Wall -m32
|
||||
INCLUDES = -I${PREFIX}/include `sdl-config --cflags`
|
||||
LIBS = -L${PREFIX}/lib32 `sdl-config --libs` -lz -m32
|
||||
INCLUDES = -I$(PREFIX)/include `sdl-config --cflags`
|
||||
LIBS = -L$(PREFIX)/lib32 `sdl-config --libs` -lz -m32
|
||||
|
||||
# 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
|
||||
${CC} ${CFLAGS} ${INCLUDES} -c -o $@ $<
|
||||
$(CC) $(CFLAGS) $(OPTIMIZE) $(INCLUDES) -c -o $@ $<
|
||||
|
||||
%.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}
|
||||
${CC} ${OBJS} ${LIBS} -o ${BIN}
|
||||
# ${STRIP} ${BIN}
|
||||
../cpu_threaded.o: ../cpu_threaded.c
|
||||
$(CC) -c -o $@ $< $(CFLAGS) -Wno-unused-variable -Wno-unused-label $(OPTIMIZE_SAFE) $(INCLUDES)
|
||||
|
||||
|
||||
$(BIN): $(OBJS)
|
||||
$(CC) $(OBJS) $(LIBS) -o $(BIN)
|
||||
|
||||
clean:
|
||||
rm -f *.o ${BIN}
|
||||
rm -f $(OBJS) $(BIN)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user