LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-01-2002, 05:39 AM   #1
boku
Member
 
Registered: Aug 2002
Location: Sweden
Distribution: Gentoo
Posts: 43

Rep: Reputation: 15
/usr/local/games/datadir?


How can I let my game know its datadir?

I utilize the usual automake procedure, although I don't yet fully understand it. I suppose I should add something similar to this somewhere:

AC_DEFINE_UNQUOTED(DATADIR, "$DATADIR", [Data directory])

... and find the answer config.h?

thx!
 
Old 11-27-2002, 08:34 AM   #2
boku
Member
 
Registered: Aug 2002
Location: Sweden
Distribution: Gentoo
Posts: 43

Original Poster
Rep: Reputation: 15
I found the answer myself! Yay!
Out of sheer kindness, I will share my discovery with the world!


Add this to your Makefile.am and expect to find the complete path to your data in the DATADIR constant:

CPPFLAGS = @CPPFLAGS@ -DDATADIR=\"$(pkgdatadir)\"
 
  


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
Starting httpd: /usr/sbin/httpd: symbol lookup error: /usr/local/lib/libaprutil-0.so. bijuhpd Linux - Newbie 1 10-30-2005 05:07 PM
/usr vs /usr/local on linuxpackages.net merchtemeagle Slackware 4 10-18-2005 03:09 PM
path in services wrong for clamav updated frm 0.75 to 0.80 usr/bin vs usr/local/bin Emmanuel_uk Linux - Newbie 3 04-22-2005 01:02 AM
Installing software, /usr/lib directory and /usr/local millertime Linux - Software 2 07-10-2004 09:21 AM
Why /usr/X11R6 before /usr/local? Griffon26 Linux - Software 2 07-18-2002 06:46 PM

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

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