mgh: fix for default HDD DMA mode, that wasn't correctly set
[open-ps2-loader.git] / ee_core / Makefile
blob337995f2a181f7a44f0cb74f6b06c43be0bf37bd
1 # Copyright 2009-2010, Ifcaro, jimmikaelkael & Polo
2 # Copyright 2006-2008 Polo
3 # Licenced under Academic Free License version 3.0
4 # Review OPNPS2LD README & LICENSE files for further details.
6 # Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
10 # Standard Makefile
11 # Loader section begin at 0x000e7000
12 # g_buf is located at 0x00088000
14 EE_BIN = ee_core.elf
15 EE_OBJS = obj/main.o obj/syshook.o obj/iopmgr.o obj/modmgr.o obj/util.o obj/patches.o \
16 obj/padhook.o obj/spu.o obj/smbauth.o obj/des.o obj/md4.o obj/asm.o obj/crt0.o
17 MAPFILE = ee_core.map
19 EE_SRC_DIR = src/
20 EE_OBJS_DIR = obj/
22 EE_INCS := -I$(PS2SDK)/ee/include -I$(PS2SDK)/common/include -Iinclude -I.
23 EE_CFLAGS = -D_EE -O2 -G0 -Wall $(EE_INCS)
24 ifeq ($(EESIO_DEBUG),1)
25 EE_CFLAGS += -D__EESIO_DEBUG
26 endif
27 ifeq ($(LOAD_DEBUG_MODULES),1)
28 EE_CFLAGS += -D__LOAD_DEBUG_MODULES
29 endif
30 ifeq ($(VMC),1)
31 EE_CFLAGS += -DVMC
32 endif
34 EE_LDFLAGS = -nostartfiles -Tlinkfile -L$(PS2SDK)/ee/lib -L$(PS2SDK)/sbv/lib -s
35 EE_LIBS += -lpatches
37 ifeq ($(EESIO_DEBUG),1)
38 EE_LIBS += -lc
39 endif
41 EE_LIBS += -lkernel
44 $(EE_OBJS_DIR)%.o : $(EE_SRC_DIR)%.c
45 @mkdir -p obj
46 $(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@
48 $(EE_OBJS_DIR)%.o : $(EE_SRC_DIR)%.S
49 @mkdir -p obj
50 $(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@
52 $(EE_OBJS_DIR)%.o : $(EE_SRC_DIR)%.s
53 @mkdir -p obj
54 $(EE_AS) $(EE_ASFLAGS) $< -o $@
56 $(EE_BIN) : $(EE_OBJS)
57 $(EE_CC) $(EE_CFLAGS) $(EE_LDFLAGS) -o $(EE_BIN) $(EE_OBJS) $(EE_LIBS) -Xlinker -Map -Xlinker $(MAPFILE)
60 all:
61 $(EE_BIN)
63 clean:
64 rm -f $(EE_OBJS_DIR)*.* *.map *.bak *.elf
66 clean_all:
67 rm -f $(EE_OBJS_DIR)*.* *.map *.bak *.elf
70 include $(PS2SDK)/samples/Makefile.pref