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

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

OPTIMIZER = -g

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

CFILES = byte2lba.c table.c

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

LDIRT=		byte2lba lba2byte maketbl table.c

default: $(TARGETS) $(TARGETOBJECTS)

include $(COMMONRULES)

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

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

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

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