# make.env
# Common makefile settings for wxWindows programs
# This file is included by all the other makefiles, thus changes 
# made here take effect everywhere (except where overriden).
#
# An alternative to editing this file is to create a shell script
# to export specific variables, and call make with the -e switch
# to override makefile variables. See wx/install/install.txt.
# And you can override specific variables on the make command line, e.g.
#
# make -f makefile.unix DEBUG=''
#

########################## Compiler ##################################

# C++ compiler
# For AIX/CSet++: use CC = xlC
CC = g++
#CC = CC

# C compiler for pure C programs
# Typical: CC=g++ , CCC=gcc
#          CC=cl386 /Tp, CCC=cl386
#
# (Used only for XView, file sb_scrol.c)
#
CCC = $(CC)

# Compiler used for LEX generated C
# AIX: use $(CCC)
#CCLEX=$(CC)
CCLEX= gcc

MAKE=make

########################## Compiler flags #############################

# Miscellaneous compiler options
# May need to add -D_HPUX_SOURCE for HPUX (but probably already defined)
# Solaris: add -DSVR4
# FreeBDS 2.0: does not need -D_BSD - always defined
# AIX/CSet++: OPTIONS=-+ -qsrcmsg -DSYSV
# Data General: add -DDG
OPTIONS=

# Debugging information
# Comment out for AIX
DEBUGFLAGS = -ggdb
#DEBUGFLAGS =

# Debug/trace mode. 1 or more for debugging.
DEBUG=0

# Suffixes
OBJSUFF=o
SRCSUFF=cc

# Warnings
# Comment out for AIX
WARN = -Wall

# Which GUI, -Dwx_xview or -Dwx_motif (don't change this)
GUI = -Dwx_xview

# Optimisation
# OPT = -O
# For FreeBSD 2.0 with i486, use OPT = -O2 -m486
OPT =

# Options for ar archiver
# AROPTIONS = crs # For IRIX and Solaris (both SYSVR4).
AROPTIONS = ruv
RANLIB = ranlib
# RANLIB = echo # Uncomment this line for IRIX and Solaris

# Compile libraries: defaults to GCC libraries
# Sun with Sun CC: -lc
# Solaris: -lgen -ldl -lsocket -lnsl
#   and/or possibly -lucb, whatever that is... (-lucb CAUSES MOTIF FILE SELECTION PROBLEMS)
#   or possibly -lgen -lsocket -L/usr/ccs/lib linbnsl.a 
# SGI:     -lPW
# FreeBSD 2.0: -lg++ -lcompat
# FreeBSD 1.x: -lcompat doesn`t need, only -lg++ needed
# AIX: -lCns -lbsd

COMPLIBS=-lg++
#COMPLIBS='-ldl -lsocket -lnsl'

# Compiler or system-specific include paths
# E.g. some SPARCStations need
# -I/usr/ucbinclude/sys
COMPPATHS=

# HP-specific compiler library: an AIAI convenience
HPCOMPLIBS=

# LDLIBS for specific GUIs
#MOTIFLDLIBS = -lwx_motif -lXm -lXt -lX11 -lm $(COMPLIBS)
# The following for LINUX and Motif 2.0:
#MOTIFLDLIBS = -lwx_motif -lXm -lXpm -lXt -lXext -lX11 -lm $(COMPLIBS)

MOTIFLDLIBS = -lwx_motif -lXm -lXt -lX11 -lm $(COMPLIBS)
XVIEWLDLIBS = -lwx_ol -lxview -lolgx -lX11 -lm $(COMPLIBS)
HPLDLIBS=-lwx_hp -lXm -lXt -lX11 -lm

# Default LDLIBS for XView (don't change this)
LDLIBS = $(XVIEWLDLIBS)

# _ol or _motif (don't need to change, the makefiles will take
# care of it if you use motif/hp/xview targets)
GUISUFFIX=_ol

########################## Directories ###############################

# Replace X include/lib directories with your own

# For e.g. Linux:
XINCLUDE=-I/usr/openwin/include -I/afs/athena.mit.edu/astaff/project/motif1.2/include -I/afs/athena.mit.edu/system/x11r4/include
#XLIB=-L/usr/local/X11/lib -L/usr/openwin/lib
#XINCLUDE=-I/aiai/packages/motif1.2.1/motif/include -I/aiai/packages/X.V11R5/include
#XLIB=-L/aiai/packages/motif1.2.1/motif/sun4/lib -L/aiai/packages/X.V11R5/lib
XLIB=-L/afs/athena.mit.edu/astaff/project/motif1.2/lib -L/afs/athena.mit.edu/system/x11r4/lib


# A convenience, for HP compilation
HPXINCLUDE=-I/usr/include/Motif1.2 -I/usr/include/X11R5
HPXLIB=-L/usr/lib/Motif1.2 -L/usr/lib/X11R5

# Shouldn't need to change these...
WXINC = $(WXDIR)/include/x
WXBASEINC = $(WXDIR)/include/base
WXLIB = $(WXDIR)/lib/libwx$(GUISUFFIX).a
INC = -I$(WXBASEINC) -I$(WXINC) $(COMPPATHS)

# Directory for object files (don't change)
OBJDIR = objects$(GUISUFFIX)

# You shouldn't need to change these...
CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(WARN) $(OPT)
CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(WARN) $(OPT)
LDFLAGS =  $(XLIB) -L$(WXDIR)/lib

# Extra patch link for XView
XVIEW_LINK = $(WXDIR)/src/x/objects_ol/sb_scrol.o # $(WXDIR)/src/x/objects_ol/xvwinlp.o
