makefile

来自「fsmlabs的real time linux的内核」· 代码 · 共 50 行

TXT
50
字号
SOURCE:=$(shell (ls *.c))MODULES=$(shell for i in `ls *.c | awk -F. '{print $$1}' `; do echo $$i".o" ; done )MODNAMES=$(shell for i in `ls *.c | awk -F. '{print $$1}' `; do echo $$i; done )include ../../../../rtl.mkclean:	rm -f *.oall: 	$(MAKE) $(MODULES)help:	@echo "/***************************************************************/"	@echo "/*  Open POSIX test suite addapted to RTLinux.                 */"	@echo "/***************************************************************/"	test: all help	@echo "First we remove any existing rtl-modules"	@echo "You may see error warnings from \"make\" - ignore them"	@echo "Type <return> to continue"	@read junk	-rmmod sound	-rmmod rt_process	-rmmod frank_module	-(for i in $(MODNAMES) ; do rmmod $$i ; done)	 		(cd ../../../../; scripts/rmrtl)	@echo "Now insert the fifo and scheduler"	@echo "Type <return> to continue"	@read junk	(cd ../../../../; scripts/insrtl)	@echo "Now start the real-time test tasks modules"	@echo "Type <return> to continue"	@read junk	@dmesg -c	(for i in $(MODNAMES) ; do \	echo ">------------------------------------------<" ; \	echo "          TESTING "$$i".o MODULE            " ; \	echo ">------------------------------------------<" ; \	cat $$i.c | awk '{ if ( $$1 == "*" ) print $0 }' ; \	insmod $$i.o; \	echo "Sleeping for 2 seconds" ; \	sleep 2 ; \	echo ">------------------------------------------<" ; \	echo "               TEST RESULTS:                " ; \	echo ">------------------------------------------<" ; \	dmesg -c ;\	rmmod $$i ; \	dmesg -c ; \	echo "Type <return> to continue" ; \	read junk ; \	 done)include ../../../../Rules.make

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?