lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 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 | FLTFLAGS += -s 8192 |
| 10 | |
| 11 | ifeq ($(CONFIG_USER_FLATFSD_FLATFSD),y) |
| 12 | CFLAGS += -DPATH_CONFIG='"/etc/config"' |
| 13 | CFLAGS += -DPATH_AUTH='"/bin"' |
| 14 | CFLAGS += -DPATH_LOG='"/var/log"' |
| 15 | CFLAGS += -DPATH_RESOLV='"/var/run"' |
| 16 | endif |
| 17 | |
| 18 | # uid 0 = root |
| 19 | INSTALL= install |
| 20 | |
| 21 | all: |
| 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 | |
| 28 | install: $(BINDIR) $(MANDIR)/man8 install-progs install-devel |
| 29 | |
| 30 | install-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 | |
| 37 | install-etcppp: $(ETCDIR) $(ETCDIR)/options $(ETCDIR)/pap-secrets \ |
| 38 | $(ETCDIR)/chap-secrets |
| 39 | |
| 40 | install-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 | |
| 57 | clean: |
| 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 | |
| 67 | dist-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... |
| 74 | installcheck: |
| 75 | true |