LinuxQuestions.org
Visit Jeremy's Blog.
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-03-2007, 04:00 PM   #1
Aegon
LQ Newbie
 
Registered: Dec 2007
Location: Portland, OR
Distribution: AIX, OS X, Ubuntu, etc.
Posts: 3

Rep: Reputation: 0
Makefile includedir problem


I'm trying to build a game called "Crack Attack!". My GL library, however, isn't in the standard location. So I configure with --prefix=/'location to my stuff'

Then I run make and it barfs. It doesn't know where to look for include files. Turns out that the makefile generated in the src directory doesn't inherit includedir from the parent directory, so I modify src/Makefile.in to:
Code:
INCLUDES = -DNDEBUG -DDATA_DIRECTORY='"${pkgdatadir}/"' -I$(includedir)
The Blue stuff is what I added.

It definitely changes the output, but the problem is now this:

Code:
In file included from <include dir>/GL/glut.h:17,
                 from Attack.cxx:26:
<include dir>/GL/freeglut_std.h:114:19: error: GL/gl.h: No such file or directory
So the problem is that glut.h doesn't know to look for gl.h in its own directory.

Any pointers?
 
Old 12-03-2007, 05:52 PM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by Aegon View Post
I'm trying to build a game called "Crack Attack!". My GL library, however, isn't in the standard location. So I configure with --prefix=/'location to my stuff'

Then I run make and it barfs.
The "--prefix" option is used to tell the install target where to put the files during installation. The default is "/usr/local". If you want to put them in "/opt" or even "/usr", you use the "--prefix" option.

Quote:
Originally Posted by Aegon View Post
It doesn't know where to look for include files. Turns out that the makefile generated in the src directory doesn't inherit includedir from the parent directory, so I modify src/Makefile.in to:
Code:
INCLUDES = -DNDEBUG -DDATA_DIRECTORY='"${pkgdatadir}/"' -I$(includedir)
The Blue stuff is what I added.

It definitely changes the output, but the problem is now this:

Code:
In file included from <include dir>/GL/glut.h:17,
                 from Attack.cxx:26:
<include dir>/GL/freeglut_std.h:114:19: error: GL/gl.h: No such file or directory
So the problem is that glut.h doesn't know to look for gl.h in its own directory.

Any pointers?
Undo all your changes. If I were you, I would just delete the directory and untar the tarball again. Then do the following
# COPTS=-I/path-to-GL-headers ./configure
That will tell the configure script to add the path to your GL headers to its include file search path. That should fix your problem.
 
Old 12-03-2007, 06:32 PM   #3
Aegon
LQ Newbie
 
Registered: Dec 2007
Location: Portland, OR
Distribution: AIX, OS X, Ubuntu, etc.
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the reply, David1357. I tried your suggestion, unfortunately it had no effect.

The additional variable makes no effect on either Makefile or src/Makefile following the configure step. So it does not affect the make process and it produces output as if I never entered the variable at all.

Perhaps the make system employed by the fine people at Crack Attack! isn't aware of the usual variables, and overwrites or ignores them.
 
  


Reply

Tags
makefile


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
makefile problem sancho1980 Linux - General 9 08-06-2007 08:22 AM
problem with Makefile shifter Programming 1 07-27-2007 04:31 AM
Makefile Problem nelnel Programming 4 07-08-2005 02:31 AM
how to get (makefile -f makefile )output into the textview widget in Pygtk sailu_mvn Programming 3 02-28-2005 03:57 AM
generate Makefile from Makefile.in without calling ./configure ? chris78 Programming 2 05-02-2004 12:23 PM


All times are GMT -5. The time now is 07:04 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration