PROGS = quotacheck quotaon quota repquota warnquota quotastats edquota setquota rpc.rquotad CFLAGS = @CFLAGS@ -I. -DRPC -DALT_FORMAT -DRPC_SETQUOTA @EXT2_DIRECT@ EXT2LIBS = @EXT2LIBS@ RPCSRC = rquota.h rquota_xdr.c rquota_clnt.c VERSIONDEF = -DQUOTA_VERSION=\"2.00\" LIBS = @LIBS@ LDFLAGS = -s # # Uncomment the two lines below to add tcp_wrapper support for rpc.rquotad # Then add lines to /etc/hosts.allow and /etc/hosts.deny # like: "rquotad: ALL@ALL except my.host.i.want.com" in hosts.deny means # only the host designated can get info from rquotad # NOTE: I used gethostbyaddr(), so you may need FQDN or merely host name # depending on how your resolver returns first. IP Addresses will work as well. # CFLAGS += @HOSTS_ACCESS@ INSTALL = @INSTALL@ LN = ln -sf ROOTDIR = SUPER_OWNER = root BIN_OWNER = bin BIN_GROUP = bin DEF_SUID_MODE = 4511 DEF_BIN_MODE = 555 DEF_SBIN_MODE = 555 DEF_MAN_MODE = 444 RPCGEN = rpcgen prefix = @prefix@ bindir = $(prefix)/bin sbindir = $(prefix)/sbin mandir = $(prefix)/man includedir = $(prefix)/include root_sbindir = /sbin locale_dir = $(prefix)/share/locale all: $(PROGS) clean: -rm -f core *.o clobber: clean -rm -f $(PROGS) Makefile config.{status,cache,log} realclean: clobber -rm -f $(RPCSRC) pot: xgettext -k_ -d pot *.c mo: po for n in $(shell ls po/*.po); do \ msgfmt -o po/`basename $$n .po`.mo $$n; \ done inst_mo: mo mkdir -p $(locale_dir) for n in $(shell ls po/*.po | sed 's/\.po/\.mo/'); do \ l=`basename $$n .mo`; \ $(INSTALL) -m 755 -d $(locale_dir)/$$l; \ $(INSTALL) -m 755 -d $(locale_dir)/$$l/LC_MESSAGES; \ $(INSTALL) -m 644 $$n $(locale_dir)/$$l/LC_MESSAGES/quota.mo; \ done install: all inst_mo -$(INSTALL) -m $(DEF_SBIN_MODE) \ quotacheck quotaon $(ROOTDIR)$(root_sbindir) $(LN) quotaon $(ROOTDIR)$(root_sbindir)/quotaoff chown -h $(BIN_OWNER):$(BIN_GROUP) $(root_sbindir)/quotaoff -$(INSTALL) -m $(DEF_SBIN_MODE) \ edquota repquota warnquota quotastats setquota $(ROOTDIR)$(sbindir) -$(INSTALL) -m 644 rquota.h rquota.x $(ROOTDIR)$(includedir)/rpcsvc -$(INSTALL) -s -m $(DEF_SBIN_MODE) quota $(ROOTDIR)$(bindir) -$(INSTALL) -s -m $(DEF_SBIN_MODE) rpc.rquotad $(ROOTDIR)$(sbindir) -$(INSTALL) -m $(DEF_MAN_MODE) *.1 $(ROOTDIR)$(mandir)/man1 -$(INSTALL) -m $(DEF_MAN_MODE) *.2 $(ROOTDIR)$(mandir)/man2 -$(INSTALL) -m $(DEF_MAN_MODE) *.3 $(ROOTDIR)$(mandir)/man3 -$(INSTALL) -m $(DEF_MAN_MODE) *.8 $(ROOTDIR)$(mandir)/man8 quotaon: quotaon.o quotactl.o hasquota.o pot.o bylabel.o $(CC) $(LDFLAGS) -o $@ quotaon.o quotactl.o hasquota.o \ pot.o bylabel.o quotacheck: quotacheck.o quotactl.o hasquota.o pot.o bylabel.o $(CC) $(LDFLAGS) -o $@ quotacheck.o quotactl.o hasquota.o \ pot.o bylabel.o $(EXT2LIBS) quota: rquota.h quota.o quotaops.o quotaio.o quotactl.o rquota_client.o \ rquota_clnt.o rquota_xdr.o hasquota.o pot.o bylabel.o $(CC) $(LDFLAGS) -o $@ quota.o quotaops.o quotaio.o quotactl.o rquota_client.o \ rquota_clnt.o rquota_xdr.o hasquota.o pot.o bylabel.o repquota: repquota.o quotactl.o hasquota.o pot.o bylabel.o $(CC) $(LDFLAGS) -o $@ repquota.o quotactl.o hasquota.o pot.o bylabel.o warnquota: warnquota.o quotactl.o hasquota.o pot.o bylabel.o $(CC) $(LDFLAGS) -o $@ warnquota.o quotactl.o hasquota.o pot.o bylabel.o quotastats: quotastats.o quotactl.o pot.o $(CC) $(LDFLAGS) -o $@ quotastats.o quotactl.o pot.o edquota: edquota.o quotaops.o quotaio.o quotactl.o rquota_client.o \ rquota_clnt.o rquota_xdr.o hasquota.o pot.o bylabel.o $(CC) $(LDFLAGS) -o $@ edquota.o quotaops.o quotaio.o quotactl.o rquota_client.o \ rquota_clnt.o rquota_xdr.o hasquota.o pot.o bylabel.o setquota: setquota.o quotaops.o quotaio.o quotactl.o rquota.h rquota_client.o \ rquota_clnt.o rquota_xdr.c hasquota.o pot.o bylabel.o $(CC) $(LDFLAGS) -o $@ setquota.o quotaops.o quotaio.o quotactl.o rquota_client.o \ rquota_clnt.o rquota_xdr.o hasquota.o pot.o bylabel.o rpc.rquotad: rquota.h rquota_server.o quotaio.o rquota_svc.o rquota_xdr.o quotactl.o hasquota.o pot.o bylabel.o $(CC) $(LDFLAGS) -o $@ rquota_server.o quotaio.o rquota_svc.o rquota_xdr.o \ quotactl.o hasquota.o pot.o bylabel.o $(LIBS) quota.o: quota.c $(CC) $(CFLAGS) $(VERSIONDEF) -c quota.c -o $@ pot.o: pot.c pot.h $(CC) $(CFLAGS) -c $< rquota.h: rquota.x $(RPCGEN) -h -o $@ $< rquota_xdr.c: rquota.x $(RPCGEN) -c -o $@ $< rquota_clnt.c: rquota.x $(RPCGEN) -l -o $@ $<