# Make file to construct the lm executable
# This file specifies optimization for size (-Os)

# 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  loansmgr.c
macmenu.o : macmenu.c
	cc -c -Os  macmenu.c
loanutil.o : loanutil.c
	cc -c -Os  loanutil.c
loancalc.o : loancalc.c
	cc -c -Os  loancalc.c
loanhelp.o : loanhelp.c
	cc -c -Os  loanhelp.c
fileutil.o : fileutil.c
	cc -c -Os  fileutil.c
strutil.o : strutil.c
	cc -c -Os  strutil.c

clean :
	rm -rf lm $(objects)
