RM = rm -f
AR = ar cru
FILES_TO_CLEAN = *.CKP *.ln *.BAK *.bak core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut .*~ *.trace so_locations *.orig *.cos *.obj

all::

clean::
	@echo Cleaning 
	@$(RM) $(FILES_TO_CLEAN)
distclean::
	@$(RM) $(FILES_TO_CLEAN)

RANLIB = ranlib

TERMCAPLIB = -lncurses

##################################################################
# NOTE: the following schemes for compiling and linking are not  #
#       exactly used for the main executable scilex; for it, see #
#       the files Makefile.<host>                                #
##################################################################

############
# C++ compiler 
CXX= g++
CXX_OPTIONS= -g -O2
CXX_CPP =  g++ -E

############
# C compiler
# typically, for compiling use: CFLAGS = $(CC_OPTIONS)
# and for linking: $(CC) -o $(PROGRAM) $(OBJS) $(CC_LDFLAGS)
###########
CC = gcc
#CC_OPTIONS = -O -DNDEBUG -Dlinux  -DNARROWPROTO  
CC_OPTIONS = -O -DNDEBUG -Dlinux  -DNARROWPROTO 
CC_LDFLAGS = -lieee 
CC_PICFLAGS = -fPIC

##################
# Fortran compiler
# typically, for compiling use: FFLAGS = $(FC_OPTIONS)
# and for linking: $(FC) -o $(PROGRAM) $(OBJS) $(FC_LDFLAGS)
##################
FC = g77
FC_OPTIONS = -O
FC_LDFLAGS = -lieee -ldl -rdynamic
FC_PICFLAGS = -fPIC

########
# Linker
# typically, for linking: $(LD) -o $(PROGRAM) $(OBJS) $(LD_LDFLAGS)
########
LD = ld
LD_LDFLAGS = -lieee

##########
# X Window: use $(XFLAGS) for compilation and $(XLIBS) for linking
# typically, for compiling use: CFLAGS = $(CC_OPTIONS) $(XFLAGS)
# and for linking with X Window
#  with C compiler: $(CC) -o $(PROGRAM) $(OBJS) $(CC_LDFLAGS) $(XLIBS)
#  with Fortran compiler: $(FC) -o $(PROGRAM) $(OBJS) $(FC_LDFLAGS) $(XLIBS)
#  with linker: $(LD) -o $(PROGRAM) $(OBJS) $(LD_LDFLAGS) $(XLIBS)
##########
DLDLIB = 
DLD_SUBDIR = 
PVMROOT = <scilab_path>-SE-BUILD_4-16044/pvm3
#PVMROOT=$(SCIDIR)/pvm3
PVMLIB = <scilab_path>-SE-BUILD_4-16044/pvm3/lib/LINUX/libpvm3.a
PVMGLIB = <scilab_path>-SE-BUILD_4-16044/pvm3/lib/LINUX/libgpvm3.a
PVMINCLUDE = <scilab_path>-SE-BUILD_4-16044/pvm3/include
XAWLIB = $(SCIDIR)/libs/libXaw3d.a
XMULIB = $(SCIDIR)/libs/libXmu.a
XAW_LOCAL_SUBDIR = X11
XAW_LOCAL_LIB = $(SCIDIR)/libs/libXaw3d.a $(SCIDIR)/libs/libXmu.a
XFLAGS = -I$(SCIDIR)/routines  -I/usr/X11R6/include 
X_EXTRA_LIBS = 
XXTXEXT= -lXt -lXext
XX11 = -lX11
XLIBS =   -L/usr/X11R6/lib $(XAWLIB) $(XMULIB) $(XXTXEXT)  -lSM -lICE $(XX11) $(X_EXTRA_LIBS)

#####################
# TCL/TK
#####################
TKBASE =
#TKBASE=$(SCIDIR)
TK_INC_PATH = 
TCL_INC_PATH = 
TCLTK_LIBS = -ltk8.4 -ltcl8.4 -ldl

#####################
# for WIN32 version 
# win32 libraries for gcwin32 
WIN32LIBS=-mwindows -lwsock32 -lshell32 -lcomctl32  -lwinspool -lm 
WINLIBS = $(TCLTK_LIBS) $(WIN32LIBS)
LINKEROPT= $(LD_LDFLAGS)
# Ressource compiler 
RC=windres 
RCVARS=-O coff 

