makefile

来自「一个功能强大的神经网络分析程序」· 代码 · 共 74 行

TXT
74
字号
# This makefile is on purpose not made with configure, to show how to use the library# The make file requires that the fann library is installed (see ../README)GCC=gccTARGETS = xor_train xor_test xor_test_fixed simple_train steepness_train simple_test robot mushroomDEBUG_TARGETS = xor_train_debug xor_test_debug xor_test_fixed_debugall: $(TARGETS)%: %.c Makefile	$(GCC) -O3 -lm -lfann $< -o $@%_fixed: %.c Makefile	$(GCC) -O3 -lm -lfixedfann -DFIXEDFANN $< -o $@clean:	rm -f $(TARGETS) $(DEBUG_TARGETS) xor_fixed.data *.net *~runtest: $(TARGETS)	@echo	@echo Training network	./xor_train	@echo	@echo Testing network with floats	./xor_test	@echo	@echo Testing network with fixed points	./xor_test_fixed#below this line is only for debugging the fann libraryrundebugtest: $(DEBUG_TARGETS)	@echo	@echo Training network	./xor_train_debug	@echo	@echo Testing network with floats	./xor_test_debug	@echo	@echo Testing network with fixed points	./xor_test_fixed_debug#compiletest is used to test whether the library will compile easily in other compilerscompiletest:	gcc -O3 -ggdb -lm -DDEBUG -Wall -Wformat-security -Wfloat-equal -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare -pedantic -ansi -I../src/ -I../src/include/ ../src/floatfann.c xor_train.c -o xor_train	gcc -O3 -ggdb -lm -DDEBUG -Wall -Wformat-security -Wfloat-equal -Wshadow -Wpointer-arith -Wcast-qual -Wsign-compare -pedantic -ansi -DFIXEDFANN -I../src/ -I../src/include/ ../src/fixedfann.c xor_test.c -o xor_test	g++ -O3 -ggdb -lm -DDEBUG -Wall -Wformat-security -Wfloat-equal -Wpointer-arith -Wcast-qual -Wsign-compare -pedantic -ansi -I../src/ -I../src/include/ ../src/floatfann.c xor_train.c -o xor_traindebug: $(DEBUG_TARGETS)%_debug: %.c Makefile ../src/*c ../src/include/*h	$(GCC) -O3 -ggdb -lm -DDEBUG -Wall -ansi -I../src/ -I../src/include/ ../src/floatfann.c $< -o $@%_fixed_debug: %.c Makefile	$(GCC) -O3 -ggdb -lm -DDEBUG -Wall -ansi -DFIXEDFANN -I../src/ -I../src/include/ ../src/fixedfann.c $< -o $@rundebug: $(DEBUG_TARGETS)	@echo	@echo Training network	valgrind --leak-check=yes --show-reachable=yes --leak-resolution=high ./xor_train_debug	@echo	@echo Testing network with floats	valgrind --leak-check=yes --show-reachable=yes --leak-resolution=high ./xor_test_debug	@echo	@echo Testing network with fixed points	valgrind --leak-check=yes --show-reachable=yes --leak-resolution=high ./xor_test_fixed_debug

⌨️ 快捷键说明

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