# Modification of makefile by David R. Musicant to only include those
# functions necessary for ASVM project.

.SUFFIXES: .c .o
CC = cc
SHELL = /bin/sh
CFLAGS = -O2

# If your system lacks onexit() and you are not using an
# ANSI C compiler, then you should add -DNO_ONEXIT to CFLAGS,
# e.g., by changing the above "CFLAGS =" line to
# CFLAGS = -O -DNO_ONEXIT

# On at least some Sun systems, it is more appropriate to change the
# "CFLAGS =" line to
# CFLAGS = -O -Donexit=on_exit

# compile, then strip unnecessary symbols
.c.o:
	$(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
	ld -r -s -o $*.xxx $*.o
	mv $*.xxx $*.o

CHAR =	s_cat.o s_cmp.o s_copy.o

libF77.a : $(CHAR)
	ar r ../libF77.a $?
	ranlib ../libF77.a

# To compile with C++, first "make f2c.h"
f2c.h: f2ch.add
	cat /usr/include/f2c.h f2ch.add >f2c.h

clean:
	rm -f ../libF77.a *.o
