| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 | # This file is part of the OpenADK project. OpenADK is copyrighted# material, please see the LICENCE file in the top-level directory._UNLIMIT=	__limit=$$(ulimit -dH 2>/dev/null); \		test -n "$$__limit" && ulimit -Sd $$__limit; ulimit -n 1024;all: .prereq_done checkreloc	@${_UNLIMIT} ${GMAKE_INV} allv: .prereq_done	@(echo; echo "Build started on $$(LC_ALL=C LANGUAGE=C date)"; \	    set -x; ${_UNLIMIT} ${GMAKE_FMK} VERBOSE=1 all) 2>&1 | tee -a make.loghelp:	@echo 'Configuration targets:'	@echo '  config       - Update current config utilising a line-oriented program'	@echo '  menuconfig   - Update current config utilising a menu based program'	@echo '                 (default when .config does not exist)'	@echo '  oldconfig    - Update current config utilising a provided .configs base'	@echo '  allmodconfig - New config selecting all packages as modules when possible'	@echo '  allconfig    - New config selecting all packages when possible'	@echo '  allnoconfig  - New config where all options are answered with no'	@echo ''	@echo 'Help targets:'	@echo '  help         - Print this help text'	@echo '  pkg-help     - Print help about selectively compiling single packages'	@echo '  dev-help     - Print help for developers / package maintainers'	@echo ''	@echo 'Common targets:'	@echo '  download     - fetches all needed distfiles'	@echo '  kernelconfig - view the target kernel configuration'	@echo ''	@echo 'Cleaning targets:'	@echo '  clean        - Remove firmware and build directories'	@echo '  cleandir     - Same as "clean", but also remove all built toolchains'	@echo '  cleansystem  - Same as "cleandir", but only remove active system'	@echo '  cleankernel  - Remove kernel dir, useful if you changed any kernel patches'	@echo '  distclean    - Same as "cleandir", but also remove downloaded'	@echo '                 distfiles and .config'	@echo ''	@echo 'Other generic targets:'	@echo '  all          - Build everything as specified in .config'	@echo '                 (default if .config exists)'	@echo '  v            - Same as "all" but with logging to make.log enabled'pkg-help:	@echo 'Package specific targets (use with "package=<pkg-name>" parameter):'	@echo '  fetch        - Download the necessary distfile'	@echo '  extract      - Same as "fetch", but also extract the distfile'	@echo '  patch        - Same as "extract", but also patch the source'	@echo '  build        - Same as "patch", but also build the binaries'	@echo '  fake         - Same as "build", but also install the binaries'	@echo '  package      - Same as "fake", but also create the package'	@echo '  clean        - Deinstall and remove the build area'	@echo '  distclean    - Same as "clean", but also remove the distfiles'	@echo ''	@echo 'Short package rebuilding guide:'	@echo '  run "make package=<pkgname> clean" to remove all generated binaries'	@echo '  run "make package=<pkgname> package" to build everything and create the package(s)'	@echo ''	@echo 'This does not automatically resolve package dependencies!'dev-help:	@echo 'Fast way of updating package patches:'	@echo '  run "make package=<pkgname> clean" to start with a good base'	@echo '  run "make package=<pkgname> patch" to fetch, unpack and patch the source'	@echo '  edit the package sources at build_dir/w-<pkgname>-*/<pkgname>-<version>'	@echo '  run "make package=<pkgname> update-patches" to regenerate patch files'	@echo ''	@echo 'All changed patches will be opened with your $$EDITOR,'	@echo 'so you can add a description and verify the modifications.'	@echo ''	@echo 'Adding a new package:'	@echo 'make PKG=foo VER=1.0 newpackage'	@echo 'Adding a new simple library package:'	@echo 'make PKG=foo VER=1.0 TYPE=lib newpackage'	@echo 'Adding a new simple program package:'	@echo 'make PKG=foo VER=1.0 TYPE=prog newpackage'clean: .prereq_done	-@rm -f nohup.out	@${GMAKE_INV} cleanconfig: .prereq_done	@${GMAKE_INV} _config W=oldconfig: .prereq_done	@${GMAKE_INV} _config W=-odownload: .prereq_done	@${GMAKE_INV} toolchain/download	@${GMAKE_INV} dep	@${GMAKE_INV} package/downloadcleankernel kernelclean: .prereq_done	-@${GMAKE_INV} cleankernelcleandir dirclean: .prereq_done	-@${GMAKE_INV} cleandir	@-rm -f make.log .prereq_donecleansystem: .prereq_done	-@${GMAKE_INV} cleansystem	@-rm -f make.log .prereq_donedistclean cleandist:	-@${GMAKE_INV} distclean	@-rm -f make.log .prereq_doneimage: .prereq_done	@${GMAKE_INV} imagetargethelp: .prereq_done	@${GMAKE_INV} targethelpswitch: .prereq_done	@${GMAKE_INV} switchkernelconfig: .prereq_done	@${GMAKE_INV} kernelconfignewpackage: .prereq_done	@${GMAKE_INV} newpackageimage_clean imageclean cleanimage: .prereq_done	@${GMAKE_INV} image_cleanmenuconfig: .prereq_done	@${GMAKE_INV} menuconfigdefconfig: .prereq_done	@${GMAKE_INV} defconfigallnoconfig: .prereq_done	@${GMAKE_INV} _config W=-nallconfig: .prereq_done	@${GMAKE_INV} _mconfig W=-y RCONFIG=Config.inallmodconfig: .prereq_done	@${GMAKE_INV} _mconfig W=-o RCONFIG=Config.inpackage_index: .prereq_done	@${GMAKE_INV} package_indexbuildall: .prereq_done	@${GMAKE_INV} buildallcheck: .prereq_done	@${GMAKE_INV} checkcheck-gcc: .prereq_done	@${GMAKE_INV} check-gcccheck-g++: .prereq_done	@${GMAKE_INV} check-g++menu: .prereq_done	@${GMAKE_INV} menudep: .prereq_done	@${GMAKE_INV} depworld: .prereq_done	@${GMAKE_INV} worldprereq:	@rm -f .prereq_done	@${GMAKE} .prereq_doneprereq-noerror:	@rm -f .prereq_done	@${GMAKE} .prereq_done NO_ERROR=1NO_ERROR=0.prereq_done:	@-rm -rf .prereq_done	@if ! bash --version 2>&1 | grep -F 'GNU bash' >/dev/null 2>&1; then \		echo "GNU bash needs to be installed."; \		exit 1; \	fi	@if test x"$$(umask 2>/dev/null | sed 's/00*22/OK/')" != x"OK"; then \		echo >&2 Error: you must build with umask 022, sorry.; \		exit 1; \	fi	@echo "ADK_TOPDIR:=$$(readlink -nf . 2>/dev/null || pwd -P)" >prereq.mk	@echo "BASH:=$$(which bash)" >>prereq.mk	@if [ -z "$$(which gmake 2>/dev/null )" ]; then \		echo "GMAKE:=$$(which make)" >>prereq.mk ;\	else \		echo "GMAKE:=$$(which gmake)" >>prereq.mk ;\	fi	@echo "GNU_HOST_NAME:=$$(${CC} -dumpmachine)" >>prereq.mk	@echo "ARCH_FOR_BUILD:=$$(${CC} -dumpmachine | sed -e s'/-.*//' \	    -e 's/sparc.*/sparc/' \	    -e 's/armeb.*/armeb/g' \	    -e 's/arm.*/arm/g' \	    -e 's/m68k.*/m68k/' \	    -e 's/sh[234]/sh/' \	    -e 's/mips-.*/mips/' \	    -e 's/mipsel-.*/mipsel/' \	    -e 's/i[3-9]86/x86/' \	    )" >>prereq.mk	@echo 'HOST_CC:=${CC}' >>prereq.mk	@echo 'HOST_CXX:=${CXX}' >>prereq.mk	@echo 'LANGUAGE:=C' >>prereq.mk	@echo 'LC_ALL:=C' >>prereq.mk	@echo 'MAKE:=$${GMAKE}' >>prereq.mk	@echo "OStype:=$$(env uname)" >>prereq.mk	@echo "_PATH:=$$PATH" >>prereq.mk	@echo "PATH:=\$${ADK_TOPDIR}/scripts:/usr/sbin:$$PATH" >>prereq.mk	@echo "SHELL:=$$(which bash)" >>prereq.mk	@echo "GIT:=$$(which git 2>/dev/null)" >>prereq.mk	@env NO_ERROR=${NO_ERROR} BASH="$$(which bash)" \		CC='${CC}' CPPFLAGS='${CPPFLAGS}' \	    	bash scripts/scan-tools.sh	@echo '===> Prerequisites checked successfully.'	@touch .adkinit	@touch $@checkreloc:	@bash scripts/reloc.sh.PHONY: prereq prereq-noerror checkreloc# DO NOT DELETE
 |