123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- ifndef PJ
- ifeq ($(shell if [ -L menuconfig.config ]; then echo y; fi), y)
- PJ=$(shell ls -la menuconfig.config|awk '{print $$10}')
- endif
- endif
- all: release
- release:
- ifdef PJ
- @if [ ! -e $(PJ) ]; then echo 'Error: $(PJ) is not exist! Please restore it or rebuild kconfig system..'; exit 1; fi
- endif
- @$(MAKE) -f Makefile.pj buildimg PJ=$(PJ) 2>&1 | /usr/bin/tee log/buildlog-`/bin/date +%Y%m%d_%H%M`.log
- debug:
- ifdef PJ
- @if [ ! -e $(PJ) ]; then echo 'Error: $(PJ) is not exist! Please restore it or rebuild kconfig system..'; exit 1; fi
- endif
- @$(MAKE) -f Makefile.pj buildimg PJ=$(PJ) 2>&1 | /usr/bin/tee log/buildlog-`/bin/date +%Y%m%d_%H%M`.log
- mconfig:
- ifndef PJ
- @$(MAKE) -f Makefile.pj mconfig
- endif
- boardconfig:
- ifndef PJ
- @$(MAKE) -f Makefile.pj boardconfig
- endif
- menuconfig:
- ifndef PJ
- @$(MAKE) -f Makefile.pj menuconfig
- endif
- info:
- ifdef PJ
- @if [ ! -e $(PJ) ]; then echo 'Error: $(PJ) is not exist! Please restore it or rebuild kconfig system..'; exit 1; fi
- endif
- @$(MAKE) -f Makefile.pj info PJ=$(PJ)
-
- clean:
- ifdef PJ
- @if [ ! -e $(PJ) ]; then echo 'Error: $(PJ) is not exist! Please restore it or rebuild kconfig system..'; exit 1; fi
- endif
- @$(MAKE) -f Makefile.pj clean PJ=$(PJ)
- help:
- @echo 'Cleaning targets:'
- @echo ' clean - remove most generated files but keep the config'
- @echo ' '
- @echo 'kconfig targets:'
- @echo ' mconfig - update current customer config'
- @echo ' boardconfig - update current board config based on selected customer '
- @echo ' menuconfig - update current project-related config based on selected customer and board'
- @echo ' '
- @echo 'PJ targets:'
- @echo ' rebuild_kconfig - restore the kconfig files'
- @echo ' xcfg [Xn=cfg_name] - generate x.cfg from kconfig system'
- @echo ' '
- @echo 'Building targets:'
- @echo ' all - build release system'
- @echo ' release - build release system'
- @echo ' debug - build debug system'
- @echo ' info - print out the building configs'
- @echo ' '
- @echo 'Execute "make" or "make all" to build release system image'
- rebuild_kconfig:
- @if [ -L menuconfig.config ]; then \
- rm -f menuconfig.config; \
- if [ -e .mconfig.config -a -e .boardconfig.config -a -e .menuconfig.config ]; then \
- mv .mconfig.config mconfig.config; \
- mv .boardconfig.config boardconfig.config; \
- mv .menuconfig.config menuconfig.config; \
- else \
- echo 'Sorry, unable to restore thoes files'; \
- echo ' mconfig.config, boardconfig.config, menuconfig.config'; \
- echo 'please update them from SVN!'; \
- fi; \
- fi
- xcfg: rebuild_kconfig
- ifdef Xn
- @./tools/xcfg.pl -o $(Xn) mconfig.config boardconfig.config menuconfig.config
- else
- @./tools/xcfg.pl -o x.cfg mconfig.config boardconfig.config menuconfig.config
- endif
|