-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
86 lines (67 loc) · 1.97 KB
/
Makefile
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Copyright 2009-2010, Ifcaro, jimmikaelkael & Polo
# Copyright 2006-2008 Polo
# Licenced under Academic Free License version 3.0
# Review OPNPS2LD README & LICENSE files for further details.
#
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
# Licenced under Academic Free License version 2.0
# Review ps2sdk README & LICENSE files for further details.
#
# Standard Makefile
EE_BIN = ee_core.elf
GSMCORE_EE_OBJS = obj/gsm_engine.o obj/gsm_api.o
CHEATCORE_EE_OBJS = obj/cheat_engine.o obj/cheat_api.o
EE_OBJS = obj/main.o obj/syshook.o obj/iopmgr.o obj/modmgr.o obj/util.o obj/patches.o obj/patches_asm.o \
obj/padhook.o obj/spu.o obj/tlb.o obj/asm.o obj/crt0.o
MAPFILE = ee_core.map
EE_SRC_DIR = src/
EE_OBJS_DIR = obj/
EE_INCS := -I$(PS2SDK)/ee/include -I$(PS2SDK)/common/include -Iinclude -I.
EE_CFLAGS = -D_EE -Os -G0 -Wall $(EE_INCS)
ifeq ($(EESIO_DEBUG),1)
EE_CFLAGS += -D__EESIO_DEBUG
endif
ifeq ($(DTL_T10000),1)
EE_CFLAGS += -D_DTL_T10000
endif
ifeq ($(LOAD_DEBUG_MODULES),1)
EE_CFLAGS += -D__LOAD_DEBUG_MODULES
ifeq ($(DECI2_DEBUG),1)
EE_CFLAGS += -D__DECI2_DEBUG
endif
endif
ifeq ($(VMC),1)
EE_CFLAGS += -DVMC
endif
ifeq ($(GSM),1)
EE_OBJS += $(GSMCORE_EE_OBJS)
EE_CFLAGS += -DGSM
endif
ifeq ($(CHEAT),1)
EE_OBJS += $(CHEATCORE_EE_OBJS)
EE_CFLAGS += -DCHEAT
endif
EE_LDFLAGS = -nostartfiles -Tlinkfile -L$(PS2SDK)/ee/lib -s -Wl,-Map,$(MAPFILE)
EE_LIBS += -lpatches
ifeq ($(EESIO_DEBUG),1)
EE_LIBS += -lc
endif
EE_LIBS += -lkernel
$(EE_OBJS_DIR)%.o : $(EE_SRC_DIR)%.c
@mkdir -p obj
$(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@
$(EE_OBJS_DIR)%.o : $(EE_SRC_DIR)%.S
@mkdir -p obj
$(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@
$(EE_OBJS_DIR)%.o : $(EE_SRC_DIR)%.s
@mkdir -p obj
$(EE_AS) $(EE_ASFLAGS) $< -o $@
$(EE_BIN) : $(EE_OBJS)
$(EE_CC) $(EE_CFLAGS) $(EE_LDFLAGS) -o $(EE_BIN) $(EE_OBJS) $(EE_LIBS)
all:
$(EE_BIN)
clean:
rm -f -r $(EE_OBJS_DIR) $(EE_BIN) $(MAPFILE)
clean_all:
rm -f -r $(EE_OBJS_DIR) $(EE_BIN) $(MAPFILE)
include $(PS2SDK)/samples/Makefile.pref