# gpSP makefile # Gilead Kutnick - Exophase # pandora port - notaz # respberry pi - DPR # Global definitions CC = $(CROSS_COMPILE)gcc SYSROOT = $(shell $(CC) --print-sysroot) OBJS = main.o cpu.o gba_memory.o video.o input.o sound.o cheats.o cpu_threaded.o bios_data.o zip.o x86/x86_stub.o gba_cc_lut.o \ frontend/libpicofe/input.o frontend/libpicofe/in_sdl.o frontend/libpicofe/linux/in_evdev.o frontend/libpicofe/linux/plat.o frontend/libpicofe/fonts.o frontend/libpicofe/readpng.o frontend/libpicofe/config_file.o \ frontend/config.o frontend/menu.o frontend/plat_linux.o frontend/main.o frontend/scale.o BIN = picogpsp # Platform specific definitions CFLAGS += -DPC_BUILD -Wall -m32 -DX86_ARCH -DHAVE_DYNAREC -DHAVE_MMAP CFLAGS += -Ofast -fdata-sections -ffunction-sections -fno-PIC -DPICO_HOME_DIR='"/.picogpsp/"' CFLAGS += -I./ $(shell $(SYSROOT)/usr/bin/sdl-config --cflags) # expecting to have PATH set up to get correct sdl-config first LIBS = -m32 -lc -lgcc -lSDL -lasound -lpng -lz -Wl,--as-needed -Wl,--gc-sections -flto -s # Compilation: all: $(BIN) %.o: %.S $(CC) $(CFLAGS) -c -o $@ $< cpu.o cpu_threaded.o: CFLAGS += -Wno-unused-variable -Wno-unused-label $(BIN): $(OBJS) $(CC) $(OBJS) $(LIBS) -o $(BIN) clean: rm -f $(OBJS) $(BIN)