Compile multiple C files with make

Posted by Mohit Deshpande on Stack Overflow See other posts from Stack Overflow or by Mohit Deshpande
Published on 2010-04-09T00:39:21Z Indexed on 2010/04/09 0:43 UTC
Read the original article Hit count: 231

Filed under:
|
|
|
|

(I am running Linux Ubuntu 9.10, so the extension for an executable is executablefile.out) I am just getting into modular programming (programming with multiple files) in C and I want to know how to compile multiple files in a single makefile. For example, what would be the makefile to compile these files: main.c, dbAdapter.c, dbAdapter.h? (By the way, If you haven't figured it out yet, the main function is in main.c) Also could someone post a link to the documentation of a makefile?

© Stack Overflow or respective owner

Related posts about compile

Related posts about make