X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=linux%2FMakefile.top;h=894f8f32c9e4bd4284ad614382f6b5f2b29a959a;hp=00ca83df7a72917e3b05e083208411bb1c0e4e98;hb=f1a34da3b2f5336e4993a729e5ac2130d0e0595a;hpb=bbe9c77aafc5d183eb3c29879563e4c9b95bc1b6 diff --git a/linux/Makefile.top b/linux/Makefile.top index 00ca83d..894f8f3 100644 --- a/linux/Makefile.top +++ b/linux/Makefile.top @@ -1,13 +1,70 @@ # PPP top-level Makefile for Linux. +DESTDIR = $(INSTROOT)@DESTDIR@ +BINDIR = $(DESTDIR)/sbin +INCDIR = $(DESTDIR)/include +MANDIR = $(DESTDIR)/share/man +ETCDIR = $(INSTROOT)@SYSCONF@/ppp + +# uid 0 = root +INSTALL= install + all: - cd chat; $(MAKE) all - cd pppd; $(MAKE) all + cd chat; $(MAKE) $(MFLAGS) all + cd pppd/plugins; $(MAKE) $(MFLAGS) all + cd pppd; $(MAKE) $(MFLAGS) all + cd pppstats; $(MAKE) $(MFLAGS) all + cd pppdump; $(MAKE) $(MFLAGS) all + +install: $(BINDIR) $(MANDIR)/man8 install-progs install-devel + +install-progs: + cd chat; $(MAKE) $(MFLAGS) install + cd pppd/plugins; $(MAKE) $(MFLAGS) install + cd pppd; $(MAKE) $(MFLAGS) install + cd pppstats; $(MAKE) $(MFLAGS) install + cd pppdump; $(MAKE) $(MFLAGS) install + +install-etcppp: $(ETCDIR) $(ETCDIR)/options $(ETCDIR)/pap-secrets \ + $(ETCDIR)/chap-secrets $(ETCDIR)/eaptls-server $(ETCDIR)/eaptls-client -install: - cd chat; $(MAKE) install - cd pppd; $(MAKE) install +install-devel: + cd pppd; $(MAKE) $(MFLAGS) install-devel + +$(ETCDIR)/options: + $(INSTALL) -c -m 644 etc.ppp/options $@ +$(ETCDIR)/pap-secrets: + $(INSTALL) -c -m 600 etc.ppp/pap-secrets $@ +$(ETCDIR)/chap-secrets: + $(INSTALL) -c -m 600 etc.ppp/chap-secrets $@ +$(ETCDIR)/eaptls-server: + $(INSTALL) -c -m 600 etc.ppp/eaptls-server $@ +$(ETCDIR)/eaptls-client: + $(INSTALL) -c -m 600 etc.ppp/eaptls-client $@ + +$(BINDIR): + $(INSTALL) -d -m 755 $@ +$(MANDIR)/man8: + $(INSTALL) -d -m 755 $@ +$(ETCDIR): + $(INSTALL) -d -m 755 $@ clean: + rm -f `find . -name '*.[oas]' -print` + rm -f `find . -name 'core' -print` + rm -f `find . -name '*~' -print` cd chat; $(MAKE) clean + cd pppd/plugins; $(MAKE) clean cd pppd; $(MAKE) clean + cd pppstats; $(MAKE) clean + cd pppdump; $(MAKE) clean + +dist-clean: clean + rm -f Makefile `find . -name Makefile -print` + +#kernel: +# cd linux; ./kinstall.sh + +# no tests yet, one day... +installcheck: + true