Makefile.dos
1.18 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
# command names #
LIB = $(ROOT)/usr/lib
LPR = $(LIB)/PR
INC = $(ROOT)/usr/include
RM = del
CC = gcc
LD = ld
MAKEROM = mild
# compile C files to object files #
.c.o:
$(CC) $(DEFINES) -O0 -g -G 0 -c -I. -I$(INC) -I$(INC)/PR -D_MIPS_SZLONG=32 -D_MIPS_SZINT=32 $<
# addition files used by make #
FILE_MAKEROM = Makefile.makerom
FILE_DEPENDS = Makefile.depend
# files to be made..
CODESEGMENT = test_wave.o
APP = nnsched.out
TARGETS = nnsched.n64
CODEFILES = test_main.c test_music.c nnsched.c
CODEOBJECTS = $(CODEFILES:.c=.o)
DATAFILES = test_workspace.c
DATAOBJECTS = $(DATAFILES:.c=.o)
OBJECTS = $(CODESEGMENT) $(DETAOBJECTS)
# default settings for compilation and linking #
LDFLAGS = $(MKDEPOPT) -L$(LIB) -lgmus_d -lgultra_d -L$(GCCDIR)/mipse/lib -lkmc
DEFINES = -D_DEBUG
default: $(TARGETS)
include $(FILE_DEPENDS)
$(CODESEGMENT): $(CODEOBJECTS) Makefile.dos
@echo "Linking code files"
$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) $(LDFLAGS)
# generate stand alone test rom #
$(TARGETS): $(FILE_MAKEROM) $(CODESEGMENT) $(DATAOBJECTS)
@echo "Making rom"
$(MAKEROM) $(FILE_MAKEROM) -r $(TARGETS) -e $(APP)
# remove generated output files #
remove:
$(RM) *.o
$(RM) $(APP)
$(RM) $(TARGETS)