DESTDIR = /musr/bin
CFLAGS =  -O
PROGS = lpc

# set CMIX_SYS to the directory where you keep cmix sys/ files
CMIX_SYS =  ../sys

# set CMIX_LIB to the directory where you keep cmix lib/ files
CMIX_LIB =  /musr/lib

# you will need to be able to find sfheader.h
INCLUDE = -I/musr/H/sfheader.h

CC = cc $(INCLUDE) 

#LDFLAGS =  -lm -lF77 -lI77
LDFLAGS =  -lm

LPC_O = lpc.o lpc.anallpc.o\
	 lpc.roottest.o lpc.stable.o factor.o $(CMIX_SYS)/printsf.o\
	 $(CMIX_SYS)/sfcodes.o alpole.o 

.c:
	 $(CC) -c -ffpa *.c

.f:   
	 $(CC) -c -ffpa *.f

lpc: 	$(LPC_O) 
	cc -ffpa -o lpc $(LPC_O) $(LDFLAGS)

clean:
	-rm -f $(PROGS) *.o

install:
	cp $(PROGS) $(DESTDIR)

man:
	cp lpc.doc /usr/man/manl/lpc.l

