Makefile 931 Bytes
#!smake
#
# Makefile for tool to create packed ROM image
#

PRDEPTH = ../..
include $(PRDEPTH)/PRdefs

#ifndef REMOTEHOST
REMOTEHOST = clef
#endif
LOCAL = /hosts/$(HOST)/`pwd`

OPTIMIZER = -g

TARGETS=makedisk

CFILES = makedisk.c elspec.c segment.c coff.c
YFILES = specgram.y
LFILES = speclex.l

LCINCS = -I. -I/usr/include -I$(PRDEPTH)/../usr/include -I$(PRDEPTH)/../usr/include/PR
LCOPTS = -fullwarn -Xcpluscomm
LLDLIBS= -lelf -ll -lmld

LDIRT=makedisk

YFLAGS=-d

default:
	rsh $(REMOTEHOST) cd $(LOCAL) ";" $(MAKE) $(TARGETS)

include $(COMMONRULES)

makedisk: $(OBJECTS)
	$(CCF) $(ROOT)/usr/lib/PR/convert.o $(ROOT)/usr/lib/PR/table.o $(OBJECTS) -L/usr/lib $(LDFLAGS) -o $@ 

speclex.o: ./y.tab.h

specgram.o: specgram.y
	$(YACC) $(YFLAGS) $*.y
	$(CC) $(YACCMKDEPFLAGS) $(CFLAGS) -c y.tab.c
	-rm -f y.tab.c
	mv -f y.tab.o specgram.o

./y.tab.h: specgram.o

exports install: default
	$(INSTALL) -m 555 -F /usr/sbin $(TARGETS)