Makefile 3.31 KB

include $(ROOT)/PR/PRdefs
include $(COMMONRULES)

CPPC = $(TOOLROOT)/usr/bin/CC

# Audioeditor files
AEFILES =  	main.c++\
		MidiMain.c++\
		AeMain.c++\
		AeAssetWindow.c++\
		AeBankWindow.c++\
		AeBinView.c++\
		AeListUI.c++\
		AeTabPanelUI.c++\
		AePopupUI.c++\
		AeClient.c++\
		AeEditor.c++\
		AePlayer.c++\
		AeBinEditor.c++\
		AeBinEditorNotify.c++\
		AeBinEditorEdit.c++\
		AeAssetEditor.c++\
		AeBankEditor.c++\
		AeAssetBinUI.c++\
		AeAssetUI.c++\
		AeFieldUI.c++\
		AeStringFieldUI.c++\
		AeIntFieldUI.c++\
		AeFloatFieldUI.c++\
		AeRefFieldUI.c++\
		AeContainerFieldUI.c++\
		AeKeyFieldUI.c++\
		AeDelayFieldUI.c++\
		AeTypeFieldUI.c++\
		AeIconFieldUI.c++\
		AeAssetBase.c++\
		AeAssetBin.c++\
		AeAsset.c++\
		AeBankAsset.c++\
		AeInstAsset.c++\
		AeSoundAsset.c++\
		AeEnvAsset.c++\
		AeKeymapAsset.c++\
		AeWaveAsset.c++\
		AeLoopAsset.c++\
		AeBookAsset.c++\
		AeFxAsset.c++\
		AeFxSxnAsset.c++\
		AeFile.c++\
		AeAssetFile.c++\
		AeBankFile.c++\
		AeWaveFile.c++\
		AeInstFile.c++\
		AeInstList.c++\
		AeInstHash.c++\
		AeConfig.c++\
		AeN64Driver.c++\
		AeN64DriverMenu.c++\
		AeN64DriverNotify.c++\
		AeN64DriverFx.c++\
		AeN64DriverConfig.c++\
		AeN64Config.c++\
		AeN64ConfigFile.c++\
		GioMgr.c++\
		AeUtils.c++\
		AeUnitTest.c++\
		AeErr.c++\
		GList.c++\
		List.c++\
		Hash.c++\
		ieeexdbl.c \
		unimplemented.c++\
		$(NULL)


# ViewKit args
HELPLIB= -lvkhelp
VIEWKITFLAGS= -I$(ROOT)/usr/include/Vk
TOOLTALKLIBS=
EZLIB = -lvkEZ
VIEWKITLIBS= $(TOOLTALKLIBS) $(EZLIB) -lvk $(HELPLIB) -lSgm -lXpm

XLIBS = -lXm -lXt -lXmu -lX11 -laudiofile -lmd
AELIBS = -L -L$(ROOT)/usr/lib  -lultrahost		# -lmalloc_cv
AEINCS = -I$(ROOT)/usr/include -I$(ROOT)/usr/include/PR -I$(ROOT)/PR/libultra/include

NOWARN = -woff 3262
MAKED = -MDupdate Makedepend 
TARGETS = ie

LC++FLAGS = -g $(AEINCS) $(NOWARN) $(MAKED)

YACCOBJ = AeInstFile.y.o AeInstFile.l.o 
ROMOBJ = rom.o


#
# lex and yacc files
#
NOWARN_YACC = -woff 3203,3262,3255
YFLAGS = -vdl

AeInstFile.y.o: AeInstFile.y y.tab.h y.tab.c
	$(CPPC) -c -g -o $@ $(AEINCS) $(NOWARN_YACC) y.tab.c -o AeInstFile.y.o

AeInstFile.l.o: AeInstFile.l y.tab.h
	lex AeInstFile.l
	$(CPPC) -c -g -o $@ $(AEINCS) $(NOWARN_YACC) lex.yy.c -o AeInstFile.l.o

y.tab.h y.tab.c: AeInstFile.y
	rm -f y.tab.h y.output
	$(YACCF) AeInstFile.y

AeInstFile.c++: y.tab.h
y.tab.c:	y.tab.h


#
# Ae files
#
default: $(YACCOBJ) $(TARGETS)

APPOBJECTS = $(AEFILES:.c++=.o)

$(TARGETS): $(YACCOBJ) $(APPOBJECTS) $(ROMOBJ) 
	$(CPPC) -g -o $@ $(YACCOBJ) $(APPOBJECTS) $(ROMOBJ) $(VIEWKITLIBS) $(AELIBS) $(XLIBS)\
	 -lgen -lm -lfileicon libXbae.a

exports install: default
	$(INSTALL) -m 555 -F /usr/sbin $(TARGETS)
	$(INSTALL) -m 666 -F /usr/src/PR/assets/banks ie.cnfg

#
# n64 files
#
N64FILES =	n64main.c \
		audio.c \
		sched.c \
		gfx.c \
		gfxcfb.c \
		gfxyield.c \
		gfxinit.c \
		gfxstack.c 



N64OBJECTS =	$(N64FILES:.c=.o)
CODESEGMENT =	codesegment.o
LCINCS =	-I. -I$(ROOT)/usr/include/PR -I$(ROOT)/PR/libultra/include
LCOPTS =	-fullwarn -non_shared -G 0
LDFLAGS =	-nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR -lultra_d
AUDIOLIBS =     $(ROOT)/PR/libultra/libultra/libultra.a


$(CODESEGMENT):	$(N64OBJECTS) $(AUDIOLIBS) 
		$(LD) -m -o $(CODESEGMENT) -r $(N64OBJECTS) $(LDFLAGS) > load.map

rom:		spec $(CODESEGMENT)
		$(MAKEROM) spec

rom.c: rom romcvt
	romcvt 

romcvt: romcvt.c
	$(CC) romcvt.c -o romcvt

rom.o: rom.c
	$(CC) -c -o rom.o rom.c