adding i18n strings
[open-ps2-loader.git] / modules / network / SMSMAP / Rules.make
blob5d80cf351e559c3ce4a806bb1db6bed3bb92d275
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 else
19 ifeq ($(IOP_CC_VERSION),gcc 3.2.2)
20 CFLAGS_TARGET = -miop
21 ASFLAGS_TARGET = -march=r3000
22 LDFLAGS_TARGET = -miop
23 endif
24 endif
26 IOP_INCS := $(IOP_INCS) -I$(PS2SDK)/iop/include -I$(PS2SDK)/common/include -Iinclude
28 IOP_CFLAGS := $(CFLAGS_TARGET) -O2 -G0 -c $(IOP_INCS) $(IOP_CFLAGS)
29 IOP_ASFLAGS := $(ASFLAGS_TARGET) -EL -G0 $(IOP_ASFLAGS)
30 IOP_LDFLAGS := $(LDFLAGS_TARGET) -nostdlib $(IOP_LDFLAGS)
32 # Externally defined variables: IOP_BIN, IOP_OBJS, IOP_LIB
34 %.o : %.c
35 $(IOP_CC) $(IOP_CFLAGS) $< -o $@
37 %.o : %.s
38 $(IOP_AS) $(IOP_ASFLAGS) $< -o $@
40 # A rule to build imports.lst.
41 %.o : %.lst
42 echo "#include \"irx_imports.h\"" > build-imports.c
43 cat $< >> build-imports.c
44 $(IOP_CC) $(IOP_CFLAGS) build-imports.c -o $@
45 -rm -f build-imports.c
47 # A rule to build exports.tab.
48 %.o : %.tab
49 echo "#include \"irx.h\"" > build-exports.c
50 cat $< >> build-exports.c
51 $(IOP_CC) $(IOP_CFLAGS) build-exports.c -o $@
52 -rm -f build-exports.c
55 $(IOP_BIN) : $(IOP_OBJS)
56 $(IOP_CC) $(IOP_LDFLAGS) -o $(IOP_BIN) $(IOP_OBJS) $(IOP_LIBS)
58 $(IOP_LIB) : $(IOP_OBJS)
59 $(IOP_AR) cru $(IOP_LIB) $(IOP_OBJS)