blob: e65d81b2bf1289bf072131785f7b5d3b52fa501e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
CC = $(CROSS_COMPILE)gcc
AS = $(CROSS_COMPILE)as
AR = $(CROSS_COMPILE)ar
ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}')
CFLAGS += -ggdb -Wall
ifndef DEBUG
CFLAGS += -O2
endif
OBJS += gpu.o
ifeq "$(ARCH)" "arm"
ARM_CORTEXA8 ?= 1
ifeq "$(ARM_CORTEXA8)" "1"
CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fPIC
ASFLAGS += -mcpu=cortex-a8 -mfpu=neon
OBJS += cspace_neon.o
else
CFLAGS += -mcpu=arm926ej-s -mtune=arm926ej-s
ASFLAGS += -mcpu=arm926ej-s -mfloat-abi=softfp
OBJS += cspace.o
endif
OBJS += vout_fb.o
EXT = a
else
CFLAGS += `sdl-config --cflags` -m32
OBJS += vout_sdl.o
EXT = x86.a
endif
TARGET = gpulib.$(EXT)
all: $(TARGET)
$(TARGET): $(OBJS)
$(AR) crs $@ $^
clean:
$(RM) $(TARGET) $(OBJS)
|