# Make file to construct the lm executable
# This file specifies optimization for size (-Os) and speed (-march=i686)

# Usage: "make" creates the executable, "make clean" cleans up

objects = loansmgr.o macmenu.o loanutil.o loancalc.o loanhelp.o fileutil.o strutil.o

loansmgr : $(objects)
	cc -o lm $(objects) -lncurses -lm
	strip -s lm
loansmgr.o : loansmgr.c 
	cc -c -Os -march=i686 loansmgr.c
macmenu.o : macmenu.c
	cc -c -Os -march=i686 macmenu.c
loanutil.o : loanutil.c
	cc -c -Os -march=i686 loanutil.c
loancalc.o : loancalc.c
	cc -c -Os -march=i686 loancalc.c
loanhelp.o : loanhelp.c
	cc -c -Os -march=i686 loanhelp.c
fileutil.o : fileutil.c
	cc -c -Os -march=i686 fileutil.c
strutil.o : strutil.c
	cc -c -Os -march=i686 strutil.c

clean :
	rm -rf lm $(objects)
