# Note:
# This Makefile is for CC compiler in UNIX
# You have to change this for PC environment. Sorry.
#
# 'makefile.mak' is a sample Makefile in PC environment.
# It must help you to convert this Makefile
#
LIBDIR   = ../../../lib
INCDIR   = ../../../include
MAKE	 = make
TADDR	 = 80100000	
CC       = cc -EL -G 0 -O
# CC       = gcc -EL -G 0 -O
CFLAGS   = -I$(INCDIR)
RM       = rm -f
RM_CMD   = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
DEPEND   = makedepend
LIBS     = -L$(LIBDIR) -lspu -lcd -lgpu -lgte -letc -lc -lapi

OBJS     = main.o
all::	main
main : $(OBJS)
	ld -EL -N -T $(TADDR) -e main -o main $(OBJS) $(LIBS)

clean::
	$(RM) main
	$(RM_CMD) "#"*

depend::
	$(DEPEND) $(DEPENDFLAGS) -s "# DO NOT DELETE" -- $(CFLAGS) -- *.c


clear::
	$(RM) *~

load:
	psx smon
	sleep 1
	aload main
	squit

start:
	psx ""
	make load
	psx "sr sp 801ffff0"
	psx "call"

# -------------------------------------------------------------------------
# dependencies generated by makedepend

# DO NOT DELETE

main.o: ../../../include/sys/types.h ../../../include/stdio.h
main.o: ../../../include/libetc.h ../../../include/libgte.h
main.o: ../../../include/libgpu.h ../../../include/libspu.h
main.o: ../../../include/libcd.h
