blob: 2e481c7d89baa422f6980a3051a78c1573a67f94 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001# PPP top-level Makefile for Linux.
2
3DESTDIR = $(INSTROOT)@DESTDIR@
4BINDIR = $(DESTDIR)/sbin
5INCDIR = $(DESTDIR)/include
6MANDIR = $(DESTDIR)/share/man
7ETCDIR = $(INSTROOT)@SYSCONF@/ppp
8
9FLTFLAGS += -s 8192
10
11ifeq ($(CONFIG_USER_FLATFSD_FLATFSD),y)
12CFLAGS += -DPATH_CONFIG='"/etc/config"'
13CFLAGS += -DPATH_AUTH='"/bin"'
14CFLAGS += -DPATH_LOG='"/var/log"'
15CFLAGS += -DPATH_RESOLV='"/var/run"'
16endif
17
18# uid 0 = root
19INSTALL= install
20
21all:
22 cd chat; $(MAKE) $(MFLAGS) all
23 cd pppd/plugins; $(MAKE) $(MFLAGS) all
24 cd pppd; $(MAKE) $(MFLAGS) all
25 cd pppstats; $(MAKE) $(MFLAGS) all
26 cd pppdump; $(MAKE) $(MFLAGS) all
27
28install: $(BINDIR) $(MANDIR)/man8 install-progs install-devel
29
30install-progs:
31 cd chat; $(MAKE) $(MFLAGS) install
32 cd pppd/plugins; $(MAKE) $(MFLAGS) install
33 cd pppd; $(MAKE) $(MFLAGS) install
34 cd pppstats; $(MAKE) $(MFLAGS) install
35 cd pppdump; $(MAKE) $(MFLAGS) install
36
37install-etcppp: $(ETCDIR) $(ETCDIR)/options $(ETCDIR)/pap-secrets \
38 $(ETCDIR)/chap-secrets
39
40install-devel:
41 cd pppd; $(MAKE) $(MFLAGS) install-devel
42
43$(ETCDIR)/options:
44 $(INSTALL) -c -m 644 etc.ppp/options $@
45$(ETCDIR)/pap-secrets:
46 $(INSTALL) -c -m 600 etc.ppp/pap-secrets $@
47$(ETCDIR)/chap-secrets:
48 $(INSTALL) -c -m 600 etc.ppp/chap-secrets $@
49
50$(BINDIR):
51 $(INSTALL) -d -m 755 $@
52$(MANDIR)/man8:
53 $(INSTALL) -d -m 755 $@
54$(ETCDIR):
55 $(INSTALL) -d -m 755 $@
56
57clean:
58 rm -f `find . -name '*.[oas]' -print`
59 rm -f `find . -name 'core' -print`
60 rm -f `find . -name '*~' -print`
61 cd chat; $(MAKE) clean
62 cd pppd/plugins; $(MAKE) clean
63 cd pppd; $(MAKE) clean
64 cd pppstats; $(MAKE) clean
65 cd pppdump; $(MAKE) clean
66
67dist-clean: clean
68 rm -f Makefile `find . -name Makefile -print`
69
70#kernel:
71# cd linux; ./kinstall.sh
72
73# no tests yet, one day...
74installcheck:
75 true