GNUmakefile 1.07 KB
#!smake
#
# Makefile for tool to create packed ROM image
#

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

#ifndef REMOTEHOST
REMOTEHOST = clef
#endif
LOCAL = /hosts/$(HOST)/`pwd`
CC=$(HOST_CC)
GCINCS=-I$(ROOT)/host_include/coff -I$(ROOT)/host_include
GLDOPTS=

OPTIMIZER = -g

TARGETS=makerom

CFILES = makerom.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
LCINCS = -I$(ROOT)/host_include/PR
#LCOPTS = -fullwarn -Xcpluscomm
LCOPTS =-Wall -D_LANGUAGE_C
#LLDLIBS= -lelf -ll -lmld
LLDLIBS= -lelf -ll

LDIRT=makerom

#YFLAGS=-d
YFLAGS=-d -p yy
YACCMKDEPFLAGS=
LEX=lex

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

include $(COMMONRULES)

makerom: $(OBJECTS)
	$(CCF) $(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)