GNUmakefile 832 Bytes
#!smake
#
# Makefile for tool to convert between lba and byte 
#

PRDEPTH = ../..
include $(PRDEPTH)/PRdefs
CC=$(HOST_CC)
GCINCS=
GLDOPTS=

OPTIMIZER = -g

TARGETS= byte2lba lba2byte
TARGETOBJECTS = convert.o table.o

CFILES = byte2lba.c table.c

LCINCS = -I. -I$(PRDEPTH)/include
LCOPTS = -Wall

LDIRT=		byte2lba lba2byte maketbl table.c

default: $(TARGETS) $(TARGETOBJECTS)

include $(COMMONRULES)

table.c:	maketbl
		./maketbl >table.c

maketbl:        maketbl.c
		$(HOST_CCF) maketbl.c $(LDFLAGS) -o $@

byte2lba:	$(OBJECTS)
		$(HOST_CCF) $(OBJECTS) $(LDFLAGS) -o $@

lba2byte:	$(OBJECTS)
		$(HOST_CCF) $(OBJECTS) $(LDFLAGS) -o $@

convert.o:	byte2lba.c
		$(CCF) -c byte2lba.c $(LDFLAGS) -DOBJECTONLY -o $@

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