Makefile 2.61 KB
# Makefile for midiDmon and midiApp


include $(ROOT)/usr/include/make/PRdefs

SEQFILES = Silence.mid
SEQBANK = Silence.sbk

SEQBNKF = $(SEQFILES:.mid=.seq)

.SUFFIXES: .inst .ctl .tbl .mid .seq .sbk

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

.inst.ctl: $(AIFFFILES)
	$(IC) -o $* $<

.inst.tbl:	# Dummy target for tables
	@echo ''

$(SEQBANK): $(SEQBNKF)
	$(SBC) -o $(SEQBANK) $(SEQBNKF)


TARGETS =	rom midiDmon

OPTIMIZER =	-g

HFILES =	midiApp.h midiDmon.h midiGlobals.h

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

DMONOBJECTS =	midiDmon.o\
                symbol.o\
                sysex.o\
                utilrout.o\
                create.o\
                rom.o\
                loadrom.o\
                wavefile.o\
                hash.o\
                syscomm.o\
                giocomm.o\
                save.o



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

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

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

default:	$(TARGETS) Makefile

include $(COMMONRULES)

exports:

install:	default
		$(INSTALL) -F /usr/sbin midiDmon

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

rom :	$(SEQBANK) $(BANKFILES) spec $(CODESEGMENT) $(MAKEROM)
		$(MAKEROM) -r rom spec

rom.c: rom romcvt
	romcvt 

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

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


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

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

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

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

create.o:	create.c $(HFILES)
	$(CC) create.c -c -woff 709 $(DMONINCS) $(DMONOPTS) -o $@

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

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

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

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

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

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

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