Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7441249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:58:51+00:00 2026-05-29T10:58:51+00:00

I am a rather new C++ programmer. I have made a very simple game

  • 0

I am a rather new C++ programmer. I have made a very simple game using SDL libraries. My game, naturally, uses some images, sounds and fonts. I have wanted to make a distribution of the package, where user’s can configure && make . It’s not like this simple game is worth distributing, but I want to learn how autoconf and automake works. I searched for the examples around the internet but tutorials I could find shows only installation of a simple helloworld program. They neither talk about installation of data files, nor how to check for if certain libraries exists so that I could link against them in compile time. And also, my program should know where each file get installed so that it can load them. I have delved into automake and autoconf manuals, but they are more like a reference materials than being a resource for new comers. Could anyone briefly explain this concepts, or lead me to some place where I could read about them.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:58:52+00:00Added an answer on May 29, 2026 at 10:58 am

    I have made some research on this, and I have wanted to share what has worked for me. I have created a directory structure like this:

    /
    |->src/
    |   |-> Makefile.am
    |   |-> main.cpp
    |   |-> functions.cpp
    |
    |-> data/
    |   |-> Makefile.am
    |   |-> somethings.png
    |   |-> something.mp3
    |-> configure.ac
    |-> README
    |-> NEWS, AUTHORS etc. etc.
    

    I have put all my images, fonts, sounds etc. in data folder. Makefile.am on data folder looks like this:

    pkgdata_DATA = esound.wav \
                   another.wav \
                   apicture.png
    

    It simply lists all the files that need to be end up in the data directory. The Makefile.am in the src folder look like this:

    bin_PROGRAMS = mygame
    mygame_SOURCES = main.cpp functions.cpp
    AM_CPPFLAGS = -DDATADIR=\"$(pkgdatadir)\"
    

    The important part here is AM_CPPFLAGS, which defines DATADIR macro, according to the options passed to the configure script. So then we can use this macro in our source files like this:

    background = load_image( DATADIR "/background.png");
    

    So that your program will get compiled knowing where background file should reside in the filesystem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm rather new to Django and I'm using Django 1.0. I have this: forms.py:
i am very new to ios development, rather i have just started work on
I am rather new to VIM. I got some source code and this is
I have a request for some contract work from an organization that uses Excel
I'm rather new to Groovy, and recently created a canned message using a Map
I'm rather new to bash and a few others, and I have looked online
Im rather new to python but I have been attemping to learn the basics.
I am rather new to socket programming but here goes nothing. I have been
everybody! I have a new question about Kohana 3, or rather about a module
I'm a C++ programmer and have a need to set up some UDP communications

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.