# $Id: Makefile.common,v 1.1.1.1 2003/09/03 12:45:36 chneuman Exp $ # # Makefile common declarations # Edit as appropriate... # # WARNING: "ifeq" is a GNU gmake instruction! # On solaris 2.X, using /usr/ccs/bin/make instead creates an error: # "Unexpected end of line seen" ###### OS Dependant Variables ###### # edit as appropriate... # Which OS ? # # automatic system detection... # NB: command shell replaces back quotes of script shells # SYSTEM = $(shell uname -s) ifeq (${SYSTEM},Linux) OS = linux endif ifeq (${SYSTEM},SunOS) OS = solaris endif ifeq (${SYSTEM},FreeBSD) OS = freebsd endif # # and the old way (e.g. if the above lines do not work!) # #OS = linux #OS = solaris #OS = freebsd # Do you want/need extended memory debugging? # uses mpatrol which must be installed on your system # http://www.cbmamiga.demon.co.uk/mpatrol/index.html # MPATROL=no #MPATROL=yes # OS specific variables and tools # ifeq (${OS},linux) OSFLAGS = -DLINUX # Which compiler? # NB: use -Wall for compilation warnings with gcc # CC = g++ -Wall LD = g++ -Wall endif ifeq (${OS},solaris) # NB: __EXTENSIONS__ needed by Solaris 2.5.1 # OSFLAGS = -DSOLARIS -D__EXTENSIONS__ OSFLAGS = -DSOLARIS # Which compiler? # Prefer SUN's compiler (gcc created problems with readdir # because of confusions with the UCB readdir version) # CC = /opt/SUNWspro/bin/CC LD = /opt/SUNWspro/bin/CC endif ifeq (${OS},freebsd) OSFLAGS = -DFREEBSD -I${LOCALBASE}/g++ -I${LOCALBASE}/c++/3.3 # Which compiler? # NB: use -Wall for compilation warnings with gcc # CC = g++ -Wall LD = g++ -Wall endif # Which associated tools ? AR = ar RANLIB = ranlib DEPEND = makedepend