GNUmakefile 1.21 KB
#
# DRIVER ... libgultra_rom 
# DEBUG	.... libgultra_d
#

LIB = $(ROOT)/usr/lib
LPR = $(LIB)/PR
INC = $(ROOT)/usr/include
CC  = gcc
LD  = ld
MAKEROM = mild

.c.o:
#	$(CC) -g -G 0 -c -I$(INC) -I$(INC)/PR -I$(ROOT)/PR/libultra/os -I$(GCCDIR)/mipse/include -D_LANGUAGE_C -D_MIPS_SZLONG=32 -D_MIPS_SZINT=32 -D_FINALROM -D_DEBUG $<
	$(CC) -g -G 0 -c -I. -I$(INC)/PR -I$(INC) -I$(ROOT)/PR/include -D_MIPS_SZLONG=32 -D_MIPS_SZINT=32 $<
#	$(CC) -G 0 -c -I$(INC) -I$(INC)/PR -I$(ROOT)/PR/libultra/os -I$(GCCDIR)/mipse/include -D_LANGUAGE_C -D_MIPS_SZLONG=32 -D_MIPS_SZINT=32 -D_DEBUG $<


TARGETS =       game

HFILES =        hostio.h

BOOTFILES   =   game.c

BOOTOBJECTS =   $(BOOTFILES:.c=.o)

DATAFILES =     rdrambuffer.c controlblock.c transbyte.c

DATAOBJECTS =   $(DATAFILES:.c=.o)

BOOTSEGMENT =   boot.o

OBJECTS =       $(BOOTSEGMENT)

#LDFLAGS = $(MKDEPOPT) -L$(LIB) -lleo_sp -lgultra_d -L$(GCCDIR)/mipse/lib -lkmc
LDFLAGS = $(MKDEPOPT) -L$(LIB) -lleo_sp -lgultra_rom -L$(GCCDIR)/mipse/lib -lkmc

default: $(TARGETS)

$(BOOTSEGMENT): $(BOOTOBJECTS) $(DATAOBJECTS)
		$(LD) -o $(BOOTSEGMENT) -r $(BOOTOBJECTS) -r $(DATAOBJECTS) $(LDFLAGS)

$(TARGETS):	$(OBJECTS)
		$(MAKEROM) -r game.n64 spec