The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Compiling Unix utils

Contributed by: Anon
This tip is valid for: Both BeOS and Haiku

Ever download an archive full of code, follow the instructions to type “make” at the command line… and get absolutely nowhere? It may be because the OS referred to in the Makefile is referencing a target OS other than BeOS, or because its referencing the wrong compiler for your platform.

Look in the same directory for a file called “Makefile.” Open the Makefile in a text editor and look for lines near the top that look like this:

CC = gcc
OS = UNIX

These lines may not be right next to each other, but they should both be near the top somewhere. Edit them so they reference the right operating system and compiler instead:


CC = cc
OS = BEOS

On BeOS/x86, either cc or gcc should work on the compiler line. If you’re using BeOS/PowerPC, you may need to change this to
mwcc.

Save the file and run “make” again — you should be golden.

Posted in Miscellaneous


(comments are closed).