DEST = bin

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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