#=======================================================================#
#		NIFFprev						#
#		Makefile.win						#
#									#
#		Copyright (C) 1997, NINTENDO Co,Ltd.			#
#									#
#-----------------------------------------------------------------------# 
#

# The directory which has include files and library of NuSYSTEM
#
N64KITDIR    = c:\nintendo\n64kit
NUSYSINCDIR  = $(N64KITDIR)\nusys\include
NUSYSLIBDIR  = $(N64KITDIR)\nusys\lib

N64GCC_PATH =	$(ROOT)\gcc\mipse
N64GCC_BIN =	$(N64GCC_PATH)\bin
N64GCC_INC =	$(ROOT)\usr\include
USR_INC    =	.\include
COM_INC    =	..\include
CC =		$(N64GCC_BIN)\gcc
AS =		$(N64GCC_BIN)\as
LD =		$(N64GCC_BIN)\ld
AR =		$(N64GCC_BIN)\ar
MAKEROM =	mild

APP =		nuprev.out
GBI =		-DF3DEX_GBI_2

.c.o:
		$(CC) -g -G 0 -c $(CC_INC) $(CC_DEF) $<

CC_INC =	-I. -I$(N64GCC_INC)\pr -I$(N64GCC_INC) -I$(NUSYSINCDIR) -I$(USR_INC) -I$(COM_INC)
CC_DEF =	$(GBI) -D_WIN32 -D_LANGUAGE_C -D_MIPS_SZLONG=32 -D_MIPS_SZINT=32

OPTIMIZER =	-g

TARGETS =	libresbg.a

#CODEFILES   =	_map_group.c
CODEFILES   =	_aa_group.c \
		_bb_group.c \
		_cc_group.c \
		_dd_group.c \
		_ee_group.c

DATAOBJECTS =	$(CODEFILES:.c=.o)
# CODEOBJECTS =	$(DATAOBJECTS) $(NUSYSLIBDIR)\nusys.o

OBJECTS =	$(DATAOBJECTS)

# LDFLAGS =	$(MKDEPOPT) -L$(ROOT)/usr/lib -L$(NUSYSLIBDIR) -lnusys_d -lgultra_# d -L$(GCCDIR)/mipse/lib -lkmc
DEPENDFILE =    dependfile

# default:	$(TARGETS)

$(TARGETS) :	$(DATAOBJECTS)
	$(AR) -cr $(TARGETS) $(OBJECTS)

map_group.o : map_group.h _map_group.h _map_group.c
_aa_group.o : _aa_group.h aa_group.c
_bb_group.o : _bb_group.h bb_group.c
_cc_group.o : _cc_group.h cc_group.c
_dd_group.o : _dd_group.h dd_group.c
_ee_group.o : _ee_group.h ee_group.c

depend:
	makedepnd -f$(DEPENDFILE) *.c

clean:
	del *.o
	del *.a

install:
	copy $(TARGETS) ..\lib

# DO NOT DELETE
