LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-26-2006, 01:35 PM   #1
introuble
Member
 
Registered: Apr 2004
Distribution: Debian -unstable
Posts: 700

Rep: Reputation: 31
Create configure script, makefile etc.


Ok .. so I've created my program which is "scattered" in various source files in various directories. Language: C. Let's assume I've been building it by compiling every single source file with:

Code:
gcc -O2 -c file.c -o file.o
and then linking all the objects together in a final executable. How do I go from that to a simple:

Code:
./configure && make && make install
?
 
Old 07-26-2006, 01:55 PM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Do you really want configure? read info make - for your purpose it's enough..
 
Old 07-26-2006, 02:19 PM   #3
crazyjimbo
Member
 
Registered: Mar 2006
Location: Edinburgh
Distribution: Debian Etch, Gentoo
Posts: 90

Rep: Reputation: 16
If it is just a simple package, you can probably hand write a makefile. The GNU Manual should explain things well enough: http://www.gnu.org/software/make/manual/make.html

However, to get the
Code:
 ./configure && make && makeinstall
format, you'd be best using a suite of tools called GNU Autotools, which include autoconf and automake to generate the configure script and makefile. A tutorial I found useful for these is here: http://www.seul.org/docs/autotut/

Good Luck!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
configure doesn't create a Makefile (with anjuta) crashmakerMX Programming 5 06-24-2005 04:48 PM
Create a script to configure my printer snay Linux - Newbie 2 04-26-2005 10:35 AM
How to create a Kernel 2.6 Makefile 7.e.Q Programming 1 11-03-2004 07:47 AM
Create my own configure and Makefile Ephracis Linux - Software 1 10-11-2004 08:00 PM
generate Makefile from Makefile.in without calling ./configure ? chris78 Programming 2 05-02-2004 12:23 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:50 PM.

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