blob: cec6f5a68be4548d66ed16b09466e226f70e16b5 (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# depends on ARCH definition
# always adding gpulib to LDLIBS in case cspace is needed
LDFLAGS += -shared
ifeq "$(ARCH)" "arm"
ARM_CORTEXA8 ?= 1
ifeq "$(ARM_CORTEXA8)" "1"
CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
ASFLAGS += -mcpu=cortex-a8 -mfpu=neon
else
CFLAGS += -mcpu=arm926ej-s -mtune=arm926ej-s
ASFLAGS += -mcpu=arm926ej-s -mfloat-abi=softfp
endif
EXT =
else
CFLAGS += -m32
LDFLAGS += -m32
LDLIBS_GPULIB += `sdl-config --libs`
EXT = .x86
endif
ifdef MAEMO
CFLAGS += -DMAEMO
endif
ifdef DEBUG
CFLAGS += -O0
endif
GPULIB_A = ../gpulib/gpulib$(EXT).a
LDLIBS += $(GPULIB_A)
ifdef BIN_STANDLALONE
TARGETS += $(BIN_STANDLALONE)$(EXT)
endif
ifdef BIN_GPULIB
TARGETS += $(BIN_GPULIB)$(EXT)
endif
all: $(GPULIB_A) $(TARGETS)
ifdef BIN_STANDLALONE
$(BIN_STANDLALONE)$(EXT): $(SRC) $(SRC_STANDALONE)
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LDLIBS_STANDALONE)
endif
ifdef BIN_GPULIB
$(BIN_GPULIB)$(EXT): $(SRC) $(SRC_GPULIB)
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LDLIBS_GPULIB)
endif
$(GPULIB_A):
make -C ../gpulib/ all
clean:
$(RM) $(TARGETS)
|