PDA

View Full Version : [c/c++] Aiuto con newmat e makefile


Guess85
22-07-2011, 15:42
Salve a tutti, per un progetto devo utilizzare la libreria newmat http://www.robertnz.net/nm10.htm
Ho un makefile cosė composto:

OBJS = DTWHMMHWR.o Coordinate.o DTWFeature.o DFTFeature.o DTWFinder.o cluster.o
CXX = g++
DEBUG = -g
CXXFLAGS = -O0 -g3 -Wall -c $(DEBUG) -fmessage-length=0
LFLAGS = -Wall $(DEBUG)
LIBSINCLUDE = -I/usr/include/opencv
LIBS = -L/usr/lib -L/usr/bin -lcv -lcxcore -lhighgui -lcvaux

DTWHMMHWR : $(OBJS)
$(CXX) $(LFLAGS) $(LIBS) -o DTWHMMHWR $(OBJS)

DTWHMMHWR.o : DTWHMMHWR.cpp DTWFinder.h
$(CXX) $(CXXFLAGS) $(LIBSINCLUDE) DTWHMMHWR.cpp

DTWFinder.o : DTWFinder.cpp DTWFeature.h DFTFeature.h Coordinate.h cluster.h
$(CXX) $(CXXFLAGS) $(LIBSINCLUDE) DTWFinder.cpp

Coordinate.o : Coordinate.cpp Coordinate.h
$(CXX) $(CXXFLAGS) $(LIBSINCLUDE) Coordinate.cpp

DTWFeature.o : DTWFeature.cpp DTWFeature.h
$(CXX) $(CXXFLAGS) $(LIBSINCLUDE) DTWFeature.cpp

DFTFeature.o : DFTFeature.cpp DFTFeature.h
$(CXX) $(CXXFLAGS) $(LIBSINCLUDE) DFTFeature.cpp

cluster.o : cluster.c cluster.h
gcc $(CXXFLAGS) cluster.c

clean:
rm *.o *~ pl


Mi potreste per favore spiegare come posso includere la libreria newmat? La vado ad utilizzase solo in DFTFeature.h.
La cartella con tutti i sorgenti di newmat č nella directory dove sono anche i sorgenti del io progetto.
Ad occhio, se non ho capito male, devo prima crearmi la libreria dai sorgenti in newmat e poi linkarla. Ma non so come.
Grazie mille.