Back to the table of contents

Previous      Next

Building on Linux

(If you want to build the bleeding-edge version, click here for instructions to get the latest source from our Git repository.)

  1. Install g++ and make (if they are not already installed).
    If you use Debian or Ubuntu, this command will do it:
    	sudo apt-get install g++ make
    
    If you use Red Hat or Fedora, I think the command is:
    	sudo yum install g++ make
    

  2. Change to the source folder:
    	cd waffles/src
    

  3. Next, build and install the Waffles tools:
    	sudo make install
    
    To uninstall:
    	sudo make uninstall
    
    If you only want to build optimized binaries, but not install them:
    	make opt
    

  4. There are also some additional tools and demo apps that are not built by default because they require some dependency libraries. If you want to build these, install:
    Debian/Ubuntu       Red Hat/Fedora
    libpng12-devlibpng-devel
    libjpeg8-devlibjpeg-devel
    libsdl1.2-devSDL-devel
    freeglut3-devfreeglut-devel
    libx11-devX11-devel
    Then, to build the additional tools:
    	cd waffles/src/depends
    	sudo make install
    

    To build the demo apps:
    	cd waffles/demos
    	make opt
    
    (Some of the demos do not require any dependencies. If you prefer, you can install the dependencies only as needed.)



Using CMake instead of Gnu Make

If you prefer to use CMake, you can:

  1. Install CMake. (sudo apt-get install cmake)
  2. cd waffles/src
  3. cmake .
  4. make

(Disclaimer: The Waffles developers are currently more familiar with Gnu Make than CMake, so our CMakeLists.txt files may not be as polished as they should be. For example, they do not currently install the binaries after building them. If any CMake experts out there want to help polish these up, that would be appreciated.)




Troubleshooting

How do I build optimized binaries?
make opt


How do I build binaries with debug symbols?
make dbg


I get build errors that look something like this:
		../../obj/GClasses/dbg/GError.d:3: warning: overriding commands for target `GError.o'
		../../obj/GClasses/opt/GError.d:3: warning: ignoring old commands for target `GError.o'
	

Try doing "make clean". That always fixes it for me. This is caused by a synchronization issue with generating the dependency (.d) files. Unfortunately, the solution would require adding locking mechanisms to the build process, which would require additional build dependencies, which would be worse than the problem it solves. So, just do "make clean", and the problem will go away.


Where can I get more specific help?
You can ask a question at our forum. If you post a question and you do not get a speedy response, please email me. Sometimes the email that is supposed to notify me that there is a new forum post is incorrectly classified as spam and discarded. My email address is on the main page.


Why isn't Waffles in the apt-get/yum repositories?
There's a lot of red-tape involved in getting an app into those repositories, and I'm too busy developing Waffles to bother with it. If you would like to become a package maintainer and do it, that would be a great contribution, and I would really appreciate it.


How do I change the installation target directory?
Just change the "INSTALL_LOCATION_" variables at the top of waffles/src/Makefile.


How do I build Waffles on a machine where I do not have sudo or root permissions?
Just do "make opt" instead of "sudo make install". This will build everything, but will not install it. You can run the binaries right out of the bin folder. Alternatively, you could change the install location as described in the previous question.


Why do you include the build dependencies for Windows, but not for Linux?
It is easy for Linux developers to get the dependencies from package repositories. This method is superior anyway because you get the latest versions. Windows users often require a little extra hand-holding, so I have made it extra convenient for them at the cost of linking to outdated libraries, etc.


How do I debug a Waffles app with KDevelop?
In KDevelop4, go to "Project->Open/Import Project". Choose the Makefile for the app you want to debug. Next, go to "Run->Configure Launches". Click on the name of the app. Click on the green plus sign. Specify the right executable binary. (The executable binary is in the bin folder, not the src folder. Use the binary that ends with "dbg". The one that doesn't end with dbg is the optimized one. If you do not see a binary that ends with "dbg", then you need to go into the "src" folder and do "make dbg".)



Previous      Next

Back to the table of contents