c - recipe for target 'all' failed on Ubuntu 15.10 64-bit -
1) program works if type each command on terminal gcc -o file1 file1.c && gcc file2.c -lm -o file2
, , ./file1 someargs ./file2 someargs
2) works if type in terminal: make rst , make res
3) not working typing make
in terminal
makefile:
all: check default: check clean: rm -rf file1 file2 rst: gcc -o file1 file1.c && gcc file2.c -lm -o file2 res: ./file1 someargs ./file2 someargs check: make clean make rst make res
also tried:
all: check default: check clean: rm -rf file1 file2 rst: gcc -o file1 file1.c && gcc file2.c -lm -o file2 res: ./file1 someargs ./file2 someargs check: clean rst res
and other combinations or without make
. same error:
make: check: command not found makefile:2: recipe target 'all' failed make: *** [all] error 127
the first target all
trying run command called check
(and target default
). think want command make
behave same command make check
, perform actions of target called check
in makefile. in case, add dependency this:
all: check default: check clean: rm -rf file1 file2 rst: gcc -o file1 file1.c && gcc file2.c -lm -o file2 res: ./file1 someargs ./file2 someargs check: make clean make rst make res
Comments
Post a Comment