]> git.ozlabs.org Git - ppp.git/blob - linux/Makefile.top
Merge pull request #153 from pali/master
[ppp.git] / linux / Makefile.top
1 # PPP top-level Makefile for Linux.
2
3 DESTDIR = $(INSTROOT)@DESTDIR@
4 BINDIR = $(DESTDIR)/sbin
5 INCDIR = $(DESTDIR)/include
6 MANDIR = $(DESTDIR)/share/man
7 ETCDIR = $(INSTROOT)@SYSCONF@/ppp
8
9 # uid 0 = root
10 INSTALL= install
11
12 all:
13         cd chat; $(MAKE) $(MFLAGS) all
14         cd pppd/plugins; $(MAKE) $(MFLAGS) all
15         cd pppd; $(MAKE) $(MFLAGS) all
16         cd pppstats; $(MAKE) $(MFLAGS) all
17         cd pppdump; $(MAKE) $(MFLAGS) all
18
19 install: $(BINDIR) $(MANDIR)/man8 install-progs install-devel
20
21 install-progs:
22         cd chat; $(MAKE) $(MFLAGS) install
23         cd pppd/plugins; $(MAKE) $(MFLAGS) install
24         cd pppd; $(MAKE) $(MFLAGS) install
25         cd pppstats; $(MAKE) $(MFLAGS) install
26         cd pppdump; $(MAKE) $(MFLAGS) install
27
28 install-etcppp: $(ETCDIR) $(ETCDIR)/options $(ETCDIR)/pap-secrets \
29         $(ETCDIR)/chap-secrets $(ETCDIR)/eaptls-server $(ETCDIR)/eaptls-client
30
31 install-devel:
32         cd pppd; $(MAKE) $(MFLAGS) install-devel
33
34 $(ETCDIR)/options:
35         $(INSTALL) -c -m 644 etc.ppp/options $@
36 $(ETCDIR)/pap-secrets:
37         $(INSTALL) -c -m 600 etc.ppp/pap-secrets $@
38 $(ETCDIR)/chap-secrets:
39         $(INSTALL) -c -m 600 etc.ppp/chap-secrets $@
40 $(ETCDIR)/eaptls-server:
41         $(INSTALL) -c -m 600 etc.ppp/eaptls-server $@
42 $(ETCDIR)/eaptls-client:
43         $(INSTALL) -c -m 600 etc.ppp/eaptls-client $@
44
45 $(BINDIR):
46         $(INSTALL) -d -m 755 $@
47 $(MANDIR)/man8:
48         $(INSTALL) -d -m 755 $@
49 $(ETCDIR):
50         $(INSTALL) -d -m 755 $@
51
52 clean:
53         rm -f `find . -name '*.[oas]' -print`
54         rm -f `find . -name 'core' -print`
55         rm -f `find . -name '*~' -print`
56         cd chat; $(MAKE) clean
57         cd pppd/plugins; $(MAKE) clean
58         cd pppd; $(MAKE) clean
59         cd pppstats; $(MAKE) clean
60         cd pppdump; $(MAKE) clean
61
62 dist-clean:     clean
63         rm -f Makefile `find . -name Makefile -print`
64
65 #kernel:
66 #       cd linux; ./kinstall.sh
67
68 # no tests yet, one day...
69 installcheck:
70         true