Last active
September 10, 2018 16:12
-
-
Save tonejito/7f2c25519bae996e91cb61c26dd599e2 to your computer and use it in GitHub Desktop.
Makefile for OpenWRT configuration and build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://openwrt.org/docs/guide-developer/quickstart-build-images | |
SHELL=/bin/bash | |
DATE=$(shell date '+%s') | |
SRC_REPO=https://git.openwrt.org/openwrt/openwrt.git | |
SRC_DIR=openwrt | |
DEPS=\ | |
subversion g++ zlib1g-dev build-essential git python rsync man-db \ | |
libncurses5-dev gawk gettext unzip file libssl-dev wget zip time | |
all: code feeds menuconfig build | |
build: | |
time script --flush --return --command '$(MAKE) -j1 V=sc -C ${SRC_DIR}' make-${DATE}.log | |
deps: | |
sudo apt install ${DEPS} | |
code: | |
test -d ${SRC_DIR} || git clone ${SRC_REPO} ${SRC_DIR} | |
feeds: | |
time $(MAKE) -f ../Makefile -C ${SRC_DIR} do_$@ | |
do_feeds: | |
./scripts/feeds update -a | |
./scripts/feeds install -a | |
menuconfig: | |
$(MAKE) -C ${SRC_DIR} menuconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Makefile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment