main: main.o print.o credits.o hello.o
gcc -o main main.o print.o credits.o hello.o
main.o: main.c hello.h
gcc -c -o main.o main.c
print.o: print.c hello.h
gcc -c -o print.o print.c
credits.o: credits.c hello.h
gcc -c -o credits.o credits.c
hello.o: hello.h
gcc -c -o hello.o hello.h
使用 make 命令时出现此错误
/usr/bin/ld:hello.o: file format not recognized; treating as linker script
/usr/bin/ld:hello.o:1: syntax error
collect2: error: ld returned 1 exit status
make: *** [main] Error 1