Makefile
1.16 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
46
47
48
49
50
51
52
53
54
#
# Makeifle
#
include $(ROOT)/usr/include/make/PRdefs
N64KITDIR = C:\nintendo\n64kit
NUSYSDIR = $(N64KITDIR)\nusys
NUSYSINCDIR = $(NUSYSDIR)\include
NUSYSLIBDIR = $(NUSYSDIR)\lib
LIB = $(ROOT)/usr/lib
LPR = $(LIB)/PR
INC = $(ROOT)/usr/include
CC = gcc
LD = ld
MAKEROM = mild
RM = del
LCDEFS =
LCINCS = -I. -I$(ROOT)/usr/include/PR
LCOPTS = -G 0
LDFLAGS = $(MKDEPOPT) -L../lib -lchk_stl -L$(LIB) -L$(NUSYSLIBDIR) -lnusys_d -lgultra_d -L$(GCCDIR)/mipse/lib -lkmc
OPTIMIZER = -O3
TARGETS = $(BINARYFILE:.bin=.n64)
APP = $(BINARYFILE:.bin=.out)
HFILES = params.h
CODEFILES = params.c
CODEOBJECTS = $(BINARYFILE) $(CODEFILES:.c=.o) $(NUSYSLIBDIR)/nusys.o
CODESEGMENT = $(BINARYFILE:.bin=.o)
default: all
#include $(COMMONRULES)
all:
$(MAKE) checksfx1.n64 BINARYFILE=checksfx1.bin
$(MAKE) checksfx2.n64 BINARYFILE=checksfx2.bin
$(CODESEGMENT): $(CODEOBJECTS) Makefile
$(LD) -u mainproc -o $(CODESEGMENT) -r $(CODEOBJECTS) $(LDFLAGS)
$(TARGETS): $(CODESEGMENT) spec
$(MAKEROM) spec -I$(NUSYSINCDIR) -r $(TARGETS) -e $(APP) -DCODESEGMENT=$(CODESEGMENT) -DAPPNAME=$(APP)
clean:
$(RM) *.o
$(RM) *.out
$(RM) *.n64
# depends
params.o: params.c params.h Makefile