PORTDIR	= ../unixport

LDCC = ${CC}
# begin makedefs

# use=386-linux

# for main link of raw_gcl
LIBS= -lm

#The multi precision library stuff
MPFILES=$(MPDIR)/mpi-386_no_under.o $(MPDIR)/libmport.a


# root for the installation, eg /usr/local
# This would cause make install to create /usr/local/bin/gcl and
# /usr/local/lib/gcl-2-??/* with some basic files.
prefix=/usr/local

# where to place the info files
INFO_DIR=/usr/info/

# where to put emacs lisp files.
EMACS_SITE_LISP=

# the default.el file
EMACS_DEFAULT_EL=/default.el

# numerous TCL/TK variables culled from the tkConfig.sh and tclConfig.sh
# if these are found.
TK_CONFIG_PREFIX=/usr/local/lib
TK_LIBRARY=/usr/local/lib/tk8.2
TCL_LIBRARY=/usr/local/lib/tcl8.2
TK_XINCLUDES=-I/usr/X11R6/include
TK_INCLUDE=-I/usr/local/lib/../include
TK_LIB_SPEC=-L/usr/local/lib -ltk8.2
TK_BUILD_LIB_SPEC=-L/home/wfs/src/tk8.2.1/unix -ltk8.2
TK_XLIBSW=-L/usr/X11R6/lib -lX11
TK_XINCLUDES=-I/usr/X11R6/include
TCL_LIB_SPEC=-L/usr/local/lib -ltcl8.2${TCL_DBGX}
TCL_DL_LIBS=-ldl
TCL_LIBS=-ldl  -lm

NOTIFY=yes
GCC=gcc





GCLDIR=/home/wfs/gcl-2.3
SHELL=/bin/sh
MACHINE=386-linux

# notes for redhat 6.0
#  the configure should select the compiler GCC=/usr/bin/i386-glibc20-linux-gcc
#  However for the gcl-tk directory, you must use plain 'gcc' since
#  that must link with the tcl tk libs which have been compiled with it.
#  so after configure change to GCC=gcc in the gcl-tk/makefile


# Machine dependent makefile definitions for intel 386,486 running linux

LBINDIR=/usr/local/bin

OFLAG	=  -O 
LIBS	= -lm 

ODIR_DEBUG= -O4 

# This CC string will be used for compilation of the system,
# and also in the compiler::*cc* variable for later compilation of
# lisp files.
# (the -pipe is just since our file system is slow..)
CC = ${GCC} -pipe -fwritable-strings  -DVOL=volatile -I$(GCLDIR)/o -fsigned-char

# under redhat 6.1 and slackware 7.0 we need to have this
# link be static for now ...
LDCC=${CC} -static

# note for linuxaout on an elf machine add -b i486-linuxaout 
# CC = gcc -pipe -fwritable-strings  -DVOL=volatile -I$(GCLDIR)/o -fsigned-char -b i486-linuxaout 

# Enable the fastloading mechanism which does not use ld -A
# requires c/rel_.. machine dependent code.

RSYM	= rsym
SFASL	= $(ODIR)/sfasl.o


#MPFILES= $(MPDIR)/mpi-386d.o   $(MPDIR)/libmport.a


# When using SFASL it is good to have (si::build-symbol-table)
INITFORM=(si::build-symbol-table)

# Use symbolic links
SYMB=-s

LIBFILES=bsearch.o

# the  make to use for saved_kcp the profiler.
KCP=kcp-bsd
# end makedefs

OBJS =	../o/main.o ../o/alloc.o ../o/gbc.o  ../o/typespec.o ../o/eval.o ../o/macros.o ../o/lex.o ../o/bds.o ../o/frame.o ../o/predicate.o ../o/reference.o ../o/assignment.o ../o/bind.o ../o/let.o ../o/conditional.o ../o/block.o ../o/iteration.o ../o/mapfun.o ../o/prog.o ../o/multival.o ../o/catch.o ../o/symbol.o ../o/cfun.o ../o/cmpaux.o ../o/package.o ../o/big.o ../o/number.o ../o/num_pred.o ../o/num_comp.o ../o/num_arith.o ../o/num_sfun.o ../o/num_co.o ../o/num_log.o ../o/num_rand.o ../o/earith.o ../o/character.o ../o/sequence.o ../o/list.o ../o/hash.o ../o/array.o ../o/string.o ../o/structure.o ../o/toplevel.o ../o/file.o ../o/read.o ../o/backq.o ../o/print.o ../o/format.o ../o/pathname.o ../o/unixfsys.o ../o/unixfasl.o ../o/error.o ../o/unixtime.o ../o/unixsys.o ../o/unixsave.o ../o/unixint.o $(SFASL) ../o/funlink.o ../o/fat_string.o \
	sys_kcn.o ../lsp/defmacro.o ../lsp/evalmacros.o ../lsp/top.o ../lsp/module.o ../o/run_process.o ../o/init_pari.o  $(MPFILES)

OPTIONAL  =	../lsp/predlib.o ../lsp/setf.o ../lsp/arraylib.o ../lsp/assert.o ../lsp/defstruct.o ../lsp/describe.o ../lsp/iolib.o ../lsp/listlib.o ../lsp/mislib.o ../lsp/numlib.o ../lsp/packlib.o ../lsp/seq.o ../lsp/seqlib.o ../lsp/trace.o 

ODIR=../o

saved_kcn: raw_kcn init_kcn.lsp ../lsp/autoload.lsp ../lsp/auto.lsp
	cat init_kcn.lsp | sed -e "sDATE`date`g" \
	-e 'slinks t)links t)(setq compiler::*cc* "$(CC)")$(INITFORM)g' \
	| raw_kcn $(PORTDIR)/

raw_kcn: $(OBJS) $(OPTIONAL) 
	$(LDCC)  -o raw_kcn $(OBJS) $(LIBS) ../o/akcllib.a

KCND = .

sys_kcn.o: $(KCND)/sys_kcn.c
	$(CC) $(OFLAGS) $(DEFS) -c $(KCND)/sys_kcn.c



