#############################################################################
#
#	Tomb Raider III
#	PlayStation Makefile
#
#############################################################################

RELOC = 0
SONY_SHELL = 0
PSYLINK = 1

PROGNAME = main

CC = ccpsx
ASM = asmpsx

G = ..\game\
S = ..\spec_psx\
INC = ..\game\;..\spec_psx\

!ifeq PSYLINK 1
LINK = psylink
LOPT  = /c /m /q
!else
LINK = slink
LOPT  = -c -st -strip -nostripfile ..\game\*.obj ..\spec_psx\*.obj -nostripfile
!endif

COPT = -c -comments-c++ -DPSX_VERSION -g -Wall -O2 -G256 -Wa,x,0 -o$^@ $[@
COPT1 = -c -comments-c++ -DPSX_VERSION -g -Wall -O2 -G1280 -Wa,x,0 -o$^@ $[@
COPTD = -c -comments-c++ -DPSX_VERSION -g -Wall -O0 -o$^@ $[@

AOPT = /g /l /zd /oat+,w-,c+ /q $[@,$^@

LIB = /psx/lib.41

LINKFILE = link.lnk

!ifeq RELOC 1
COPTR =	ccpsx -c -comments-c++ -DPSX_VERSION -g -Wall -O2 -G0 -Wa,x,0 -o$^@ $[@
LINKR = psylink /c /m /p /q
!else
COPTR = ccpsx -c -comments-c++ -DPSX_VERSION -g -Wall -O2 -G0 -Wa,x,0 -o$^@ $[@
!endif

#############################################################################
#
#	Targets
#
#############################################################################

OBJ =	$(S)psxmain.obj		&
	$(G)lara.obj    	&
	$(G)control.obj 	&
	$(G)box.obj    		&
	$(G)camera.obj  	&
	$(G)collide.obj 	&
	$(G)demo.obj    	&
	$(G)draw.obj    	&
	$(G)effect2.obj		&
	$(G)effects.obj 	&
	$(G)fish.obj  		&
	$(G)gameflow.obj	&
	$(G)gf_data.obj 	&
	$(G)hair.obj		&
	$(G)health.obj  	&
	$(G)invdata.obj 	&
	$(G)inventry.obj	&
	$(G)invfunc.obj		&
	$(G)items.obj   	&
	$(G)lara1gun.obj	&
	$(G)lara2gun.obj	&
	$(G)laraclmb.obj	&
	$(G)larafire.obj	&
	$(G)laraflar.obj	&
	$(G)laramisc.obj	&
	$(G)laraswim.obj	&
	$(G)larasurf.obj	&
	$(G)lot.obj		&
	$(G)missile.obj		&
	$(G)moveblok.obj	&
	$(G)objects.obj 	&
	$(G)people.obj  	&
	$(G)pickup.obj  	&
	$(G)savegame.obj	&
	$(G)setup.obj   	&
	$(G)sound.obj		&
	$(G)sphere.obj  	&
	$(G)text.obj		&
	$(G)traps.obj		&
	$(G)objlight.obj	&
	$(S)3d_gen.obj		&
	$(S)cd.obj		&
	$(S)gpu.obj		&
	$(S)file.obj		&
	$(S)malloc.obj		&
	$(S)picture.obj		&
	$(S)ins_obj.obj		&
	$(S)misc.obj		&
	$(S)atan.obj		&
	$(S)3d_obj.obj		&
	$(S)c_math.obj		&
	$(S)psx_init.obj	&
	$(S)psxinput.obj	&
	$(S)gen_draw.obj	&
	$(S)roomload.obj	&
	$(S)load_lev.obj	&
	$(S)lite_src.obj	&
	$(S)psoutput.obj	&
	$(S)psxtitle.obj	&
	$(S)specific.obj	&
	$(S)profile.obj		&
	$(S)game.obj		&
	$(S)option.obj		&
	$(S)memcard.obj		&
	$(S)adraw.obj		&
	$(S)drawrlet.obj	&
	$(S)newshit.obj		&
	$(S)maths.obj		&
	$(S)catan.obj		&
	$(S)drawspks.obj	&
	$(S)spusound.obj	&
	$(S)amaths.obj		&
	$(S)door.obj		&
	$(S)get.obj		&
	$(S)drawsky.obj		&
	$(S)drawfish.obj	&
	$(S)drawobj.obj		&
	$(G)footprnt.obj
#	$(S)delasm.obj		&

!ifeq RELOC 0
OBJ2 =  $(G)boat.obj		&
	$(G)cinema.obj		&
	$(G)diver.obj		&
	$(G)rain.obj		&
	$(G)rat.obj		&
	$(G)orca.obj		&
	$(G)trex.obj		&
	$(G)bird.obj		&
	$(G)51laser.obj		&
	$(G)51rocket.obj	&
	$(G)51baton.obj		&
	$(G)51civvy.obj		&
	$(G)dragfire.obj	&
	$(G)mpgun.obj		&
	$(G)prisoner.obj	&
	$(G)autogun.obj		&
	$(G)swat.obj		&
	$(G)boomute.obj		&
	$(G)firehead.obj	&
	$(G)blowpipe.obj	&
	$(G)compy.obj		&
	$(G)dog.obj		&
	$(G)flamer.obj		&
	$(G)kayak.obj		&
	$(G)train.obj		&
	$(G)sub.obj		&
	$(G)biggun.obj		&
	$(G)laraelec.obj	&
	$(G)fusebox.obj		&
	$(G)lasers.obj		&
	$(G)lizman.obj		&
	$(G)quadbike.obj	&
	$(G)raptor.obj		&
	$(G)rapmaker.obj	&
	$(G)flymaker.obj	&
	$(G)shiva.obj		&
	$(G)snow.obj		&
	$(G)tribeaxe.obj 	&
	$(G)triboss.obj		&
	$(G)tonyboss.obj	&
	$(G)londboss.obj	&
	$(G)willboss.obj	&
	$(G)wingmute.obj	&
	$(G)minecart.obj	&
	$(G)punk.obj		&
	$(G)croc.obj		&
	$(G)londsec.obj		&
	$(G)clawmute.obj	&
	$(G)hybrid.obj		&
	$(G)sealmute.obj	&
	$(G)monkey.obj		&
	$(G)cobra.obj		&
	$(G)cleaner.obj		&
	$(G)tiger.obj		&
	$(G)winston.obj		&
	$(G)target.obj		&
	$(G)oilred.obj		&
	$(G)oilsmg.obj		&
	$(G)armysmg.obj		&
	$(G)uwparts.obj		&
	$(S)fmv.obj
!endif

#############################################################################
#
#	Link
#
#############################################################################

$(PROGNAME).cpe : $(OBJ) $(OBJ2)
	@%create $(LINKFILE)
!ifeq SONY_SHELL 1
	@%append $(LINKFILE) 		org	$$80018000
!else
	@%append $(LINKFILE) 		org	$$00010000
!endif
	@%append $(LINKFILE) text	group
	@%append $(LINKFILE) bss	group	bss
	@%append $(LINKFILE)		section .text,text
	@%append $(LINKFILE)		section ASM,text
	@%append $(LINKFILE)		section .data,text
	@%append $(LINKFILE)		section .rdata,text
	@%append $(LINKFILE)		section .ctors,text
	@%append $(LINKFILE)		section .dtors,text
	@%append $(LINKFILE)		section .sdata,text
	@%append $(LINKFILE)		section .sbss,bss
	@%append $(LINKFILE)		section	.bss,bss
	@for %i in ($(OBJ)) do @%append $(LINKFILE)  include %i
	@for %i in ($(OBJ2)) do @%append $(LINKFILE)  include %i
	@%append $(LINKFILE)		inclib	$(LIB)/libapi.lib
	@%append $(LINKFILE)		inclib	$(LIB)/libc.lib
	@%append $(LINKFILE)		inclib	$(LIB)/libc2.lib
	@%append $(LINKFILE)		inclib	$(LIB)/libcard.lib
	@%append $(LINKFILE)		inclib	$(LIB)/libcd.lib
	@%append $(LINKFILE)		inclib	$(LIB)/libds.lib
	@%append $(LINKFILE)		inclib	$(LIB)/libetc.lib
	@%append $(LINKFILE)		inclib	$(LIB)/libgpu2.lib
	@%append $(LINKFILE)		inclib	$(LIB)/libgs.lib
	@%append $(LINKFILE)		inclib	$(LIB)/libgte.lib
	@%append $(LINKFILE)		inclib	$(LIB)/libpress.lib
	@%append $(LINKFILE)		inclib	$(LIB)/libsnd.lib
	@%append $(LINKFILE)		inclib	$(LIB)/libspu.lib
	@%append $(LINKFILE)		inclib	$(LIB)/libpad.lib
!ifeq SONY_SHELL 1
	@%append $(LINKFILE)		inclib	$(LIB)/none2.lib
!else
	@%append $(LINKFILE)		inclib	$(LIB)/libsn.lib
!endif
	@%append $(LINKFILE)		regs	pc=__SN_ENTRY_POINT
!ifeq PSYLINK 1
	@$(LINK) $(LOPT) @$(LINKFILE),$(PROGNAME).cpe,$(PROGNAME).sym,$(PROGNAME).map
!else
	@$(LINK) /psx $(LOPT) @$(LINKFILE) /o$(PROGNAME).cpe,$(PROGNAME).sym,$(PROGNAME).map
!endif
	@if exist $(LINKFILE) @del $(LINKFILE) >NUL

#############################################################################
#
#	Global Dependencies
#
#############################################################################

GALL = 	$(G)51LASER.H 	&
	$(G)51ROCKET.H 	&
	$(G)51BATON.H 	&
	$(G)51CIVVY.H 	&
 	$(G)ANIM.H  	&
 	$(G)ARMYSMG.H  	&
 	$(G)AUTOGUN.H  	&
	$(G)BIRD.H  	&
	$(G)BLOWPIPE.H 	&
	$(G)BOAT.H  	&
	$(G)BOOMUTE.H  	&
	$(G)BOX.H   	&
	$(G)CAMERA.H	&
	$(G)CINEMA.H	&
	$(G)CLAWMUTE.H	&
	$(G)CLEANER.H	&
	$(G)COBRA.H	&
	$(G)COLLIDE.H	&
	$(G)COMPY.H	&
	$(G)CONTROL.H	&
	$(G)DEMO.H  	&
	$(G)DOG.H  	&
	$(G)DRAGFIRE.H 	&
	$(G)DRAW.H  	&
	$(G)EFFECT2.H	&
	$(G)EFFECTS.H	&
	$(G)FIREHEAD.H 	&
	$(G)FISH.H  	&
	$(G)FLAMER.H  	&
	$(G)FUSEBOX.H  	&
	$(G)GAMEFLOW.H	&
	$(G)GAMETEXT.H	&
	$(G)HAIR.H  	&
	$(G)HEALTH.H	&
	$(G)HYBRID.H	&
	$(G)INPUT.H 	&
	$(G)INVDATA.H	&
	$(G)INVENTRY.H	&
	$(G)INVFUNC.H	&
	$(G)ITEMS.H 	&
	$(G)KAYAK.H	&
	$(G)LARA.H  	&
	$(G)LARA1GUN.H	&
	$(G)LARA2GUN.H	&
	$(G)LARAANIM.H	&
	$(G)LARACLMB.H	&
	$(G)LARAELEC.H	&
	$(G)LARAFIRE.H	&
	$(G)LARAFLAR.H	&
	$(G)LARAFUNC.H	&
	$(G)LARAMISC.H	&
	$(G)LARASURF.H	&
	$(G)LARASWIM.H	&
	$(G)LASERS.H   	&
	$(G)LIZMAN.H   	&
	$(G)LONDSEC.H  	&
	$(G)LOT.H   	&
	$(G)MINECART.H	&
	$(G)MISSILE.H	&
	$(G)MONKEY.H	&
	$(G)MOVEBLOK.H	&
 	$(G)MPGUN.H  	&
	$(G)OBJECTS.H	&
	$(G)OILRED.H	&
	$(G)OILSMG.H	&
	$(G)PEOPLE.H	&
	$(G)PICKUP.H	&
	$(G)PRISONER.H	&
	$(G)PUNK.H	&
	$(G)QUADBIKE.H	&
	$(G)RAPTOR.H   	&
	$(G)RAPMAKER.H   &
	$(G)FLYMAKER.H   &
	$(G)RAT.H   	&
	$(G)ROOM.H  	&
	$(G)SAVEGAME.H	&
	$(G)SETUP.H 	&
	$(G)TRAIN.H	&
	$(G)ORCA.H 	&
	$(G)SHIVA.H 	&
	$(G)SKIDOO.H	&
	$(G)SOUND.H 	&
	$(G)SPHERE.H	&
	$(G)SWAT.H	&
	$(G)TIGER.H  	&
	$(G)TEXT.H  	&
	$(G)TITLE.H 	&
	$(G)TRAPS.H	&
	$(G)TREX.H	&
	$(G)TRIBEAXE.H 	&
	$(G)TRIBOSS.H  	&
	$(G)TONYBOSS.H  &
	$(G)LONDBOSS.H	&
	$(G)WILLBOSS.H	&
	$(G)WINGMUTE.H	&
	$(G)WINSTON.H	&
	$(G)OBJLIGHT.H

O=	$(G)objects.h

SAVE =	$(G)savegame.h 	&
	$(G)gameflow.h

INV =	$(G)invfunc.h	&
	$(G)invdata.h	&
	$(G)text.h	&
	$(G)input.h

ITEMS=	$(S)typedefs.h	&
	$(S)3d_gen.h	&
	$(S)maths.h	&
	$(S)gpu.h	&
	$(G)items.h

COLLIDE=$(ITEMS)	&
	$(G)room.h	&
	$(G)collide.h

ANIM=	$(COLLIDE)	&
	$(G)anim.h

EFFECTS=$(ANIM)		&
	$(G)effects.h

LARA=	$(EFFECTS)	&
	$(G)larafire.h	&
	$(G)box.h	&
	$(G)draw.h	&
	$(G)lara.h

LARANIM=$(EFFECTS)	&
	$(G)larafire.h	&
	$(G)box.h	&
	$(G)laraanim.h

CAMERA=	$(ANIM)		&
	$(G)camera.h

CONTROL=$(ANIM)		&
	$(G)control.h

FNC=	$(ANIM)		&
	$(G)camera.h	&
	$(G)control.h	&
	$(G)sound.h	&
	$(G)input.h

LANIM=	$(LARA)		&
	$(G)laraanim.h

SOUND=	$(S)typedefs.h	&
	$(S)3d_gen.h	&
	$(S)gpu.h	&
	$(G)sound.h

INPUT =	$(G)input.h

#############################################################################
#
#	Global Compile
#
#############################################################################

$(G)box.obj : $(G)box.c $(O) $(LARANIM) $(CONTROL) $(CAMERA) $(G)sphere.h $(G)lot.h
	$(CC) $(COPT)

$(G)camera.obj : $(G)camera.c $(LARANIM) $(FNC) $(SAVE) $(G)cinema.h
	$(CC) $(COPT)

$(G)collide.obj : $(G)collide.c $(O) $(LARANIM) $(G)control.h $(G)sound.h $(G)inventry.h $(G)sphere.h
	$(CC) $(COPT)
	@dmpsx $(G)collide.obj

$(G)control.obj : $(G)control.c $(O) $(LARANIM) $(FNC) $(SAVE) $(G)inventry.h $(G)hair.h $(G)title.h $(G)laramisc.h $(G)effect2.h $(G)pickup.h $(G)demo.h $(G)moveblok.h $(G)traps.h $(G)lot.h $(G)health.h $(G)fish.h $(S)specific.h
	$(CC) $(COPT)

$(G)demo.obj : $(G)demo.c $(LHDR) $(IHDR) $(G)gameflow.h $(G)text.h $(G)title.h $(G)setup.h $(G)demo.h
	$(CC) $(COPT)

$(G)draw.obj : $(G)draw.c $(O) $(LANIM) $(INV) $(G)camera.h $(G)control.h $(G)inventry.h $(G)effect2.h $(G)hair.h $(G)health.h $(G)rain.h  $(G)footprnt.h $(S)specific.h $(G)gameflow.h $(G)triboss.h $(G)lasers.h $(G)laraelec.h
	$(CC) $(COPT)
	@dmpsx $(G)draw.obj

$(G)effects.obj : $(G)effects.c $(O) $(LANIM) $(FNC) $(SAVE) $(G)hair.h $(G)effect2.h $(G)sphere.h $(G)footprnt.h $(S)specific.h
	$(CC) $(COPT)

$(G)effect2.obj : $(G)effect2.c $(O) $(LARA) $(G)control.h $(G)effect2.h $(G)fish.h $(G)draw.h
	$(CC) $(COPT1)

$(G)fish.obj : $(G)fish.c $(O) $(LARA) $(G)fish.h
	$(CC) $(COPT)

$(G)gameflow.obj : $(G)gameflow.c $(O) $(LARA) $(SAVE) $(INV) $(G)title.h $(G)demo.h $(G)laramisc.h $(G)health.h $(G)cinema.h $(S)specific.h $(S)cd.h
	$(CC) $(COPT)

$(G)gf_data.obj : $(G)gf_data.c $(S)stypes.h $(G)gameflow.h
	$(CC) $(COPT)

$(G)hair.obj : $(G)hair.c $(O) $(LANIM) $(G)control.h $(G)sphere.h $(G)effect2.h $(S)specific.h
	$(CC) $(COPT)
	@dmpsx $(G)hair.obj

$(G)health.obj : $(G)health.c $(O) $(LANIM) $(SAVE) $(G)title.h  $(G)text.h $(G)health.h
	$(CC) $(COPT)

$(G)inventry.obj : $(G)inventry.c $(O) $(LARA) $(FNC) $(SAVE) $(G)inventry.h $(INV) $(G)laramisc.h $(G)health.h $(G)title.h $(G)demo.h $(S)option.h $(S)cd.h
	$(CC) $(COPT)

$(G)invfunc.obj : $(G)invfunc.c $(O) $(LARA) $(SAVE) $(INV) $(G)control.h $(G)inventry.h $(G)title.h $(S)option.h
	$(CC) -fno-builtin $(COPT)

$(G)invdata.obj : $(G)invdata.c $(O) $(INV) $(G)inventry.h $(G)title.h
	$(CC) $(COPT1)

$(G)items.obj : $(G)items.c $(O) $(LARA) $(SAVE) $(G)effect2.h $(G)demo.h $(S)specific.h
	$(CC) $(COPT)

$(G)lara.obj : $(G)lara.c $(O) $(LANIM) $(FNC) $(INV) $(G)inventry.h $(G)laramisc.h $(G)larafunc.h $(G)effect2.h $(G)sphere.h $(G)skidoo.h $(G)quadbike.h $(G)minecart.h $(G)kayak.h $(G)sub.h $(G)biggun.h
	$(CC) $(COPT)
	@dmpsx $(G)lara.obj

$(G)lara1gun.obj : $(G)lara1gun.c $(O) $(LANIM) $(FNC) $(SAVE) $(G)effect2.h $(G)traps.h $(G)lara1gun.h $(G)triboss.h $(S)file.h
	$(CC) $(COPT)

$(G)lara2gun.obj : $(G)lara2gun.c $(O) $(LANIM) $(CONTROL) $(SOUND) $(G)input.h $(G)effect2.h $(G)lara2gun.h
	$(CC) $(COPT)

$(G)laraclmb.obj : $(G)laraclmb.c $(O) $(LANIM) $(G)camera.h $(G)control.h $(G)input.h $(G)laramisc.h
	$(CC) $(COPT)

$(G)larafire.obj : $(G)larafire.c $(O) $(LANIM) $(FNC) $(SAVE) $(INV) $(G)sphere.h $(G)traps.h $(G)lot.h $(G)laraflar.h $(G)lara1gun.h $(G)lara2gun.h $(G)triboss.h $(S)file.h
	$(CC) $(COPT)

$(G)laraflar.obj : $(G)laraflar.c $(O) $(LANIM) $(SAVE) $(INV) $(G)control.h $(G)sound.h $(G)effect2.h $(G)laraflar.h $(S)specific.h
	$(CC) $(COPT)

$(G)laramisc.obj : $(G)laramisc.c $(O) $(LANIM) $(FNC) $(SAVE) $(INV) $(SHDR) $(G)cinema.h $(G)larafunc.h $(G)laramisc.h $(G)laraswim.h $(G)larasurf.h $(G)title.h
	$(CC) $(COPT)

$(G)larasurf.obj : $(G)larasurf.c $(LANIM) $(G)camera.h $(G)control.h $(G)input.h $(G)laramisc.h $(G)laraswim.h
	$(CC) $(COPT)

$(G)laraswim.obj : $(G)laraswim.c $(LANIM) $(G)control.h  $(G)input.h $(G)laramisc.h $(G)laraswim.h
	$(CC) $(COPT)

$(G)lot.obj : $(G)lot.c $(O) $(LARA) $(G)camera.h $(G)gameflow.h $(G)lot.h
	$(CC) $(COPT)

$(G)missile.obj : $(G)missile.c $(O) $(LARA) $(G)control.h $(G)sound.h $(G)effect2.h $(G)traps.h $(G)flamer.h $(S)specific.h
	$(CC) $(COPT)
	@dmpsx $(G)missile.obj

$(G)moveblok.obj : $(G)moveblok.c $(LANIM) $(G)control.h $(G)input.h $(G)sound.h $(G)laramisc.h $(G)moveblok.h
	$(CC) $(COPT)

$(G)objects.obj : $(G)objects.c $(O) $(LANIM) $(FNC) $(SAVE) $(G)cinema.h $(G)sphere.h $(G)traps.h $(G)boat.h $(G)boatinfo.h $(G)lot.h
	$(CC) $(COPT)

$(G)people.obj : $(G)people.c $(O) $(LANIM) $(G)control.h $(G)sound.h $(G)sphere.h
	$(CC) $(COPT)

$(G)pickup.obj : $(G)pickup.c $(O) $(ANIM) $(INV) $(G)control.h $(G)input.h $(G)sound.h $(G)laramisc.h $(G)laraflar.h $(G)health.h
	$(CC) $(COPT)

$(G)savegame.obj : $(G)savegame.c $(O) $(LARA) $(SAVE) $(INV) $(G)camera.h $(G)control.h $(G)laramisc.h $(G)boat.h $(G)pickup.h $(G)moveblok.h $(G)skidoo.h $(G)traps.h $(G)lot.h $(G)title.h $(S)specific.h $(S)memcard.h $(G)minecart.h $(G)kayak.h $(S)cd.h
	$(CC) $(COPT)

$(G)setup.obj : $(G)setup.c $(GALL) $(S)typedefs.h $(S)file.h $(S)malloc.h $(S)specific.h $(S)cd.h
	$(CC) $(COPT)

$(G)sound.obj : $(G)sound.c $(G)sound.h $(G)room.h $(G)camera.h
	$(CC) $(COPT)

$(G)sphere.obj : $(G)sphere.c $(ANIM) $(G)sphere.h $(G)draw.h
	$(CC) $(COPT)
	@dmpsx $(G)sphere.obj

$(G)text.obj : $(G)text.c $(O) $(ANIM) $(G)camera.h $(G)inventry.h $(G)health.h $(G)text.h $(S)gen_draw.h
	$(CC) $(COPT)

$(G)traps.obj : $(G)traps.c $(O) $(LANIM) $(G)camera.h $(G)control.h $(G)sound.h $(G)effect2.h $(G)sphere.h $(G)traps.h
	$(CC) $(COPT)

$(G)objlight.obj : $(G)objlight.c $(ITEMS) $(CONTROL) $(SOUND) $(G)effect2.h $(G)objlight.h
	$(CC) $(COPT)

$(G)footprnt.obj : $(G)footprnt.c $(0) $(ITEMS) $(LARA) $(CONTROL) $(SOUND) $(G)effect2.h $(G)footprnt.h $(S)gpu.h
	$(CC) $(COPT)
	@dmpsx $(G)footprnt.obj

#############################################################################
#
#	Specific Assembler Files
#
#############################################################################

AHDRS =	$(S)draw.inc	&
	$(S)room.inc	&
	$(S)gte.inc	&
	$(S)gp.inc

#$(S)delasm.obj : $(S)delasm.mip $(AHDRS)
#	$(ASM) $(AOPT)

$(S)amaths.obj : $(S)maths.mip $(AHDRS)
	$(ASM) $(AOPT)

$(S)adraw.obj : $(S)adraw.mip $(AHDRS)
	$(ASM) $(AOPT)

$(S)drawrlet.obj : $(S)drawrlet.mip $(AHDRS)
	$(ASM) $(AOPT)

$(S)door.obj : $(S)door.mip $(AHDRS)
	$(ASM) $(AOPT)

$(S)ins_obj.obj : $(S)ins_obj.mip $(AHDRS)
	$(ASM) $(AOPT)

$(S)misc.obj : $(S)misc.mip $(AHDRS)
	$(ASM) $(AOPT)

$(S)atan.obj : $(S)atan.mip $(AHDRS)
	$(ASM) $(AOPT)

$(S)get.obj : $(S)get.mip $(AHDRS)
	$(ASM) $(AOPT)

$(S)drawsky.obj : $(S)drawsky.mip $(AHDRS)
	$(ASM) $(AOPT)

$(S)drawobj.obj : $(S)drawobj.mip $(AHDRS)
	$(ASM) $(AOPT)

#############################################################################
#
#	Specific Files
#
#############################################################################

PSXHDR=	$(S)typedefs.h	&
	$(S)gpu.h	&
	$(S)cd.h

SPECIFI=$(S)typedefs.h	&
	$(S)specific.h	&
	$(S)cd.h	&
	$(S)gpu.h	&
	$(S)file.h	&
	$(S)psxinput.h	&
	$(S)spusound.h	&
	$(S)3d_obj.h

ROOMLOA=$(ITEMS)	&
	$(S)typedefs.h	&
	$(S)types.h	&
	$(S)gpu.h	&
	$(S)cd.h	&
	$(S)malloc.h	&
	$(S)file.h	&
	$(S)picture.h	&
	$(S)specific.h	&
	$(S)spusound.h	&
	$(S)load_lev.h	&
	$(G)objects.h	&
	$(G)items.h	&
	$(G)room.h	&
	$(G)anim.h	&
	$(G)camera.h	&
	$(G)sound.h	&
	$(G)box.h	&
	$(G)demo.h	&
	$(G)cinema.h	&
	$(G)gameflow.h  &
	$(G)control.h   &
	$(G)setup.h     &
	$(G)footprnt.h

$(S)cd.obj : $(S)cd.c $(PSXHDR) $(S)memory.h $(S)load_lev.h $(S)specific.h
	$(CC) $(COPT)

$(S)gpu.obj : $(S)gpu.c $(PSXHDR) $(S)memory.h $(S)psxinput.h $(S)profile.h $(G)input.h $(G)text.h
	$(CC) $(COPT1)

$(S)file.obj : $(S)file.c $(S)typedefs.h $(S)cd.h $(S)load_lev.h $(S)file.h $(S)specific.h
	$(CC) -fno-builtin $(COPT)

$(S)malloc.obj : $(S)malloc.c $(S)typedefs.h $(S)malloc.h $(S)cd.h $(S)file.h $(G)title.h $(G)gameflow.h $(S)specific.h
	$(CC) $(COPT)

$(S)spusound.obj : $(S)spusound.c $(S)typedefs.h $(S)spusound.h
	$(CC) $(COPT)

$(S)specific.obj : $(S)specific.c $(SPECIFI) $(FHDR) $(SHDR) $(G)text.h
	$(CC) $(COPT)

$(S)roomload.obj : $(S)roomload.c $(O) $(CONTROL) $(ROOMLOA) $(G)setup.h $(G)footprnt.h
	$(CC) $(COPTD)

$(S)lite_src.obj : $(S)lite_src.c $(ITEMS) $(G)room.h  $(G)draw.h $(S)maths.h
	$(CC) $(COPT)
	@dmpsx $(S)lite_src.obj

$(S)psx_gen.obj : $(S)psx_gen.c $(HDRS)
	$(CC) $(COPT)

$(S)3d_gen.obj : $(S)3d_gen.c $(S)typedefs.h $(S)gpu.h $(S)3d_gen.h $(S)types.h $(S)maths.h
	$(CC) $(COPT)

$(S)3d_obj.obj : $(S)3d_obj.c $(S)typedefs.h $(S)types.h $(S)gpu.h $(S)memory.h $(S)3d_gen.h $(S)3d_obj.h
	$(CC) $(COPT)
	@dmpsx $(S)3d_obj.obj

$(S)c_math.obj : $(S)c_math.c $(HDRS)
	$(CC) $(COPT)

$(S)psxinput.obj : $(S)psxinput.c $(0) $(CONTROL) $(SAVE) $(G)input.h $(G)laramisc.h $(G)demo.h $(S)malloc.h $(S)pad.h $(S)types.h $(S)memory.h $(S)file.h $(S)specific.h
	$(CC) -fno-builtin $(COPT)

$(S)psxtitle.obj : $(S)psxtitle.c $(S)typedefs.h $(O) $(S)memcard.h $(S)cd.h
	$(CC) $(COPT)

$(S)profile.obj : $(S)profile.c $(S)typedefs.h $(S)gpu.h $(S)profile.h
	$(CC) $(COPT)

$(S)picture.obj : $(S)picture.c $(S)gpu.h
	$(CC) $(COPT)

$(S)memcard.obj : $(S)memcard.c $(S)typedefs.h $(S)gpu.h $(S)memcard.h $(S)specific.h
	$(CC) $(COPT)

$(S)game.obj : $(S)game.c $(S)typedefs.h $(S)memcard.h $(S)cd.h
	$(CC) $(COPT)

$(S)option.obj : $(S)option.c $(O) $(SAVE) $(S)gpu.h $(S)cd.h
	$(CC) $(COPT)

$(S)newshit.obj : $(S)newshit.c $(HDRS)
	$(CC) $(COPT1)

$(S)catan.obj : $(S)catan.c $(HDRS)
	$(CC) $(COPT)

$(S)drawfish.obj : $(S)drawfish.c $(O) $(s)specific.h $(HDRS)
	$(CC) $(COPT)
	dmpsx $(S)drawfish.obj

$(S)maths.obj : $(S)maths.c $(HDRS)
	$(CC) $(COPT1)

$(S)drawspks.obj : $(S)drawspks.c $(O) $(EFFECT) $(G)effect2.h
	$(CC) $(COPT)
	dmpsx $(S)drawspks.obj

$(S)gen_draw.obj : $(S)gen_draw.c $(O) $(S)typedefs.h $(S)types.h $(S)3d_gen.h $(S)gpu.h $(S)gen_draw.h $(G)inventry.h
	$(CC) $(COPT)

$(S)load_lev.obj : $(S)load_lev.c $(G)text.h $(PSXHDR) $(S)malloc.h $(S)file.h $(S)gen_draw.h $(S)picture.h $(S)specific.h $(S)profile.h
	$(CC) $(COPT)

$(S)psoutput.obj : $(S)psoutput.c $(S)typedefs.h $(S)cd.h $(S)file.h
	$(CC) $(COPT)

$(S)psx_init.obj : $(S)psx_init.c $(S)typedefs.h $(SAVE) $(S)cd.h $(S)gpu.h $(S)file.h $(S)memcard.h $(S)profile.h $(S)specific.h
	$(CC) $(COPT)

$(S)psxmain.obj : $(S)psxmain.c $(O) $(ITEMS) $(G)cinema.h $(S)cd.h $(S)file.h $(S)specific.h $(S)picture.h
	$(CC) $(COPT)

$(S)psxmisc.obj : $(S)psxmisc.c $(S)typedefs.h $(S)cd.h $(S)gpu.h
	$(CC) $(COPT)

#############################################################################
#
#	Relocatable Files
#
#############################################################################

ROBJ =  $(G)boat.obj		&
	$(G)cinema.obj		&
	$(G)rain.obj		&
	$(G)rat.obj		&
	$(G)orca.obj		&
	$(G)trex.obj		&
	$(G)bird.obj		&
	$(G)51laser.obj		&
	$(G)51rocket.obj	&
	$(G)firehead.obj	&
	$(G)blowpipe.obj	&
	$(G)compy.obj		&
	$(G)diver.obj		&
	$(G)dog.obj		&
	$(G)flamer.obj		&
	$(G)kayak.obj		&
	$(G)train.obj		&
	$(G)sub.obj		&
	$(G)biggun.obj		&
	$(G)laraelec.obj	&
	$(G)fusebox.obj		&
	$(G)lasers.obj		&
	$(G)lizman.obj		&
	$(G)quadbike.obj	&
	$(G)raptor.obj		&
	$(G)rapmaker.obj	&
	$(G)flymaker.obj	&
	$(G)shiva.obj		&
	$(G)snow.obj		&
	$(G)tribeaxe.obj 	&
	$(G)triboss.obj		&
	$(G)tonyboss.obj	&
	$(G)londboss.obj	&
	$(G)willboss.obj	&
	$(G)wingmute.obj	&
	$(G)minecart.obj	&
	$(G)punk.obj		&
	$(G)croc.obj		&
	$(G)londsec.obj		&
	$(G)clawmute.obj	&
	$(G)hybrid.obj		&
	$(G)sealmute.obj	&
	$(G)monkey.obj		&
	$(G)cobra.obj		&
	$(G)cleaner.obj		&
	$(G)tiger.obj		&
	$(G)winston.obj		&
	$(G)target.obj		&
	$(G)oilred.obj		&
	$(G)oilsmg.obj		&
	$(G)armysmg.obj		&
	$(G)51baton.obj		&
	$(G)51civvy.obj		&
	$(G)mpgun.obj		&
	$(G)prisoner.obj	&
	$(G)autogun.obj		&
	$(G)dragfire.obj	&
	$(G)swat.obj		&
	$(G)boomute.obj		&
	$(G)uwparts.obj		&
	$(S)fmv.obj

$(S)fmv.obj : $(S)movie.c $(S)typedefs.h $(S)specific.h $(S)gpu.h $(S)cd.h
	$(COPTR)

$(G)cinema.obj : $(G)cinema.c $(O) $(LARANIM) $(FNC) $(SAVE) $(G)inventry.h $(G)hair.h $(G)title.h $(G)laramisc.h $(G)setup.h $(G)cinema.h $(G)effect2.h $(S)specific.h $(S)cd.h
	$(COPTR)

$(G)uwparts.obj : $(G)uwparts.c $(O) $(ANIM) $(G)snow.h $(S)types.h $(S)maths.h
	$(COPTR)
	@dmpsx $(G)uwparts.obj

$(G)triboss.obj : $(G)triboss.c $(O) $(LARA) $(G)sound.h $(G)laraelec.h
	$(COPTR)
	@dmpsx $(G)triboss.obj

$(G)tonyboss.obj : $(G)tonyboss.c $(O) $(LARA) $(G)sound.h $(G)laraelec.h
	$(COPTR)
	@dmpsx $(G)tonyboss.obj

$(G)londboss.obj : $(G)londboss.c $(O) $(LARA) $(G)sound.h $(G)laraelec.h
	$(COPTR)
	@dmpsx $(G)londboss.obj

$(G)willboss.obj : $(G)willboss.c $(O) $(LARA) $(G)sound.h $(G)laraelec.h
	$(COPTR)
	@dmpsx $(G)willboss.obj

$(G)lizman.obj : $(G)lizman.c $(O) $(LARA) $(G)sound.h
	$(COPTR)

$(G)boat.obj : $(G)boat.c $(O) $(LARANIM) $(FNC) $(G)sphere.h $(G)boat.h $(G)boatinfo.h $(S)specific.h
	$(COPTR)
	@dmpsx $(G)boat.obj

$(G)kayak.obj : $(G)kayak.c $(G)kayak.h $(O) $(LANIM) $(CONTROL) $(INPUT) $(CAMERA) $(G)laraflar.h $(G)sphere.h $(G)effect2.h
	$(COPTR)
	@dmpsx $(G)kayak.obj

$(G)sub.obj : $(G)sub.c $(G)sub.h $(O) $(LANIM) $(CONTROL) $(INPUT) $(CAMERA) $(G)laraflar.h $(G)sphere.h $(G)effect2.h
	$(COPTR)
	@dmpsx $(G)sub.obj

$(G)biggun.obj : $(G)biggun.c $(G)biggun.h $(O) $(LANIM) $(CONTROL) $(INPUT) $(CAMERA) $(G)laraflar.h $(G)sphere.h $(G)effect2.h
	$(COPTR)

$(G)quadbike.obj : $(G)quadbike.c $(O) $(LANIM) $(G)control.h $(G)input.h $(G)sound.h $(G)sphere.h $(G)traps.h $(G)laraflar.h $(G)lot.h
	$(COPTR)

$(G)rain.obj : $(G)rain.c $(O) $(LARA) $(CONTROL) $(S)maths.h
	$(COPTR)
	@dmpsx $(G)rain.obj

$(G)flamer.obj : $(G)flamer.c $(O) $(LARA) $(G)control.h $(G)sound.h
	$(COPTR)

$(G)orca.obj : $(G)orca.c $(O) $(LANIM) $(G)control.h
	$(COPTR)

$(G)trex.obj : $(G)trex.c $(O) $(LANIM) $(CONTROL)
	$(COPTR)

$(G)rat.obj : $(G)rat.c $(O) $(LARA) $(G)control.h
	$(COPTR)

$(G)bird.obj : $(G)bird.c $(O) $(LARA)
	$(COPTR)

$(G)diver.obj : $(G)diver.c $(O) $(LARANIM) $(CONTROL)
	$(COPTR)

$(G)snow.obj : $(G)snow.c $(O) $(ANIM) $(G)snow.h $(S)types.h $(S)maths.h
	$(COPTR)
	@dmpsx $(G)snow.obj

$(G)lasers.obj : $(G)lasers.c $(O) $(LANIM) $(CONTROL)
	$(COPTR)
	@dmpsx $(G)lasers.obj

$(G)tribeaxe.obj : $(G)tribeaxe.c $(O) $(LARA) $(CONTROL) $(G)sound.h
	$(COPTR)

$(G)blowpipe.obj : $(G)blowpipe.c $(O) $(LARA) $(CONTROL) $(G)sound.h $(G)sphere.h
	$(COPTR)

$(G)raptor.obj : $(G)raptor.c $(O) $(LARANIM) $(CONTROL) $(G)text.h $(G)lot.h
	$(COPTR)

$(G)rapmaker.obj : $(G)rapmaker.c $(O) $(LARANIM) $(CONTROL)
	$(COPTR)

$(G)flymaker.obj : $(G)flymaker.c $(O) $(LARANIM) $(CONTROL)
	$(COPTR)

$(G)compy.obj : $(G)compy.c $(O) $(LARA) $(G)sound.h
	$(COPTR)

$(G)51rocket.obj : $(G)51rocket.c $(O) $(LANIM) $(CONTROL) $(CAMERA) $(G)effect2.h $(G)sphere.h $(G)traps.h
	$(COPTR)

$(G)armysmg.obj : $(G)armysmg.c $(O) $(LANIM) $(CONTROL) $(CAMERA) $(G)effect2.h $(G)sphere.h $(G)traps.h
	$(COPTR)

$(G)firehead.obj : $(G)firehead.c $(O) $(LANIM) $(CONTROL) $(CAMERA) $(G)effect2.h $(G)sphere.h $(G)traps.h
	$(COPTR)

$(G)shiva.obj : $(G)shiva.c $(O) $(LARANIM) $(CONTROL)
	$(COPTR)

$(G)dog.obj : $(G)dog.c $(O) $(LARANIM) $(CONTROL)
	$(COPTR)

$(G)51laser.obj : $(G)51laser.c $(O) $(LANIM) $(CONTROL) $(CAMERA)
	$(COPTR)

$(G)laraelec.obj : $(G)laraelec.c $(O) $(LANIM) $(CONTROL) $(CAMERA)
	$(COPTR)
	@dmpsx $(G)laraelec.obj

$(G)fusebox.obj : $(G)fusebox.c $(O) $(LANIM) $(CONTROL) $(CAMERA)
	$(COPTR)

$(G)minecart.obj : $(G)minecart.c $(LANIM) $(CONTROL) $(INPUT) $(G)laraflar.h $(G)sphere.h
	$(COPTR)

$(G)train.obj : $(G)train.c $(LANIM) $(CONTROL) $(INPUT) $(G)laraflar.h $(G)sphere.h
	$(COPTR)

$(G)punk.obj : $(G)punk.c $(O) $(LARA) $(SOUND) $(CONTROL) $(G)sphere.h $(G)traps.h $(G)people.h
	$(COPTR)

$(G)croc.obj : $(G)croc.c $(O) $(LARA) $(SOUND) $(CONTROL) $(G)sphere.h $(G)traps.h $(G)people.h
	$(COPTR)

$(G)londsec.obj : $(G)londsec.c $(O) $(LARA) $(G)control.h $(G)sound.h
	$(COPTR)

$(G)clawmute.obj : $(G)clawmute.c $(O) $(LARANIM) $(CONTROL)
	$(COPTR)

$(G)hybrid.obj : $(G)hybrid.c $(O) $(LARANIM) $(CONTROL)
	$(COPTR)

$(G)sealmute.obj : $(G)sealmute.c $(O) $(LARANIM) $(CONTROL)
	$(COPTR)

$(G)wingmute.obj : $(G)wingmute.c $(O) $(LARANIM) $(CONTROL)
	$(COPTR)

$(G)monkey.obj : $(G)monkey.c $(O) $(LARA) $(G)control.h
	$(COPTR)

$(G)cobra.obj : $(G)cobra.c $(O) $(LARA)
	$(COPTR)

$(G)cleaner.obj : $(G)cleaner.c $(O) $(LARA) $(G)sound.h
	$(COPTR)

$(G)tiger.obj : $(G)tiger.c $(O) $(LARANIM) $(CONTROL)
	$(COPTR)

$(G)winston.obj : $(G)winston.c $(O) $(LARANIM) $(CONTROL)
	$(COPTR)

$(G)target.obj : $(G)target.c $(O) $(LARANIM) $(CONTROL)
	$(COPTR)

$(G)oilred.obj : $(G)oilred.c $(O) $(LARA) $(G)control.h $(G)sound.h
	$(COPTR)

$(G)oilsmg.obj : $(G)oilsmg.c $(O) $(LARA) $(G)control.h $(G)sound.h
	$(COPTR)

$(G)51baton.obj : $(G)51baton.c $(O) $(LARA) $(G)control.h $(G)sound.h
	$(COPTR)

$(G)51civvy.obj : $(G)51civvy.c $(O) $(LARA) $(G)control.h $(G)sound.h
	$(COPTR)

$(G)mpgun.obj : $(G)mpgun.c $(O) $(LARA) $(G)control.h $(G)sound.h
	$(COPTR)

$(G)prisoner.obj : $(G)prisoner.c $(O) $(LARA) $(G)control.h $(G)sound.h
	$(COPTR)

$(G)autogun.obj : $(G)autogun.c $(O) $(LARA) $(G)control.h $(G)sound.h
	$(COPTR)

$(G)dragfire.obj : $(G)dragfire.c $(O) $(LARA) $(G)control.h $(G)sound.h
	$(COPTR)

$(G)swat.obj : $(G)swat.c $(O) $(LARA) $(G)control.h $(G)sound.h
	$(COPTR)

$(G)boomute.obj : $(G)boomute.c $(O) $(LARA) $(G)control.h $(G)sound.h
	$(COPTR)

reloc :	$(ROBJ) main.sym

!ifeq RELOC 1
	$(LINKR) /rmips=$(S)fmv.rel @$(S)fmv.lnk,$(S)fmv.bin
	@tom2fab /c+ ..\spec_psx\fmv data\fmv

	$(LINKR) /rmips=$(G)cinema.rel @$(G)cinema.lnk,$(G)cinema.bin

	$(LINKR) /rmips=$(G)boat.rel @$(G)boat.lnk,$(G)boat.bin

	$(LINKR) /rmips=$(G)trex.rel @$(G)trex.lnk,$(G)trex.bin

	$(LINKR) /rmips=$(G)orca.rel @$(G)orca.lnk,$(G)orca.bin

	$(LINKR) /rmips=$(G)rat.rel @$(G)rat.lnk,$(G)rat.bin

	$(LINKR) /rmips=$(G)bird.rel @$(G)bird.lnk,$(G)bird.bin

	$(LINKR) /rmips=$(G)diver.rel @$(G)diver.lnk,$(G)diver.bin

	$(LINKR) /rmips=$(G)quadbike.rel @$(G)quadbike.lnk,$(G)quadbike.bin

	$(LINKR) /rmips=$(G)lizman.rel @$(G)lizman.lnk,$(G)lizman.bin

	$(LINKR) /rmips=$(G)flamer.rel @$(G)flamer.lnk,$(G)flamer.bin

	$(LINKR) /rmips=$(G)kayak.rel /s @$(G)kayak.lnk,$(G)kayak.bin

	$(LINKR) /rmips=$(G)uwparts.rel @$(G)uwparts.lnk,$(G)uwparts.bin

	$(LINKR) /rmips=$(G)triboss.rel @$(G)triboss.lnk,$(G)triboss.bin

	$(LINKR) /rmips=$(G)tonyboss.rel @$(G)tonyboss.lnk,$(G)tonyboss.bin

	$(LINKR) /rmips=$(G)londboss.rel @$(G)londboss.lnk,$(G)londboss.bin

	$(LINKR) /rmips=$(G)willboss.rel @$(G)willboss.lnk,$(G)willboss.bin

	$(LINKR) /rmips=$(G)snow.rel @$(G)snow.lnk,$(G)snow.bin

	$(LINKR) /rmips=$(G)lasers.rel @$(G)lasers.lnk,$(G)lasers.bin

	$(LINKR) /rmips=$(G)tribeaxe.rel @$(G)tribeaxe.lnk,$(G)tribeaxe.bin

	$(LINKR) /rmips=$(G)blowpipe.rel @$(G)blowpipe.lnk,$(G)blowpipe.bin

	$(LINKR) /rmips=$(G)raptor.rel @$(G)raptor.lnk,$(G)raptor.bin

	$(LINKR) /rmips=$(G)rapmaker.rel @$(G)rapmaker.lnk,$(G)rapmaker.bin

	$(LINKR) /rmips=$(G)flymaker.rel @$(G)flymaker.lnk,$(G)flymaker.bin

	$(LINKR) /rmips=$(G)compy.rel @$(G)compy.lnk,$(G)compy.bin

	$(LINKR) /rmips=$(G)51rocket.rel @$(G)51rocket.lnk,$(G)51rocket.bin

	$(LINKR) /rmips=$(G)shiva.rel @$(G)shiva.lnk,$(G)shiva.bin

	$(LINKR) /rmips=$(G)dog.rel @$(G)dog.lnk,$(G)dog.bin

	$(LINKR) /rmips=$(G)51laser.rel @$(G)51laser.lnk,$(G)51laser.bin

	$(LINKR) /rmips=$(G)laraelec.rel @$(G)laraelec.lnk,$(G)laraelec.bin

	$(LINKR) /rmips=$(G)fusebox.rel @$(G)fusebox.lnk,$(G)fusebox.bin

	$(LINKR) /rmips=$(G)londsec.rel @$(G)londsec.lnk,$(G)londsec.bin

	$(LINKR) /rmips=$(G)minecart.rel @$(G)minecart.lnk,$(G)minecart.bin

	$(LINKR) /rmips=$(G)train.rel @$(G)train.lnk,$(G)train.bin

	$(LINKR) /rmips=$(G)punk.rel @$(G)punk.lnk,$(G)punk.bin

	$(LINKR) /rmips=$(G)croc.rel @$(G)croc.lnk,$(G)croc.bin

	$(LINKR) /rmips=$(G)cobra.rel @$(G)cobra.lnk,$(G)cobra.bin

	$(LINKR) /rmips=$(G)cleaner.rel @$(G)cleaner.lnk,$(G)cleaner.bin

	$(LINKR) /rmips=$(G)tiger.rel @$(G)tiger.lnk,$(G)tiger.bin

	$(LINKR) /rmips=$(G)winston.rel @$(G)winston.lnk,$(G)winston.bin

	$(LINKR) /rmips=$(G)target.rel @$(G)target.lnk,$(G)target.bin

	$(LINKR) /rmips=$(G)monkey.rel @$(G)monkey.lnk,$(G)monkey.bin

	$(LINKR) /rmips=$(G)oilred.rel @$(G)oilred.lnk,$(G)oilred.bin

	$(LINKR) /rmips=$(G)oilsmg.rel @$(G)oilsmg.lnk,$(G)oilsmg.bin

	$(LINKR) /rmips=$(G)armysmg.rel @$(G)armysmg.lnk,$(G)armysmg.bin

	$(LINKR) /rmips=$(G)51baton.rel @$(G)51baton.lnk,$(G)51baton.bin

	$(LINKR) /rmips=$(G)51civvy.rel @$(G)51civvy.lnk,$(G)51civvy.bin

	$(LINKR) /rmips=$(G)mpgun.rel @$(G)mpgun.lnk,$(G)mpgun.bin

	$(LINKR) /rmips=$(G)prisoner.rel @$(G)prisoner.lnk,$(G)prisoner.bin

	$(LINKR) /rmips=$(G)autogun.rel @$(G)autogun.lnk,$(G)autogun.bin

	$(LINKR) /rmips=$(G)dragfire.rel @$(G)dragfire.lnk,$(G)dragfire.bin

	$(LINKR) /rmips=$(G)swat.rel @$(G)swat.lnk,$(G)swat.bin

	$(LINKR) /rmips=$(G)boomute.rel @$(G)boomute.lnk,$(G)boomute.bin

	$(LINKR) /rmips=$(G)clawmute.rel @$(G)clawmute.lnk,$(G)clawmute.bin

	$(LINKR) /rmips=$(G)hybrid.rel @$(G)hybrid.lnk,$(G)hybrid.bin

	$(LINKR) /rmips=$(G)sealmute.rel @$(G)sealmute.lnk,$(G)sealmute.bin

	$(LINKR) /rmips=$(G)wingmute.rel @$(G)wingmute.lnk,$(G)wingmute.bin

	$(LINKR) /rmips=$(G)firehead.rel @$(G)firehead.lnk,$(G)firehead.bin

	$(LINKR) /rmips=$(G)rain.rel @$(G)rain.lnk,$(G)rain.bin

	$(LINKR) /rmips=$(G)sub.rel @$(G)sub.lnk,$(G)sub.bin

	$(LINKR) /rmips=$(G)biggun.rel @$(G)biggun.lnk,$(G)biggun.bin
!endif
	@%create reloc

