Makefile
790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!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)