-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.eeglobal
52 lines (39 loc) · 1.8 KB
/
Makefile.eeglobal
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
# _____ ___ ____ ___ ____
# ____| | ____| | | |____|
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
#-----------------------------------------------------------------------
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
# Licenced under Academic Free License version 2.0
# Review ps2sdk README & LICENSE files for further details.
#
# $Id: Makefile.eeglobal_sample 1150 2005-06-12 11:42:08Z pixel $
# Include directories
EE_INCS := $(EE_INCS) -I$(PS2SDK)/ee/include -I$(PS2SDK)/ports/include -I$(PS2SDK)/common/include -I.
# Libs
EE_LDFLAGS := $(EE_LDFLAGS) -L$(PS2SDK)/ports/lib
# C compiler flags
EE_CFLAGS := -D_EE -Os -G0 -Wall -ffunction-sections -fdata-sections -fsingle-precision-constant $(EE_CFLAGS)
# C++ compiler flags
EE_CXXFLAGS := -D_EE -Os -G0 -Wall -ffunction-sections -fdata-sections -fsingle-precision-constant $(EE_CXXFLAGS)
# Assembler flags
EE_ASFLAGS := -G0 $(EE_ASFLAGS)
# Externally defined variables: EE_BIN, EE_OBJS, EE_LIB
# These macros can be used to simplify certain build rules.
EE_C_COMPILE = $(EE_CC) $(EE_CFLAGS) $(EE_INCS)
EE_CXX_COMPILE = $(EE_CXX) $(EE_CXXFLAGS) $(EE_INCS)
%.o : %.c
$(EE_CC) $(EE_CFLAGS) $(EE_DEFS) $(EE_INCS) $(EE_LDFLAGS) -c $< -o $@
%.o : %.cc
$(EE_CXX) $(EE_CXXFLAGS) $(EE_DEFS) $(EE_INCS) -c $< -o $@
%.o : %.cpp
$(EE_CXX) $(EE_CXXFLAGS) $(EE_DEFS) $(EE_INCS) -c $< -o $@
%.o : %.S
$(EE_CC) $(EE_CFLAGS) $(EE_DEFS) $(EE_INCS) -c $< -o $@
%.o : %.s
$(EE_AS) $(EE_ASFLAGS) $< -o $@
$(EE_BIN) : $(EE_OBJS) crt0.o
# $(EE_CC) -Os -mno-crt0 -Tlinkfile $(EE_LDFLAGS) -s \
# -o $(EE_BIN) crt0.o $(EE_OBJS) $(EE_LIBS) -Wl,--gc-sections -Wl,--oformat=binary
$(EE_CC) -g -mno-crt0 -Tlinkfile $(EE_LDFLAGS) \
-o $(EE_ELF) crt0.o $(EE_OBJS) $(EE_LIBS) -Wl,--gc-sections
$(EE_OBJCOPY) -O binary $(EE_ELF) $(EE_BIN)