aboutsummaryrefslogtreecommitdiffstats
path: root/ptx/Makefile.mk
blob: 50ca8460c7b00a1ff53aa70fce7766f687c40239 (plain) (blame)
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
OBJ = ptx.o

FLAGS = -DLIBDIR='"$(LIBDIR)"' $(EUC) -I../include

.c.o:
	$(CC) $(_CFLAGS) $(FLAGS) -c $<

all: ptx ptx.1

ptx: $(OBJ)
	$(CC) $(_CFLAGS) $(_LDFLAGS) $(OBJ) $(LIBS) -o ptx

install:
	$(INSTALL) -c ptx $(ROOT)$(BINDIR)/ptx
	$(STRIP) $(ROOT)$(BINDIR)/ptx
	$(INSTALL) -c -m 644 ptx.1 $(ROOT)$(MANDIR)/man1/ptx.1
	test -d $(ROOT)$(LIBDIR) || mkdir -p $(ROOT)$(LIBDIR)
	$(INSTALL) -c -m 644 eign $(ROOT)$(LIBDIR)/eign

clean:
	rm -f $(OBJ) ptx core log *~ ptx.1

mrproper: clean

ptx.1: ptx.1.in
	sed -e "s'/usr/5bin/sort'`which sort`'" \
	    -e 's"/usr/ucblib/doctools/tmac/"$(ROOT)$(BINDIR)/"' \
	    -e 's"/usr/ucblib/"$(ROOT)$(LIBDIR)/"' \
	    ptx.1.in > $@