![]() ![]() OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c)) Here's the Makefile I like to use for C source. If you're interested in figuring that out, I hope I've given you a good start on that. I tried to make this as simple as possible by omitting variables like $(CC) and $(CFLAGS) that are usually seen in makefiles. Thus, to improve: HEADERS = program.h headers.h ![]() However, to support more C files, you'd have to make new rules for each of them. (bear in mind that make requires tab instead of space indentation, so be sure to fix that when copying) Interesting, I didn't know make would default to using the C compiler given rules regarding source files.Īnyway, a simple solution that demonstrates simple Makefile concepts would be: HEADERS = program.h headers.h ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |