| 1 | CC = $(CROSS_COMPILE)gcc |
| 2 | |
| 3 | ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}') |
| 4 | |
| 5 | CFLAGS += -ggdb -Wall -fPIC -O2 |
| 6 | CFLAGS += -fno-strict-aliasing |
| 7 | |
| 8 | LDFLAGS += -shared -Wl,-soname,$(TARGET) |
| 9 | SRC += gpu.c |
| 10 | ifeq "$(ARCH)" "arm" |
| 11 | TARGET = gpu_neon.so |
| 12 | CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp |
| 13 | SRC += vout_fb.c ../../frontend/cspace_neon.s |
| 14 | else |
| 15 | TARGET = gpu_neon.so.x86 |
| 16 | CFLAGS += `sdl-config --cflags` -m32 |
| 17 | LDFLAGS += `sdl-config --libs` |
| 18 | SRC += vout_sdl.c |
| 19 | endif |
| 20 | PEOPS=1 |
| 21 | ifndef PEOPS |
| 22 | SRC += psx_gpu_if.c |
| 23 | else |
| 24 | SRC += peops_if.c |
| 25 | endif |
| 26 | |
| 27 | all: $(TARGET) |
| 28 | |
| 29 | $(TARGET): $(SRC) |
| 30 | $(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) |
| 31 | |
| 32 | clean: |
| 33 | $(RM) $(TARGET) |