
# Select your compiler
CC =		gcc
#CC =		cc

# compiler options
#CFLAGS =	-g
CFLAGS =	-O2 -m486 -fpcc-struct-return -Wall
#CFLAGS =	-O

# Set AC_FLAGS to the same value that is in the autoconf generated
# Makefile in the tcl source directory
AC_FLAGS =	-DNO_GETWD=1 -DNO_WAIT3=1 -DHAVE_UNISTD_H=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1

# how to get at the Tcl include files
TCLINC =	-I../tcl7.4b1

# how to link with the Tcl library
#TCLLIB =	-ltcl
TCLLIB =	../tcl7.4b1/libtcl.a

# how to link with the math library (if you are building with the
# transcendental functions in the expr command)
#MATHLIB =
MATHLIB =	-lm


SHELL =		/bin/sh

OBJS =	binAppInit.o bin_Misc.o bin_UnixAZ.o

CCFLAGS =	$(CFLAGS) $(AC_FLAGS)

all: binsh

binsh: $(OBJS)
	$(CC) $(CCFLAGS) $(OBJS) $(TCLLIB) $(MATHLIB) -o binsh

binAppInit.o:	binAppInit.c binario.h
	$(CC) -c $(CCFLAGS) $(TCLINC) binAppInit.c
	
bin_Misc.o:	bin_Misc.c binario.h
	$(CC) -c $(CCFLAGS) $(TCLINC) bin_Misc.c

bin_UnixAZ.o:	bin_UnixAZ.c binario.h
	$(CC) -c $(CCFLAGS) $(TCLINC) bin_UnixAZ.c

