Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
A makefile is a file that contains instructions
for tools to do repetitive tasks on files, when
involved repeatedly it will only touch files
that have a newer date than their related
resulting file. I.e. gcc test.c -o test in a makefile
will only execute gcc if you modified the
source after you last compiled it.
rofl, the equivilent of a batch from dos is a shell script, makefile is differnet, but at basic level I cannot say you are wrong...
you do not execute a makefile, it is called from another executable.
first off see if there is a file called "configure" in the directory with the makefile, if so type:
./configure
when that is finished or if there is not one type this:
make
that will call the makefile and compile the software.
then to install type:
make install
that calls the makefile section for installing the program.
And no, it's not like a batch. It's way
smarter :} and serves a completely
different purpose. It's primarily targeted
at programmers, to cut down on compile
times by only recompiling things that
have been modified.
You call it Makefile (no extension)
and you invoke it by typing make<ENTER>
does this means a single directory can have only one makefile..
to create a makefile i should just put the commands to be executed in a file called makefile
and just call make from the promt in the same directory...
consider the following makefile for compiling the kernel module i'm learnimg to write
(taken from a tutorial frm tldp.org)
Originally posted by linorg
does this means a single directory can have only one makefile..
No, just the invocation gets more complex :)
if you called your makefile
my_makefile.txt
you'd invoke it with
make -f my_makefile.txt
Quote:
from man make
Code:
make executes commands in the makefile to update one or
more target names, where name is typically a program. If
no -f option is present, make will look for the makefiles
GNUmakefile, makefile, and Makefile, in that order.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.