DEST = bin

all:	$(DEST)/abs.exe $(DEST)/add.exe $(DEST)/augmatvec.exe $(DEST)/barchart.exe $(DEST)/cdotpr.exe $(DEST)/cmag.exe  \
	$(DEST)/conjg.exe $(DEST)/convolve.exe $(DEST)/correlate.exe $(DEST)/db.exe $(DEST)/decimate.exe $(DEST)/differentiate.exe \
	$(DEST)/dotpr.exe $(DEST)/enter_vec.exe $(DEST)/extract_imaginary.exe $(DEST)/extract_real.exe $(DEST)/fft.exe $(DEST)/fft2D.exe \
	$(DEST)/histogram.exe $(DEST)/identity_matrix.exe $(DEST)/image2matrix.exe $(DEST)/integrate.exe $(DEST)/join2xy.exe \
	$(DEST)/mat2image.exe $(DEST)/matXvec.exe $(DEST)/matinvert.exe $(DEST)/matmul.exe $(DEST)/mdeterm.exe $(DEST)/multpbp.exe \
	$(DEST)/normalize.exe $(DEST)/nums2vec.exe $(DEST)/outpr.exe $(DEST)/phase.exe $(DEST)/rand_gen.exe $(DEST)/real2cmplx.exe $(DEST)/scale.exe \
	$(DEST)/shift.exe $(DEST)/sine_gen.exe $(DEST)/statistics.exe $(DEST)/sub.exe $(DEST)/transpose.exe $(DEST)/ucirc.exe $(DEST)/vec2nums.exe \
	$(DEST)/window.exe $(DEST)/z_trans.exe $(DEST)/zfill.exe

$(DEST)/abs.exe:  abs.c
	cc -O abs.c -lm -o bin/abs.exe

$(DEST)/add.exe:  add.c
	cc -O add.c -lm -o bin/add.exe

$(DEST)/augmatvec.exe:  augmatvec.c
	cc -O augmatvec.c -lm -o bin/augmatvec.exe

$(DEST)/barchart.exe:  barchart.c
	cc -O barchart.c -lm -o bin/barchart.exe

$(DEST)/cdotpr.exe:  cdotpr.c
	cc -O cdotpr.c -lm -o bin/cdotpr.exe

$(DEST)/cmag.exe:  cmag.c
	cc -O cmag.c -lm -o bin/cmag.exe


$(DEST)/conjg.exe:  conjg.c
	cc -O conjg.c -lm -o bin/conjg.exe

$(DEST)/convolve.exe:  convolve.c
	cc -O convolve.c -lm -o bin/convolve.exe

$(DEST)/correlate.exe:  correlate.c
	cc -O correlate.c -lm -o bin/correlate.exe

$(DEST)/db.exe:  db.c
	cc -O db.c -lm -o bin/db.exe

$(DEST)/decimate.exe:  decimate.c
	cc -O decimate.c -lm -o bin/decimate.exe

$(DEST)/differentiate.exe:  differentiate.c
	cc -O differentiate.c -lm -o bin/differentiate.exe

$(DEST)/dotpr.exe:  dotpr.c
	cc -O dotpr.c -lm -o bin/dotpr.exe

$(DEST)/enter_vec.exe:  enter_vec.c
	cc -O enter_vec.c -lm -o bin/enter_vec.exe

$(DEST)/extract_imaginary.exe:  extract_imaginary.c
	cc -O extract_imaginary.c -lm -o bin/extract_imaginary.exe

$(DEST)/extract_real.exe:  extract_real.c
	cc -O extract_real.c -lm -o bin/extract_real.exe

$(DEST)/fft.exe:  fft.c
	cc -O fft.c -lm -o bin/fft.exe

$(DEST)/fft2D.exe:  fft2D.c
	cc -O fft2D.c -lm -o bin/fft2D.exe

$(DEST)/histogram.exe:  histogram.c
	cc -O histogram.c -lm -o bin/histogram.exe

$(DEST)/identity_matrix.exe:  identity_matrix.c
	cc -O identity_matrix.c -lm -o bin/identity_matrix.exe

$(DEST)/image2matrix.exe:  image2matrix.c
	cc -O image2matrix.c -lm -o bin/image2matrix.exe

$(DEST)/integrate.exe:  integrate.c
	cc -O integrate.c -lm -o bin/integrate.exe

$(DEST)/join2xy.exe:  join2xy.c
	cc -O join2xy.c -lm -o bin/join2xy.exe

$(DEST)/mat2image.exe:  mat2image.c
	cc -O mat2image.c -lm -o bin/mat2image.exe

$(DEST)/matXvec.exe:  matXvec.c
	cc -O matXvec.c -lm -o bin/matXvec.exe

$(DEST)/matinvert.exe:  matinvert.c
	cc -O matinvert.c -lm -o bin/matinvert.exe

$(DEST)/matmul.exe:  matmul.c
	cc -O matmul.c -lm -o bin/matmul.exe

$(DEST)/mdeterm.exe:  mdeterm.c
	cc -O mdeterm.c -lm -o bin/mdeterm.exe

$(DEST)/multpbp.exe:  multpbp.c
	cc -O multpbp.c -lm -o bin/multpbp.exe

$(DEST)/normalize.exe:  normalize.c
	cc -O normalize.c -lm -o bin/normalize.exe

$(DEST)/nums2vec.exe:  nums2vec.c
	cc -O nums2vec.c -lm -o bin/nums2vec.exe

$(DEST)/outpr.exe:  outpr.c
	cc -O outpr.c -lm -o bin/outpr.exe

$(DEST)/phase.exe:  phase.c
	cc -O phase.c -lm -o bin/phase.exe

$(DEST)/rand_gen.exe:  rand_gen.c
	cc -O rand_gen.c -lm -o bin/rand_gen.exe

$(DEST)/real2cmplx.exe:  real2cmplx.c
	cc -O real2cmplx.c -lm -o bin/real2cmplx.exe

$(DEST)/scale.exe:  scale.c
	cc -O scale.c -lm -o bin/scale.exe

$(DEST)/shift.exe:  shift.c
	cc -O shift.c -lm -o bin/shift.exe

$(DEST)/sine_gen.exe:  sine_gen.c
	cc -O sine_gen.c -lm -o bin/sine_gen.exe

$(DEST)/statistics.exe:  statistics.c
	cc -O statistics.c -lm -o bin/statistics.exe

$(DEST)/sub.exe:  sub.c
	cc -O sub.c -lm -o bin/sub.exe

$(DEST)/transpose.exe:  transpose.c
	cc -O transpose.c -lm -o bin/transpose.exe

$(DEST)/ucirc.exe:  ucirc.c
	cc -O ucirc.c -lm -o bin/ucirc.exe

$(DEST)/vec2nums.exe:  vec2nums.c
	cc -O vec2nums.c -lm -o bin/vec2nums.exe

$(DEST)/window.exe:  window.c
	cc -O window.c -lm -o bin/window.exe

$(DEST)/z_trans.exe:  z_trans.c
	cc -O z_trans.c -lm -o bin/z_trans.exe

$(DEST)/zfill.exe:  zfill.c
	cc -O zfill.c -lm -o bin/zfill.exe

clean:
ifeq ($(OS),Windows_NT)
	erase $(DEST)\*
else
	rm -f $(DEST)/*
endif