LinuxSA Mailing list archives

Index: [thread] [date] [subject] [author]
  From: Glen Turner <glen.turner@adelaide.edu.au>
  To  : Michael Ivery <michaeli@pharm.usyd.edu.au>
  Date: Wed, 12 May 1999 12:18:59 +0930

Re: Compiling source

> Michael Ivery wrote:
> 
> I have source for a program that I wish to compile under Redhat 6.  The make file is also provided but is setup for other architectures, SGI, HP, alpha etc.  Lokks like I have to change values of variable such as CFLAGS, LINT and others  how do I
> determine appropriate values for Linux on pentium III any advice appreciated.


A good starting point is to comment out all the settings.

The `make' program will set most of the correctly by default.
See the make info page.

A good initial setting for CFLAGS is

  CFLAGS=-g

which enables debugging support.

For the final pre-installation compile, set it to:

  CFLAGS=-O2 -s

which does reasonable optimisation and strips unnecessary
clutter from the executable.

The resulting compile command line printed by make should
look like:

cc -c -O2 -s fred.c

and the link command line will look like:

cc -O2 -s -o fredsystem fred1.o fred2.o fred3.o

-- 
 Glen Turner                               Network Specialist
 Tel: (08) 8303 3936          Information Technology Services
 Fax: (08) 8303 4400         The University of Adelaide  5005
 Email: glen.turner@adelaide.edu.au           South Australia

-- 
Check out the LinuxSA web pages at http://www.linuxsa.org.au/
To unsubscribe from the LinuxSA list:
  mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject


Index: [thread] [date] [subject] [author]
Return to the LinuxSA Mailing List Information Page