GNUmakefile
1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#
# 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