]> git.ozlabs.org Git - ccan/blob - ccan/nfs/Makefile
typesafe_cb: simplify, preserve namespace.
[ccan] / ccan / nfs / Makefile
1 CC=gcc
2 CFLAGS=-g -O0 -Wall -W -I../..
3 LIBS=
4
5 LIBNFS_OBJ = libnfs-raw-mount.o libnfs-raw-portmap.o libnfs-raw-nfs.o libnfs-raw-nfsacl.o mount.o nfs.o nfsacl.o portmap.o pdu.o init.o socket.o libnfs.o libnfs-sync.o
6
7 all: tools/nfsclient-raw tools/nfsclient-async tools/nfsclient-sync
8
9 tools/nfsclient-async: tools/nfsclient-async.c libnfs.a
10         $(CC) $(CFLAGS) -o $@ tools/nfsclient-async.c libnfs.a $(LIBS)
11
12 tools/nfsclient-sync: tools/nfsclient-sync.c libnfs.a
13         $(CC) $(CFLAGS) -o $@ tools/nfsclient-sync.c libnfs.a $(LIBS)
14
15 tools/nfsclient-raw: tools/nfsclient-raw.c libnfs.a
16         $(CC) $(CFLAGS) -o $@ tools/nfsclient-raw.c libnfs.a $(LIBS)
17
18 libnfs.a: $(LIBNFS_OBJ)
19         @echo Creating library $@
20         ar r libnfs.a $(LIBNFS_OBJ) 
21         ranlib libnfs.a
22
23 rpc/mount.h: rpc/mount.x
24         @echo Generating $@
25         rpcgen -h rpc/mount.x > $@
26
27 libnfs-raw-mount.c: rpc/mount.x
28         @echo Generating $@
29         rpcgen -c rpc/mount.x > libnfs-raw-mount.c
30
31 libnfs-raw-mount.o: libnfs-raw-mount.c rpc/mount.h
32         @echo Compiling $@
33         gcc -g -c libnfs-raw-mount.c -o $@
34
35 rpc/nfs.h: rpc/nfs.x
36         @echo Generating $@
37         rpcgen -h rpc/nfs.x > $@
38
39 libnfs-raw-nfs.c: rpc/nfs.x
40         @echo Generating $@
41         rpcgen -c rpc/nfs.x > $@
42
43 libnfs-raw-nfs.o: libnfs-raw-nfs.c rpc/nfs.h
44         @echo Compiling $@
45         gcc -g -c libnfs-raw-nfs.c -o $@
46
47 rpc/nfsacl.h: rpc/nfsacl.x
48         @echo Generating $@
49         rpcgen -h rpc/nfsacl.x > $@
50
51 libnfs-raw-nfsacl.c: rpc/nfsacl.x
52         @echo Generating $@
53         rpcgen -c rpc/nfsacl.x > $@
54
55 libnfs-raw-nfsacl.o: libnfs-raw-nfsacl.c rpc/nfsacl.h
56         @echo Compiling $@
57         gcc -g -c libnfs-raw-nfsacl.c -o $@
58
59 rpc/portmap.h: rpc/portmap.x
60         @echo Generating $@
61         rpcgen -h rpc/portmap.x > $@
62
63 libnfs-raw-portmap.c: rpc/portmap.x
64         @echo Generating $@
65         rpcgen -c rpc/portmap.x > $@
66
67 libnfs-raw-portmap.o: libnfs-raw-portmap.c rpc/portmap.h
68         @echo Compiling $@
69         gcc -g -c libnfs-raw-portmap.c -o $@
70
71 clean:
72         rm -f *.o
73         rm -f *.a
74         rm -f rpc/mount.h libnfs-raw-mount.c
75         rm -f rpc/nfs.h libnfs-raw-nfs.c
76         rm -f rpc/nfsacl.h libnfs-raw-nfsacl.c
77         rm -f rpc/portmap.h libnfs-raw-portmap.c
78         rm -f tools/nfsclient-raw tools/nfsclient-async tools/nfsclient-sync
79