Support you have a C program included by some files, and some one is consisted by some others, so as follows:
----------------------------------------
File | Included files
----------------------------------------
main.c | stdio.h, table.h
----------------------------------------
list.c | list.h
----------------------------------------
symbol.c | symbol.h
----------------------------------------
table.c | table.h
----------------------------------------
table.h | symbol.h, list.h
----------------------------------------
please help me to create a makefile, thank you very much! This is my Makefile, but there is a problem? who can debug these problems, thanks!
hello: main.o table.o
gcc main.o table.o -o hello
main.o: main.c table.h
gcc -c main.c
table.o: table.c table.h
gcc -c table.c
symbol.o: symbol.c symbol.h
gcc -c symbol.c
list.o: list.c list.h
gcc -c list.c
clean:
rm hello *.o