[go: up one dir, main page]

File: Makefile

package info (click to toggle)
rstatd 3.03-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 128 kB
  • ctags: 61
  • sloc: ansic: 699; makefile: 82; sh: 33
file content (48 lines) | stat: -rw-r--r-- 1,577 bytes parent folder | download | duplicates (2)
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
43
44
45
46
47
48
# Make file for modified rpc.rstatd see README for details.
         CC = gcc 
     RPCGEN = rpcgen
     CFLAGS = -g -O2 $(OPTIONS)
    LDFLAGS = 
     BINDIR = /usr/bin
    SBINDIR = /usr/sbin
     MANDIR = /usr/man
     RPCLIB = # -lrpclib 
    OPTIONS = -DNORPCLIB

all: rpc.rstatd rup rsysinfo

install: all
	install -m 644 -o root -g root  rstat.h /usr/include/rpcsvc
	install -m 644 -o root -g root  rstat.x /usr/include/rpcsvc
	install -m 750 -o root -g bin  rpc.rstatd $(SBINDIR)/rpc.rstatd
	install -m 755 -o root -g bin  rup $(BINDIR)/rup
	install -m 755 -o root -g bin rsysinfo $(BINDIR)/rsysinfo
	install -m 644 -o root -g bin rstatd.8 $(MANDIR)/man8/rstatd.8
	install -m 644 -o root -g bin rpc.rstatd.8 $(MANDIR)/man1/rpc.rstatd.8
	install -m 644 -o root -g bin rup.1 $(MANDIR)/man1/rup.1
	install -m 644 -o root -g bin rsysinfo.1 $(MANDIR)/man1/rsysinfo.1

rpc.rstatd : rstat_svc.o rstat_xdr.o rstat_proc.o
	$(CC) rstat_svc.o rstat_xdr.o rstat_proc.o -o $@ $(RPCLIB)

rup : rup.o rstat_clnt.o rstat_xdr.o rstat.h 
	$(CC) rup.o rstat_clnt.o rstat_xdr.o -o $@ $(RPCLIB)

rsysinfo : rsysinfo.o rstat_clnt.o rstat_xdr.o rstat.h 
	$(CC) rsysinfo.o rstat_clnt.o rstat_xdr.o -o $@ $(RPCLIB)

rstat.h rstat_clnt.c rstat_svc.c rstat_xdr.c : rstat.x
	$(RPCGEN) -I rstat.x

%.o : %.c rstat.h
	$(CC) -c $(CFLAGS) $< -o $@

patch : clnt.h.diff
	patch -u /usr/include/rpc/clnt.h clnt.h.diff

unpatch : clnt.h.diff
	patch -u -R /usr/include/rpc/clnt.h clnt.h.diff

clean:
	-rm -f rpc.rstatd rstat rup rsysinfo *.o core a.out
	-rm -f rstat.h rstat_clnt.c rstat_svc.c rstat_xdr.c