forked from ps3dev/PSL1GHT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spu_rules
53 lines (41 loc) · 1.88 KB
/
spu_rules
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
ifeq ($(strip $(PS3DEV)),)
ifeq ($(strip $(DEVKITPS3)),)
export PS3DEV := /usr/local/ps3dev
else
export PS3DEV := $(DEVKITPS3)
endif
endif
export PATH := $(PS3DEV)/bin:$(PS3DEV)/spu/bin:$(PATH)
export PORTLIBS := $(PS3DEV)/portlibs/spu
export LIBPSL1GHT_INC := -I$(PSL1GHT)/spu/include -I$(PSL1GHT)/spu/include/simdmath
export LIBPSL1GHT_LIB := -L$(PSL1GHT)/spu/lib
export WM_CFLAGS := -Os -mfixed-range=80-127 -funroll-loops -fschedule-insns
export WM_STACK ?= 0x39e0
export WM_LDFLAGS := -nostdlib \
-Wl,--defsym=__stack=$(WM_STACK) \
-Wl,-Ttext-segment=0x2a00 \
-Wl,--entry,mars_module_entry -Wl,-u,mars_module_entry \
-Wl,--gc-sections \
-Wl,--sort-common \
-Wl,--sort-section=alignment \
-Wl,--cref \
-Wl,-s
export TASK_CFLAGS := -Os -ffast-math -ftree-vectorize -funroll-loops -fschedule-insns
export TASK_LDFLAGS := -Wl,-Ttext-segment=0x3a00 -Wl,--gc-sections -Wl,--local-store=0x3a00:0x3FFFF \
-L$(PSL1GHT)/spu/lib -Wl,--start-group -lspumarstask -lspumars -lsputhread -Wl,--end-group
export JOB_CFLAGS := -Os -fpic -ffast-math -ftree-vectorize -funroll-loops -fschedule-insns
export JOB_LDFLAGS := -nostartfiles -fpic -Wl,-r -Wl,-q -Wl,--entry,_start \
-L$(PSL1GHT)/spu/lib -Wl,--start-group -lspumarsjq -lspumars -lsputhread -Wl,--end-group
PREFIX := spu-
MACHDEP = -mdual-nops -fmodulo-sched -ffunction-sections -fdata-sections
include $(PSL1GHT)/base_rules
#---------------------------------------------------------------------------------
%.task:
$(VERB) echo linking ... $(notdir $@)
$(VERB) $(LD) $^ $(TASK_LDFLAGS) $(LDFLAGS) $(LIBPATHS) $(LIBS) -o $@
%.jq:
$(VERB) echo linking ... $(notdir $@)
$(VERB) $(LD) $^ $(JOB_LDFLAGS) $(LDFLAGS) $(LIBPATHS) $(LIBS) -o $@
%.wm:
$(VERB) echo linking ... $(notdir $@)
$(VERB) $(LD) $^ $(WM_LDFLAGS) $(LDFLAGS) $(LIBPATHS) $(LIBS) -o $@