source: ps2launchargs/source/uLaunchELF/chkesr/Rules.make@ 1155

Last change on this file since 1155 was 1101, checked in by iritscen, 7 years ago

Added following to ps2launchargs:\n-Source code.\n-DLL needed to run ps2client.\n-Instructions for building uLaunchELF.

  • Property svn:executable set to *
File size: 1.5 KB
Line 
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.
8
9
10IOP_CC_VERSION := $(shell $(IOP_CC) -v 2>&1 | sed -n 's/^.*version //p')
11
12ASFLAGS_TARGET = -mcpu=r3000
13
14ifeq ($(IOP_CC_VERSION),3.2.2)
15CFLAGS_TARGET = -miop
16ASFLAGS_TARGET = -march=r3000
17LDFLAGS_TARGET = -miop
18endif
19
20IOP_INCS := $(IOP_INCS) -I$(PS2SDK)/iop/include -I$(PS2SDK)/common/include
21
22IOP_CFLAGS := $(CFLAGS_TARGET) -O2 -G0 -c $(IOP_INCS) $(IOP_CFLAGS)
23IOP_ASFLAGS := $(ASFLAGS_TARGET) -EL -G0 $(IOP_ASFLAGS)
24IOP_LDFLAGS := $(LDFLAGS_TARGET) -nostdlib $(IOP_LDFLAGS)
25
26# Externally defined variables: IOP_BIN, IOP_OBJS, IOP_LIB
27
28%.o : %.c
29 $(IOP_CC) $(IOP_CFLAGS) $< -o $@
30
31%.o : %.s
32 $(IOP_AS) $(IOP_ASFLAGS) $< -o $@
33
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
40
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
47
48
49$(IOP_BIN) : $(IOP_OBJS)
50 $(IOP_CC) $(IOP_LDFLAGS) -o $(IOP_BIN) $(IOP_OBJS) $(IOP_LIBS)
51
52$(IOP_LIB) : $(IOP_OBJS)
53 $(IOP_AR) cru $(IOP_LIB) $(IOP_OBJS)
54
Note: See TracBrowser for help on using the repository browser.