# PSX2LIB 1.0b
# 
# PSX2 OpenSource Project
# (C)2001, Gustavo Scotti (gustavo@scotti.com)
#
# Makefile Structure based on KOS Makefiles by Dan Potter

TARGET = hello.irx
OBJS = hello.o

all: clean $(TARGET)

clean:
	-rm -f $(TARGET) $(OBJS)
	
$(TARGET): $(OBJS)
	$(PSX2LIB_LD) -dc -r $(OBJS) -L$(PSX2LIB_BASE)/$(PSX2LIB_ARCH)/lib \
	-lkernel -m elf32elmip -o temporary.elf
	$(PSX2LIB_BASE)/$(PSX2LIB_ARCH)/utils/elf2irx/elf2irx temporary.elf $(TARGET)
	-rm temporary.elf

dist:
	rm -f $(OBJS)
	$(PSX2LIB_STRIP) $(TARGET)
	
include ${PSX2LIB_BASE}/Makefile.rules

