# S-Lang Makefile for Unix
# 
# If your system does not have stdlib.h, remove '#' before -DNO_STDLIB_H
# below  (e.g., NeXt, sequent,..)
CFLAGS = -O -DFLOAT_TYPE     # -DNO_STDLIB_H

# Note that to enable double precision floating point, add the -DUSE_DOUBLE
# to the CFLAGS macro.

# C compiler.  For SunOS, use gcc
CC = cc -O  # gcc -O6 -Wall

OBJS = slang.o slparse.o slmath.o slfile.o slstd.o slarray.o slregexp.o \
       slunix.o

EXEC = calc
RANLIB = ranlib

libslang.a: ${OBJS}
	rm -f libslang.a
	ar cr libslang.a ${OBJS}
	$(RANLIB) libslang.a

calc: calc.o libslang.a
	$(CC) $(CFLAGS) calc.o -L. libslang.a -lm -o $(EXEC)

export:
	export -f slang.lis
