File: Makefile.in

package info (click to toggle)
netstd 3.07-7slink.3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 6,312 kB
  • ctags: 9,027
  • sloc: ansic: 72,107; cpp: 6,144; makefile: 1,650; yacc: 1,614; sh: 1,164; perl: 308; awk: 46
file content (278 lines) | stat: -rw-r--r-- 8,391 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# Makefile for the Universal NFS Server.	-*- Indented-Text -*-
# Copyright (C) 1993 Rick Sladkey.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

#### Start of system configuration section. ####

srcdir = @srcdir@
VPATH = @srcdir@

CC = @CC@
AR = ar
RANLIB = @RANLIB@

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ -m 755
INSTALL_DATA = @INSTALL_DATA@
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
RPCGEN = @RPCGEN@ @RPCGEN_C@

# General compile options and libs:
DEFS = @DEFS@ $(NFSD_DEFS)
LIBS = libnfs.a @LIBS@

# Compile options for nfsd:
# CALL_PROFILING
#	Profiles all NFS RPC calls in the server. Statistics can be dumped
#	to /tmp/nfsd.profile by sending a SIGIOT to the server.
# DOSHACKS
#	This is a hack that lets DOS boxes mount NFS volumes with all_squash
#	enabled and actually write to them, even though their uid/gid does
#	not match the anon_uid/anon_gid. Ugly, and not officially supported.
#	(Don't you call me a hypocrite:)
# SUPPORT_CDF
#	Experimental support for context-dependent files on LOOKUP.
#	Currently supported names are cdf:uid and cdf:hostaddr. When a
#	CDF component cannot be looked up, it will be replaced with
#	the catch-all name "default".
# DEBUG
#	General debugging enable flag
#NFSD_DEFS = -DCALL_PROFILING
NFSD_DEFS =

CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@ -s
WARNFLAGS = @WARNFLAGS@
RPC_WARNFLAGS = @RPC_WARNFLAGS@
TRANSPORTFLAGS = @RPCGEN_I@ -s udp -s tcp

prefix	= $(install_prefix)/usr
exec_prefix = $(prefix)

bindir	= $(exec_prefix)/sbin
#vardir = $(install_prefix)/var/lib/nfs
infodir = $(prefix)/info
man5dir = $(prefix)/man/man5
man5ext = .5
man8dir = $(prefix)/man/man8
man8ext = .8

# Prefix to be prepended to each installed RPC program, normally `rpc.'.
rpcprefix = rpc.
# Prefix to be prepended to each installed program, normally empty or `g'.
binprefix = 

#### End of system configuration section. ####

# include site-specific defintions generated by BUILD.
include site.mk

SHELL = /bin/sh

SRCS		= version.c logging.c fh.c auth_init.c auth_clnt.c auth.c \
		  nfsd.c nfs_dispatch.c getattr.c setattr.c \
		  mountd.c mount_dispatch.c \
		  ugid_clnt.c ugid_map.c ugid_xdr.c ugidd.c \
		  rquotad.c rquota_dispatch.c rquota_xdr.c \
		  rpcmisc.c rmtab.c showmount.c
LIBSRCS		= fileblocks.c fsusage.c realpath.c strerror.c \
		  utimes.c mkdir.c rename.c getopt.c getopt1.c \
		  alloca.c eaccess.c mountlist.c xmalloc.c \
		  xstrdup.c strdup.c strstr.c nfsmounted.c faccess.c \
		  haccess.c
XDRFILES	= mount.x nfs_prot.x
GENFILES	= mount.h mount_xdr.c mount_svc.c nfs_prot.h nfs_prot_xdr.c \
		  ugid.h ugid_xdr.c ugid_clnt.c
HDRS		= system.h nfsd.h auth.h fh.h logging.h fakefsuid.h \
		  rpcmisc.h faccess.h rquotad.h rquota.h
LIBHDRS		= fsusage.h getopt.h mountlist.h
MANPAGES5	= exports
MANPAGES8	= mountd nfsd showmount $(UGIDD_MAN)
MANPAGES	= $(MANPAGES5) $(MANPAGES8)
LIBOBJS		= version.o getopt.o getopt1.o eaccess.o \
		  fsusage.o mountlist.o xmalloc.o xstrdup.o \
		  nfsmounted.o faccess.o haccess.o @LIBOBJS@ @ALLOCA@
OBJS		= logging.o fh.o auth_init.o auth_clnt.o auth.o
NFSD_OBJS	= nfsd.o rpcmisc.o nfs_dispatch.o getattr.o setattr.o \
		  nfs_prot_xdr.o ugid_clnt.o ugid_map.o ugid_xdr.o $(OBJS)
MOUNTD_OBJS	= mountd.o rpcmisc.o mount_dispatch.o mount_xdr.o rmtab.o \
		  $(OBJS)
SHOWMOUNT_OBJS	= showmount.o mount_xdr.o
UGIDD_OBJS	= ugidd.o ugid_xdr.o logging.o
DAEMONS		= $(rpcprefix)mountd $(rpcprefix)nfsd $(UGIDD_PROG)
CLIENTS		= showmount

DISTFILES	= $(SRCS) $(HDRS) $(MANPAGES) \
		  $(XDRFILES) $(LIBSRCS) $(LIBHDRS) \
		  ChangeLog README NEWS TODO INSTALL COPYING \
		  Makefile.in configure.in aclocal.m4 acconfig.h \
		  config.h.in configure mkinstalldirs

all: $(rpcprefix)mountd $(rpcprefix)nfsd showmount $(UGIDD_PROG)
.PHONY: all

.PHONY: info dvi
info: nfs-server.info
dvi: nfs-server.dvi

COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS) $(WARNFLAGS)

.c.o:
	$(COMPILE) $<

.PHONY: install installdirs
install: $(DAEMONS) $(CLIENTS) installdirs
	@for prog in $(DAEMONS) $(CLIENTS); do \
	    echo "installing $$prog in $(bindir)";	\
	    $(INSTALL_PROGRAM) $$prog $(bindir)/$$prog;	\
	done
	@for manp in $(MANPAGES5); do			\
	    echo "installing $$manp$(man5ext) in $(man5dir)";	\
	    $(INSTALL_DATA) $(srcdir)/$$manp.man	\
	        $(man5dir)/$$manp$(man5ext); \
	done
	@for manp in $(MANPAGES8); do			\
	    echo "installing $$manp$(man8ext) in $(man8dir)";	\
	    $(INSTALL_DATA) $(srcdir)/$$manp.man	\
	        $(man8dir)/$$manp$(man8ext); 		\
	    if [ 'x$(rpcprefix)' != 'x' ]; then \
	        rm -f $(man8dir)/$(rpcprefix)$$manp$(man8ext); \
	        ln $(man8dir)/$$manp$(man8ext) \
	            $(man8dir)/$(rpcprefix)$$manp$(man8ext); \
	    fi; \
	done

installdirs:
	${srcdir}/mkinstalldirs $(bindir) $(man5dir) $(man8dir)

$(rpcprefix)mountd: $(MOUNTD_OBJS) libnfs.a
	$(CC) $(LDFLAGS) -o $@ $(MOUNTD_OBJS) $(LIBS) \
		$(LIBWRAP_DIR) $(LIBWRAP_LIB)

$(rpcprefix)nfsd: $(NFSD_OBJS) libnfs.a
	$(CC) $(LDFLAGS) -o $@ $(NFSD_OBJS) $(LIBS)

$(rpcprefix)ugidd: $(UGIDD_OBJS) libnfs.a
	$(CC) $(LDFLAGS) -o $@ $(UGIDD_OBJS) $(LIBS) \
		$(LIBWRAP_DIR) $(LIBWRAP_LIB)

showmount: $(SHOWMOUNT_OBJS) libnfs.a
	$(CC) $(LDFLAGS) -o $@ $(SHOWMOUNT_OBJS) $(LIBS)

version.c: .version
	VERSION=`cat .version`; \
	echo "char version[] = \"Universal NFS Server $$VERSION\";" > version.c

nfs_prot.h: nfs_prot.x
	rm -f $@
	$(RPCGEN) -h -o $@ $?
nfs_prot_xdr.c: nfs_prot.x
	rm -f $@
	$(RPCGEN) -c $? | \
		sed 's;^#include ".*/nfs_prot.h"$$;#include "nfs_prot.h";' >$@

mount.h: mount.x
	rm -f $@
	$(RPCGEN) -h -o $@ $?
mount_xdr.c: mount.x
	rm -f $@
	$(RPCGEN) -c $? | \
		  sed 's;^#include ".*/mount.h"$$;#include "mount.h";' >$@
mount_svc.c: mount.x
	rm -f $@
	$(RPCGEN) -m $? | \
		sed 's;^#include ".*/mount.h"$$;#include "mount.h";' >$@

ugid.h:	ugid.x
	rm -f $@
	$(RPCGEN) -h -o $@ $?
ugid_xdr.c: ugid.x
	rm -f $@
	$(RPCGEN) -c $? | \
		  sed 's;^#include ".*/ugid.h"$$;#include "ugid.h";' >$@
ugid_clnt.c: ugid.x
	rm -f $@
	$(RPCGEN) -l -o $@ $?

nfs_prot_xdr.o: nfs_prot_xdr.c
	$(COMPILE) $(RPC_WARNFLAGS) -c nfs_prot_xdr.c
mount_xdr.o: mount_xdr.c
	$(COMPILE) $(RPC_WARNFLAGS) -c mount_xdr.c
mount_svc.o: mount_svc.c
	$(COMPILE) $(RPC_WARNFLAGS) -c mount_svc.c
ugid_xdr.o: ugid_xdr.c
	$(COMPILE) $(RPC_WARNFLAGS) -c ugid_xdr.c
ugid_clnt.o: ugid_clnt.c
	$(COMPILE) $(RPC_WARNFLAGS) -c ugid_clnt.c

$(MOUNTD_OBJS): config.h nfs_prot.h mount.h
$(NFSD_OBJS): config.h nfs_prot.h mount.h
$(SHOWMOUNT_OBJS): config.h mount.h
ugid_map.o ugid_clnt.o: config.h ugid.h
$(UGIDD_OBJS): config.h ugid.h
ugidd.o: ugidd.c
	$(COMPILE) $(UGIDD_DEFS) -c ugidd.c

libnfs.a: $(LIBOBJS)
	rm -f $@
	$(AR) cr $@ $(LIBOBJS)
	-$(RANLIB) $@

nfs-server.info: nfs-server.texi
	$(MAKEINFO) -I$(srcdir) -o nfs-server.info $(srcdir)/nfs-server.texi
nfs-server.dvi: nfs-server.texi
	$(TEXI2DVI) $(srcdir)/nfs-server.texi

README: README.mm
	groff -mgm -Tascii README.mm | col -b > README

.PHONY: check
check: nfs-server
	@echo nothing to check

# this causes nothing but grief
#Makefile: Makefile.in config.h.in config.status
#	$(SHELL) config.status
#config.status: configure
#	$(SHELL) config.status --recheck
#configure: configure.in aclocal.m4
#	cd $(srcdir) && autoconf
#config.h.in: configure.in acconfig.h
#	cd $(srcdir) && autoheader

TAGS: $(SRCS)
	etags $(SRCS)

.PHONY: clean mostlyclean distclean realclean dist

clean mostlyclean distclean::
	rm -f $(rpcprefix)mountd $(rpcprefix)nfsd
	rm -f $(rpcprefix)ugidd $(rpcprefix)rquotad
	rm -f showmount 
	rm -f *.o libnfs.a core
	rm -f nfs-server.dvi nfs-server.?? nfs-server.??s
	rm -f LOG X Y Z

mostlyclean distclean::
	rm -f Makefile config.h config.status config.cache config.log
	rm -f TAGS nfs-server.info*

distclean::
	rm -f site.h site.mk

# Prevent GNU make v3 from overflowing arg limit on SysV.
.NOEXPORT: