开发者

How to create a makefile from a C program?

开发者 https://www.devze.com 2023-01-21 00:14 出处:网络
Hiya, as part of an assessment开发者_Go百科 I have to hand in a code which requires a few non-standard libraries.In order to save submitting the header files and the code I would like to form a \'make

Hiya, as part of an assessment开发者_Go百科 I have to hand in a code which requires a few non-standard libraries. In order to save submitting the header files and the code I would like to form a 'makefile' with the code and required add-ons sort of 'bundled' together. I have absolutely no idea idea how to go about doing this though and any suggestions would be greatly appreciated!


A makefile does not look to be what you are looking for. You cannot bundle things into a makefile. Think of a makefile as a file accompanying your source and header files that will contain the recipe. It will tell how to build your program using all the other files.


Without knowing specifics, I can only point you in the right direction. This site, although not very pleasing to the eye, is fairly easy to understand:

Makefile Tutorial

This is the GNU manual page for 'make'


Just package your source code and list the requirements in a description somewhere.

For example:

To use my program you need the curses library.

Let the responsability of getting/installing/configuring the required libraries be with the user of your source.

0

精彩评论

暂无评论...
验证码 换一张
取 消