mgh: fix for default HDD DMA mode, that wasn't correctly set
[open-ps2-loader.git] / modules / vmc / mcman / Rules.make
bloba18d458416e90a1670e9464526e324b479ad0d71
1 # _____ ___ ____ ___ ____
2 # ____| | ____| | | |____|
3 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
4 #-----------------------------------------------------------------------
5 # Copyright 2001-2004.
6 # Licenced under Academic Free License version 2.0
7 # Review ps2sdk README & LICENSE files for further details.
10 IOP_CC_VERSION := $(shell $(IOP_CC) -v 2>&1 | sed -n 's/^.*versi[^ ]*n.* //p')
12 ASFLAGS_TARGET = -mcpu=r3000
14 ifeq ($(IOP_CC_VERSION),3.2.2)
15 CFLAGS_TARGET = -miop
16 ASFLAGS_TARGET = -march=r3000
17 LDFLAGS_TARGET = -miop
18 endif
20 IOP_INCS := $(IOP_INCS) -I$(PS2SDK)/iop/include -I$(PS2SDK)/common/include -Iinclude
22 IOP_CFLAGS := $(CFLAGS_TARGET) -O2 -G0 -c $(IOP_INCS) $(IOP_CFLAGS)
23 IOP_ASFLAGS := $(ASFLAGS_TARGET) -EL -G0 $(IOP_ASFLAGS)
24 IOP_LDFLAGS := $(LDFLAGS_TARGET) -nostdlib $(IOP_LDFLAGS)
26 # Externally defined variables: IOP_BIN, IOP_OBJS, IOP_LIB
28 %.o : %.c
29 $(IOP_CC) $(IOP_CFLAGS) $< -o $@
31 %.o : %.s
32 $(IOP_AS) $(IOP_ASFLAGS) $< -o $@
34 # A rule to build imports.lst.
35 %.o : %.lst
36 echo "#include \"irx_imports.h\"" > build-imports.c
37 cat $< >> build-imports.c
38 $(IOP_CC) $(IOP_CFLAGS) build-imports.c -o $@
39 -rm -f build-imports.c
41 # A rule to build exports.tab.
42 %.o : %.tab
43 echo "#include \"irx.h\"" > build-exports.c
44 cat $< >> build-exports.c
45 $(IOP_CC) $(IOP_CFLAGS) build-exports.c -o $@
46 -rm -f build-exports.c
49 $(IOP_BIN) : $(IOP_OBJS)
50 $(IOP_CC) $(IOP_LDFLAGS) -o $(IOP_BIN) $(IOP_OBJS) $(IOP_LIBS)
52 $(IOP_LIB) : $(IOP_OBJS)
53 $(IOP_AR) cru $(IOP_LIB) $(IOP_OBJS)