# DJGPP makefile

# define FLOAT_TYPE below if you want floating point support.  This 
#  might require a floating point processor.  Consult the DJGPP 
#  documentation for morre details.  In particluar, the calc.c demo
#  program requires it.

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

CC =gcc

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

EXEC = calc
RANLIB = ranlib

SUFFIXES = .c
.SUFFIXES: $(SUFFIXES)

.c.o:
	$(CC) -c $(CFLAGS) $*.c

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
