Makefile 1.3 KB
# Makefile for midiDmon and midiApp



include $(WORKAREA)/PR/PRdefs

#
#    Build the sequence bank with the silent sequence
#

MIDIFILES = Silence.mid
SEQFILES = $(MIDIFILES:.mid=.seq)

.SUFFIXES: .mid .seq .sbk

.mid.seq:
	$(MIDICVT) -s $< $*.seq

MIDIBANKS = Silence.sbk

$(MIDIBANKS): $(SEQFILES)
	$(SBC) -o Silence.sbk $(SEQFILES)

#
#    Build the targets
#

TARGETS =	rom midiDmon

APP =		midiApp

OPTIMIZER =	-g

HFILES =	midiApp.h

CODEFILES =	midiApp.c 
CODEOBJECTS =	$(CODEFILES:.c=.o)
CODESEGMENT =	codesegment.o

DMONFILES =	midiDmon.c
DMONOBJECTS =   midiDmon.o


DMONINCS =      -I. -I$(ROOT)/usr/include/PR -I$(ROOT)/usr/include -I$(ROOT)/usr/include/sys
DMONOPTS =      -fullwarn 


MIDILIBS =      -lmd
DMONFLAGS =	-nostdlib -L$(ROOT)/usr/lib -L. 

LCINCS =	-I. -I$(ROOT)/usr/include/PR 
LCOPTS =	-fullwarn -non_shared -G 0
LDIRT  =	$(APP) *~ *.seq *.sbk
LDFLAGS =	-nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR -lultra 

default:	$(TARGETS)

include $(COMMONRULES)


$(CODESEGMENT):	$(CODEOBJECTS)
		$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) $(LDFLAGS)

rom $(APP):	$(MIDIBANKS) spec $(CODESEGMENT) $(MAKEROM)
		$(MAKEROM) -r rom spec


midiDmon:	 $(DMONOBJECTS)
	$(CC) $(DMONOBJECTS) $(DMONFLAGS) $(MIDILIBS) -o $@


midiDmon.o:	 midiDmon.c $(HFILES)
	$(CC) midiDmon.c -c $(DMONINCS) $(DMONOPTS) -o $@