LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 12-23-2013, 04:05 AM   #1
Stragonian
Member
 
Registered: Dec 2003
Location: Indiana
Distribution: Slackware & PassionX
Posts: 102

Rep: Reputation: 34
A Good GNU Build System Guide


I recently finished writing a function, and small test app, I can manually compile the function into a shared library, and compile the test binary against it, but since I've never used libtools I'd like to figure out how to do it using libtools.

All the tutorials use a hello.c or really complicated examples. So I'm stuck with too simple or too complex. I only have three files: file.h -> function prototype, file.c -> function definition, and main.c -> code for the test application.

My goal is to be able to do a ...
Code:
./configure
make
make install
type of solution on it.
And place the binary in the /usr/bin, the header file in /usr/include, and the shared library in /usr/lib(64)
I would be greatful for any help - Thank You
 
Old 12-24-2013, 03:57 AM   #2
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
The best place I know to start:
https://www.flameeyes.eu/autotools-m...ter/index.html
Apparently the fellow is or was a contributor to the project. Otherwise, you just have to study what others have done -I know how hard it is to find medium-scope projects using autotools.
 
2 members found this post helpful.
Old 12-26-2013, 02:35 PM   #3
hoholala
LQ Newbie
 
Registered: Sep 2013
Distribution: Parabola GNU/linux-libre
Posts: 13

Rep: Reputation: Disabled
See: http://www.gnu.org/software/hello/ for an example on how to use the GNU build system.
 
Old 12-26-2013, 02:47 PM   #4
metaschima
Senior Member
 
Registered: Dec 2013
Distribution: Slackware
Posts: 1,982

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
For simple builds you can write your own makefile. For more complex builds people are switching to cmake as it does simplify things for the developer.
 
Old 12-27-2013, 12:52 AM   #5
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
I was just playing around yesterday and saw the autoscan command which will generate a prelimiary configure.ac for you. Then all you need is the Makefile.am
I don't really agree about cmake -I find it even more opaque than autotools.
 
  


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
Selectioning GNU or SunStudio build system Alexvader Solaris / OpenSolaris 4 03-23-2011 11:47 AM
"rolling release" with GNU build system??? jpheber Linux - Software 2 08-24-2010 12:28 AM
GNU Build System and Libraries orwb Programming 1 12-06-2007 01:09 PM
LXer: A guide to GNU Screen LXer Syndicated Linux News 1 09-28-2007 07:40 AM
LXer: A guide to using PDFs on GNU/Linux LXer Syndicated Linux News 0 06-07-2007 10:16 AM

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

All times are GMT -5. The time now is 07:20 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