LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-07-2005, 11:07 PM   #1
markw8500
Member
 
Registered: Jul 2005
Posts: 104

Rep: Reputation: 15
How to use make? and makefile?


I am trying to install some software and I have to use the make command. I never did this and its not going very well. From what I have found I think I have to write a makefile... I found some samples, but I am still unsure of myself.... I was wondering if anybody has any experience with this and would like to share it...
 
Old 08-07-2005, 11:12 PM   #2
oblivious69
Member
 
Registered: May 2005
Distribution: debian
Posts: 79

Rep: Reputation: 15
if you are installing something you downloaded, you shouldn't have to write the makefile itself. You should be able to type "./make" in the source directory where you untarred the file.
 
Old 08-07-2005, 11:18 PM   #3
markw8500
Member
 
Registered: Jul 2005
Posts: 104

Original Poster
Rep: Reputation: 15
really... I will give that a shot... Thanks
 
Old 08-07-2005, 11:18 PM   #4
dimsum
LQ Newbie
 
Registered: Jul 2005
Posts: 21

Rep: Reputation: 15
It's common to run ./configure before ./make . The configure stage can discover what kind of environment you have, and automatically create an appropriate makefile.

It's also common to find a README.Install file and various other READMEs which give helpful information.
 
Old 08-08-2005, 12:37 AM   #5
mani_iips
LQ Newbie
 
Registered: Jul 2005
Location: Indore, India
Posts: 20

Rep: Reputation: 0
there are two kinds of PACKAGES available to install any kind of application:
1. RPM packages
2. Source packages (TAR files).

1.In case of RPM we dont have to take any kinda trouble its a fully user friendly package which can be easily installed by using
Code:
rpm -i package-name
2.In source package we get the full source code for the respective application and we have to install it directly from the source code for which we have certain files in the package itself. Installing from source consists of these steps:
a) copy the package in a desired (any) directory, and extract it
Code:
                tar -xvzf  *.tar.gz
               OR
                tar -xjf  *.tar.bz2
b) this will extract the files in a new directory (within the same path), now u need to compile and install these files, u can also read the README or INSTALL file in the extracted directory.
Code:
cd (directory in which extracted)
c)
Code:
rpm -i package-name
this will check if the files necessary for installation are available

d)
Code:
make
this will compile the package

e)
Code:
make install
will install the executable in /usr/local/bin

Now your software is installed and u can run it.


Hope it helped you.
 
Old 08-08-2005, 07:39 AM   #6
markw8500
Member
 
Registered: Jul 2005
Posts: 104

Original Poster
Rep: Reputation: 15
wow... thanks alot...

The only thing is when i use the ./make or the ./configure I get:

"make: *** No target specified and no makefile found. Stop.

I dont know... I found some other ways to do this, I guess installing the Netzero.deb is a common problem.
 
Old 08-08-2005, 11:39 AM   #7
NCappaZoo
LQ Newbie
 
Registered: Aug 2003
Location: Queens, New York, U.S.
Distribution: Linux From Scratch
Posts: 25

Rep: Reputation: 15
Well the configure file resides in sources directory so a ./configure will work to execute configure, but a ./make shouldn't work because the make binary doesnt reside in the source directory your in. It should be within your PATH variable so if you wanted to start make it would either be make or something like ./usr/bin/make. You should not have to use the latter.
 
Old 08-08-2005, 02:27 PM   #8
rstewart
Member
 
Registered: Feb 2005
Location: Sunnyvale, CA
Distribution: Ubuntu
Posts: 205

Rep: Reputation: 38
Hi,

Quote:
wow... thanks alot...

The only thing is when i use the ./make or the ./configure I get:

"make: *** No target specified and no makefile found. Stop.

I dont know... I found some other ways to do this, I guess installing the Netzero.deb is a common problem.
The make utility requires a data file (the make file) to tell it what needs to be done. That file can either be specified as a command line argument to the make utility, or if unspecified, will default to looking for a file called "makefile" or "Makefile". If both "makefile" and "Makefile" exist in the same directory, then the make utility will use the "makefile" make file. The make error message was informing you that it could not either of the default makefiles.
 
Old 08-08-2005, 08:18 PM   #9
zhy2111314
Member
 
Registered: Aug 2005
Location: China
Distribution: redhat(Fedora Core)->Debian Sid->Slackware
Posts: 91

Rep: Reputation: 15
maybe u should read the "README.txt" or something like this to find the way to install the software
 
Old 08-08-2005, 08:51 PM   #10
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938Reputation: 3938
Sit back, have a good cup of coffee, and familiarize yourself a little with what you are trying to accomplish before you keep banging yourself against the (futile) effort of attempting to do what you do not yet fully understand. And, trust me, I say this in the kindest tone of voice possible. Been there, done that. You are, and I say this politely, wasting your time now, and it's time to fall-back and regroup. And please don't feel the slightest-bit awkward, embarrassed, or unique.

Re-read the installation instructions for whatever piece of software you are trying to install. If it's clear-as-mud, why not contact the vendor. You're not the first one, and why lose your own hair over something that others have already given up some many hair-follicles for? Specific questions, asked here, will also be swiftly answered. (Umm, probably by bald-people. ...)

In most Linux software, unless there is a "package" that you must install, the usual process is the command ./configure followed by ./make. The first step constructs a "Makefile," which is the sequence of commands that need to be performed; the second step executes them. After the package has been successfully built, the usual command to install it is ./make install.
 
Old 08-08-2005, 09:07 PM   #11
markw8500
Member
 
Registered: Jul 2005
Posts: 104

Original Poster
Rep: Reputation: 15
I see you understand my pain... Contacting the vendor is the next step on my list...
 
Old 08-08-2005, 10:21 PM   #12
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Aldso, you should type make, not ./make ... unless your make executable happens to be residing in the current working directory (it almost certainly isn't).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Makefile and make depend Meaculpa Programming 4 03-06-2009 11:24 AM
How do we make MakeFile...? asahlot Programming 1 10-17-2005 02:25 PM
how 2 make a makefile? beginner_84 Programming 6 08-29-2004 02:47 PM
invoke makefile: make invasian Linux - Newbie 2 08-08-2004 01:52 AM
How to Make a Makefile for KDevelop 2.0 ??? shassouneh Programming 7 03-15-2002 01:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration