
################## HFLOAT/SRC makefile ##########################

CXX=g++

# optimizations:
OFLAGS =  -O -ffast-math

# warnings: 
WFLAGS = -Wall -Wstrict-prototypes -Wconversion #-Winline -pedantic

# debuging:
GFLAGS = -g  #-fno-inline -fno-default-inline

# profiling:
#PFLAGS = -pg  # uncomment for profiling (used at linking)
# (you might have to use -static here)


#### choose the FLAG combo here:
CXXFLAGS = 
CXXFLAGS += $(WFLAGS)   # uncomment for WARNINGS
#CXXFLAGS += $(OFLAGS)   # uncomment for OPTIMIZATION
CXXFLAGS += $(GFLAGS)   # uncomment for DEBUGGING
#
# check also fxt/makefile, these things are repeated there 
# because fxt/* is also distributed also in an individual package 
# check especially optimization flags there


INCFLAG = -I../include/
export INCFLAG

CXXFLAGS += $(INCFLAG)

export OFLAGS
export WFLAGS
export PFLAGS
export CXXFLAGS
export CXX



#-------------------------------------


FXTOBJS= \
fxt/*.o \
fxt/fft/*.o \
fxt/fht/*.o \
fxt/fourstep/*.o \
fxt/mod/*.o \
fxt/realfft/*.o \
fxt/slow/*.o \

#fxt/chirpfft/*.o \
#fxt/ndimfft/*.o \
#fxt/pfa/*.o \

#fxt/simplfft/
#fxt/test/
#fxt/walsh/
#bucket/

HFLOATLIB=../bin/libhflt.a

.PHONY: all
all: $(HFLOATLIB)
$(HFLOATLIB): fxtobj hfobj
	@echo "BUILDING THE HFLOAT ARCHIVE: $@ "
	@ar rcs $@  tz/*.o pi/*.o hf/*.o gt/*.o dt/*.o $(FXTOBJS)


.PHONY: fxtobj
fxtobj:
	@cd fxt;  $(MAKE) objs


.PHONY: all hfobj hfobjs
hfobj: hfobjs
hfobjs:
	@cd dt;  $(MAKE) all
	@cd gt;  $(MAKE) all
	@cd hf;  $(MAKE) all
	@cd pi;  $(MAKE) all
	@cd tz;  $(MAKE) all



#-------------------------------------

.PHONY: dep depend
dep: depend
depend:
	cd tz;       $(MAKE) $@
	cd pi;       $(MAKE) $@
	cd hf;       $(MAKE) $@
	cd gt;       $(MAKE) $@
	cd dt;       $(MAKE) $@
	cd fxt;      $(MAKE) $@

.PHONY: clean
clean:
	cd tz;       $(MAKE) $@
	cd pi;       $(MAKE) $@
	cd hf;       $(MAKE) $@
	cd gt;       $(MAKE) $@
	cd dt;       $(MAKE) $@
	cd fxt;      $(MAKE) $@

.PHONY: clobber
clobber:
	cd tz;       $(MAKE) $@
	cd pi;       $(MAKE) $@
	cd hf;       $(MAKE) $@
	cd gt;       $(MAKE) $@
	cd dt;       $(MAKE) $@
	cd fxt;      $(MAKE) $@

.PHONY: showsrc
showsrc:
	cd tz;       $(MAKE) $@
	cd pi;       $(MAKE) $@
	cd hf;       $(MAKE) $@
	cd gt;       $(MAKE) $@
	cd dt;       $(MAKE) $@
	cd fxt;      $(MAKE) $@



################## end HFLOAT/SRC makefile ##########################
