## Makefile MCALabC++
##  
##-----------------------------------------------------------
## DO NOT EDIT BY HAND
## Autogenerated by ./configure.
## If something is wrong, fix ./configure and run it again. 
##-----------------------------------------------------------
##
## GREYC - IMAGE
## 6, boulevard Maréchal Juin 14050 CAEN.
## email : Jalal.Fadili@greyc.ensicaen.fr
##

RM          = rm -f
AR          = ar 
ARFLAGS     = lrcv
CXX         = g++
CXXFLAGS    = -O2 --fast-math -Isrc/utils -Iinclude
CXXFLAGSOP  = $(CXXFLAGS)  -Isrc -DMAIN
MEX         = /usr/local/matlab/bin//mex
MEXFLAGS    =  -Isrc/utils -Iinclude -Isrc -Imatlab -DMAIN
LD          = g++
LDFLAGSLIB  =  -dynamiclib -dynamic -fno-common -flat_namespace -undefined suppress
LDFLAGSOP   =  -L./lib -lpandore 
PPP         = 
MAKE        = make
DYN_LIB	    = ./lib/libpandore.dylib
STATIC_LIB  = ./lib/libpandore.a

OBJ= \
	    src/objects/bundled.o \
	    src/objects/collection.o \
	    src/objects/errc.o \
	    src/objects/graph.o \
	    src/objects/main.o \
	    src/objects/pobject.o \
	    src/objects/region.o

TARGETS= \
	    ./bin/col2curv \
	    ./bin/contrastenh \
	    ./bin/dct \
	    ./bin/dctiv \
	    ./bin/dictionary \
	    ./bin/dst \
	    ./bin/dwt \
	    ./bin/eminpaint \
	    ./bin/fat \
	    ./bin/fatom1 \
	    ./bin/fatom1sym \
	    ./bin/fatom2 \
	    ./bin/fatom2sym \
	    ./bin/fatomfm2sym \
	    ./bin/fct \
	    ./bin/fctatom \
	    ./bin/fftshift2 \
	    ./bin/fict \
	    ./bin/fst \
	    ./bin/getsubband \
	    ./bin/iatom1 \
	    ./bin/iatom1sym \
	    ./bin/iatom2 \
	    ./bin/iatom2sym \
	    ./bin/iatomfm2sym \
	    ./bin/idct \
	    ./bin/idst \
	    ./bin/idwt \
	    ./bin/ildct \
	    ./bin/ildctiv \
	    ./bin/ildst \
	    ./bin/isoiudwt \
	    ./bin/isoudwt \
	    ./bin/iudwt \
	    ./bin/ldct \
	    ./bin/ldctiv \
	    ./bin/ldst \
	    ./bin/mca \
	    ./bin/mca_threshold \
	    ./bin/qmf \
	    ./bin/setsubband \
	    ./bin/sumbands \
	    ./bin/tests \
	    ./bin/udwt

MEXTARGETS= \
	    matlab/fatom1sym_mex \
	    matlab/fatom2sym_mex \
	    matlab/fatomfm2sym_mex \
	    matlab/iatom1sym_mex \
	    matlab/iatom2sym_mex \
	    matlab/iatomfm2sym_mex

# Avoid removing intermediates files.
.PRECIOUS: %.cc

.IGNORE:

.PHONY: all clean cleandist distclean opers

all:  bin lib opers matlab

bin:
	mkdir -p ./lib ./bin

opers: $(TARGETS)

matlab: $(MEXTARGETS)

FORCE:

clean:
	-$(RM) $(OBJ)

cleandist: distclean

distclean: clean
	$(RM) $(TARGETS)
	-$(RM) -r ./bin
	-$(RM) $(MEXTARGETS)
	-$(RM) $(DYN_LIB)
	-$(RM) $(STATIC_LIB)
	-$(RM) -r ./lib
	-$(RM) $(OBJ)

lib: $(DYN_LIB) $(STATIC_LIB)

$(DYN_LIB): $(OBJ)
	$(RM) $@
	$(LD) -o $@ $(LDFLAGSLIB) $(OBJ)
	chmod 755 $@

$(STATIC_LIB): $(OBJ)
	$(RM) $@
	$(AR) $(ARFLAGS) $@ $(OBJ)
	chmod 644 $@
	

#
# dependencies :
#

./bin/%: src/%.cc
	$(CXX) $(CXXFLAGSOP) -o $@ $< $(LDFLAGSOP)

./bin/%: src/%.cpp
	$(CXX) $(CXXFLAGSOP) -o $@ $< $(LDFLAGSOP)

./matlab/%: matlab/%.cpp
	$(MEX) -outdir matlab $< $(MEXFLAGS) $(STATIC_LIB)
	
./matlab/%: matlab/%.cpp
	$(MEX) -outdir matlab $< $(MEXFLAGS) $(STATIC_LIB)
