gpu-gles: schtruck/fpse merge: remove windows code
[pcsx_rearmed.git] / plugins / gpulib / gpulib.mak
CommitLineData
62d7fa95 1# depends on ARCH definition
2# always adding gpulib to LDLIBS in case cspace is needed
3
4LDFLAGS += -shared
5ifeq "$(ARCH)" "arm"
6 ARM_CORTEXA8 ?= 1
7 ifeq "$(ARM_CORTEXA8)" "1"
8 CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
9 ASFLAGS += -mcpu=cortex-a8 -mfpu=neon
10 else
11 CFLAGS += -mcpu=arm926ej-s -mtune=arm926ej-s
12 ASFLAGS += -mcpu=arm926ej-s -mfloat-abi=softfp
13 endif
14 EXT =
15else
16 CFLAGS += -m32
17 LDFLAGS += -m32
18 LDLIBS_GPULIB += `sdl-config --libs`
19 EXT = .x86
20endif
21ifdef MAEMO
22 CFLAGS += -DMAEMO
23endif
24ifdef DEBUG
25 CFLAGS += -O0
26endif
27
28GPULIB_A = ../gpulib/gpulib$(EXT).a
29LDLIBS += $(GPULIB_A)
30
31ifdef BIN_STANDLALONE
32TARGETS += $(BIN_STANDLALONE)$(EXT)
33endif
34ifdef BIN_GPULIB
35TARGETS += $(BIN_GPULIB)$(EXT)
36endif
37
38all: $(GPULIB_A) $(TARGETS)
39
40ifdef BIN_STANDLALONE
41$(BIN_STANDLALONE)$(EXT): $(SRC) $(SRC_STANDALONE)
42 $(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LDLIBS_STANDALONE)
43endif
44
45ifdef BIN_GPULIB
46$(BIN_GPULIB)$(EXT): $(SRC) $(SRC_GPULIB)
47 $(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LDLIBS_GPULIB)
48endif
49
50$(GPULIB_A):
51 make -C ../gpulib/ all
52
53clean:
54 $(RM) $(TARGETS)