cc = gcc
cflags=-c -O2 -DOS2

fit2.exe:fit2.o mrqfit2.o funclib2.o fitutil2.o fitcmds2.o solve_da.o plot.o linear2.o
	$(cc) fit2.o mrqfit2.o funclib2.o fitutil2.o fitcmds2.o solve_da.o plot.o linear2.o -lm -o fit2.exe

.c.o:
	$(cc) $(cflags) $<

mrqfit2.o:mrqfit2.c fit.h
	$(cc) $(cflags) mrqfit2.c

fitcmds2.o:fitcmds2.c fit.h
	$(cc) $(cflags) fitcmds2.c

fitutil2.o:fitutil2.c fit.h
	$(cc) $(cflags) fitutil2.c

solve_da.o:solve_da.c fit.h
	$(cc) $(cflags) solve_da.c

linear2.o:linear2.c fit.h
	$(cc) $(cflags) linear2.c

plot.o:plot.c fit.h
	$(cc) $(cflags) plot.c

fit2.o:fit2.c fit.h
	$(cc) $(cflags) fit2.c
