Makefile.dos.n
1.23 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
# command names #
LIB = $(ROOT)/usr/lib
LPR = $(LIB)/PR
INC = $(ROOT)/usr/include
RM = del
CC = gcc
LD = ld
MAKEDISK = 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_MAKEDISK = Makefile.makedisk.n
FILE_DEPENDS = Makefile.depend
# files to be made..
CODESEGMENT = n_test_wave.o
APP = n64dd.out
TARGETS = n64dd.n64
CODEFILES = test_main.c test_music.c test_mem.c test_n64dd.c
CODEOBJECTS = $(CODEFILES:.c=.o)
OBJECTS = $(CODESEGMENT)
# default settings for compilation and linking #
LDFLAGS = $(MKDEPOPT) -L$(LIB) -ln_gmus_d -ln_gaudio_sc -lleo_d -lgultra_d -L$(GCCDIR)/mipse/lib -lkmc
DEFINES = -D_DEBUG -DDISK
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_MAKEDISK) $(CODESEGMENT) $(DATAOBJECTS)
@echo "Making disk file 'gwrite'"
$(MAKEDISK) -DD64 -t0 -r $(TARGETS) -e $(APP) $(FILE_MAKEDISK) > test_rom.map
# remove generated output files #
remove:
$(RM) *.o
$(RM) $(APP)
$(RM) $(TARGETS)
$(RM) test_rom.map
$(RM) gwrite