Wednesday, July 07, 2010

how to use make

from gnu make website:

Make is a tool which controls the generation of executables and other non-source files of a program from the program's source files.


to use make we simply create a file named Makefile, and fill it with content like this

*replace [tab] with actual tab

target: dependencies ...
[tab]system command


for example we want to create a make file to build a java program using javac * in a directory
and also want to run it by java Hello command

we can create the Makefile like this


compile:
[tab]javac *.java
run
[tab]java Hello

No comments:

Post a Comment