Makefile 1.38 KB
#!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

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