File: Makefile

package info (click to toggle)
netkit-bootparamd 0.17-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 132 kB
  • ctags: 40
  • sloc: ansic: 514; makefile: 104; sh: 31
file content (55 lines) | stat: -rw-r--r-- 1,680 bytes parent folder | download | duplicates (6)
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
49
50
51
52
53
54
55
all: bootparamd
include ../MCONFIG
include ../MRULES

RPCGEN=rpcgen

# Warning, do NOT put this in the current directory under its own
# name without updating things and particularly the clean target.
#BOOTPARAMX = /usr/include/rpcsvc/bootparam_prot.x
# Actually the one that comes with linux libc appears to be broken
BOOTPARAMX = bootparam_prot.x.real

HEADER=bootparam_prot.h
DIST=README main.c rpc.bootparamd.c callbootd.c bootparamd.8 Makefile

all: bootparamd callbootd

bootparamd: bootparam_prot_svc.o bootparam_prot_xdr.o rpc.bootparamd.o main.o
	${CC} $(LDFLAGS) $^ $(LIBS) -o $@

callbootd: callbootd.o bootparam_prot_clnt.o bootparam_prot_xdr.o 
	${CC} $(LDFLAGS) $^ $(LIBS) -o $@

install: bootparamd callbootd
	install -s -m $(DAEMONMODE) bootparamd \
		$(INSTALLROOT)$(SBINDIR)/rpc.bootparamd
	install -s -m $(BINMODE) callbootd $(INSTALLROOT)$(BINDIR)/callbootd
	install -m $(MANMODE) bootparamd.8 \
		$(INSTALLROOT)$(MANDIR)/man8/rpc.bootparamd.8
	ln -sf rpc.bootparamd.8 $(INSTALLROOT)$(MANDIR)/man8/bootparamd.8

clean:
	rm -f *.o bootparamd callbootd 
	rm -f bootparam_prot.h bootparam_prot_svc.c
	rm -f bootparam_prot_xdr.c bootparam_prot_clnt.c
	rm -f bootparam_prot.x

bootparam_prot_clnt.o bootparam_prot_xdr.o: bootparam_prot.h
bootparam_prot_svc.o: bootparam_prot.h
callbootd.o rpc.bootparamd.o main.o: bootparam_prot.h ../version.h

bootparam_prot.x: $(BOOTPARAMX)
	ln -s $(BOOTPARAMX) bootparam_prot.x

bootparam_prot.h: bootparam_prot.x
	$(RPCGEN) -h $< -o $@

bootparam_prot_xdr.c: bootparam_prot.x
	$(RPCGEN) -c $< -o $@

bootparam_prot_clnt.c: bootparam_prot.x
	$(RPCGEN) -l $< -o $@

bootparam_prot_svc.c: bootparam_prot.x
	$(RPCGEN) -m $< -o $@