lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | |
| 2 | CONFOPTS= |
| 3 | |
| 4 | all: build/configured |
| 5 | $(MAKE) -C build |
| 6 | @cp ./build/pppd/pppd pppd.elf |
| 7 | |
| 8 | build/configured: makefile |
| 9 | rm -rf build |
| 10 | find . -type d > .dirs |
| 11 | find . ! -type d | grep -v ./makefile > .files |
| 12 | while read t; do mkdir -p build/$$t; done < .dirs |
| 13 | while read t; do ln -s `pwd`/$$t build/$$t; done < .files |
| 14 | rm -f .dirs .files |
| 15 | chmod +x build/configure |
| 16 | cd build; sh ./configure $(CONFIGURE_OPTS) $(CONFOPTS) |
| 17 | touch build/configured |
| 18 | |
| 19 | clean: |
| 20 | rm -rf build |
| 21 | |
| 22 | romfs:rootfs_bin |
| 23 | |
| 24 | rootfs_bin: |
| 25 | $(ROMFSINST) build/pppd/pppd /sbin/pppd |
| 26 | $(ROMFSINST) build/chat/chat /sbin/chat |
| 27 | ifdef CONFIG_USER_PPPD_WITH_RADIUS |
| 28 | [ -d $(ROMFSDIR)/etc/radiusclient ] || mkdir $(ROMFSDIR)/etc/radiusclient |
| 29 | $(ROMFSINST) -e CONFIG_USER_PPPD_WITH_RADIUS scripts/radiusclient/dictionary /etc/radiusclient/dictionary |
| 30 | $(ROMFSINST) -e CONFIG_USER_PPPD_WITH_RADIUS scripts/radiusclient/dictionary.ms /etc/radiusclient/dictionary.ms |
| 31 | $(ROMFSINST) -e CONFIG_USER_PPPD_WITH_RADIUS scripts/radiusclient/dictionary.sg /etc/radiusclient/dictionary.sg |
| 32 | endif |