Makefile
1.38 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
55
56
57
#!smake
#
# Makefile for leowrite
#
PRDEPTH=$(ROOT)/PR
include $(PRDEPTH)/PRdefs
OPTIMIZER = -g
TARGETS = game leowrite
HFILES = hostio.h
BOOTFILES = game.c readdiskid.c createleomanager.c
BOOTOBJECTS = $(BOOTFILES:.c=.o)
DATAFILES = rdrambuffer.c controlblock.c transbyte.c
DATAOBJECTS = $(DATAFILES:.c=.o)
BOOTSEGMENT = boot.o
OBJECTS = $(BOOTSEGMENT)
LCDEFS += -DDEBUG
LCINCS = -I. -I$(ROOT)/usr/include/PR -I$(ROOT)/usr/include \
-I$(ROOT)/PR/libultra/include -I$(ROOT)/PR/libleo/org/include
#LCOPTS = -fullwarn -wlint,-f -woff 813,819,826,827,852 -non_shared -G 0
LCOPTS = -fullwarn -woff 813,819,826,827,852 -non_shared -G 0
LDFLAGS = $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -lddwrite -lultra_d
LDIRT = leowrrom
leowrite: leowrite.c
$(CC) -o leowrite $(LCDEFS) \
-fullwarn -wlint,-f -woff 813,819,826,827,852 \
-nostdinc -I$(ROOT)/usr/include \
-I$(ROOT)/usr/include/PR $(MKDEPOPT) \
leowrite.c -nostdlib -L -L$(ROOT)/usr/lib -lultrahost
default: $(TARGETS)
include $(PRDEPTH)/PRrules
install exports: default
$(INSTALL) -m 755 -F /usr/sbin leowrite
$(INSTALL) -m 644 -F /usr/lib/PR leowrrom
$(BOOTSEGMENT): $(BOOTOBJECTS) $(DATAOBJECTS)
$(LD) -o $(BOOTSEGMENT) -r $(BOOTOBJECTS) $(DATAOBJECTS) $(LDFLAGS)
game: spec $(OBJECTS) $(MAKEROM)
$(MAKEROM) -r leowrrom spec