mkoctfile & CPP

I am trying to call from my "main" file another file that has a function that is using octave "fft" code.
testmclt is the main function and expmod_r_odd has a function called by testmclt. expmod_r_odd calls fft from octave.

Any ideas what's wrong with the makefile?
Thank you

Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# testmclt: testmclt.o lt_window.o expmod_r_odd.o
  2 #       mkoctfile --link-stand-alone -o testmclt testmclt.o lt_window.o expmod_r_odd.o
  3 #makefile:
  4 #all: testmclt
  5 
  6 #testmclt: testmclt.o expmod_r_odd.o lt_window.o
  7 #       mkoctfile --link-stand-alone -o testmclt testmclt.cpp
  8 # testmclt: testmclt.o lt_window.o expmod_r_odd.o
  9 #       g++ $(CFLAGS) -o  testmclt testmclt.o lt_window.o expmod_r_odd.o
 10 
 11 
 12 expmod_r_odd.o: expmod_r_odd.cpp expmod_r_odd.h 
 13         mkoctfile -c  expmod_r_odd.cpp -o expmod_r_odd.o
 14         # g++ -c -I $(OCTAVE_INCLUDE)octave -o expmod_r_odd.o expmod_r_odd.cpp 
 15         # g++ $(CFLAGS) -c  expmod_r_odd.cpp
 16 
 17 lt_window.o : lt_window.cpp lt_window.h 
 18         mkoctfile -c  lt_window.cpp -o lt_window.o
 19 #       g++ -c -I $(OCTAVE_INCLUDE)octave -o lt_window.o lt_window.cpp 
 20 #       g++ $(CFLAGS) -c  lt_window.cpp
 21 
 22 
 23 
 24 # testmclt.o: testmclt.cpp  lt_window.h
 25 #       g++ $(CFLAGS) -c  testmclt.cpp
 26 
 27 testmclt.o: testmclt.cpp lt_window.h            
 28         g++ -c -I$(OCTAVE_INCLUDE)octave -o testmclt.o testmclt.cpp
 29         # mkoctfile --link-stand-alone  testmclt.cpp -o testmclt
 30 
 31 clean: 
 32         rm -f *.o testmclt


The right format requires presence of all .cpp in mkoctfile
Here:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
testmclt: testmclt.o expmod_r_odd.o lt_window.o 
  2         mkoctfile --link-stand-alone -o testmclt testmclt.cpp expmod_r_odd.cpp lt_window.cpp
  3 
  4 expmod_r_odd.o: expmod_r_odd.cpp expmod_r_odd.h
  5         mkoctfile -c  expmod_r_odd.cpp 
  6 
  7 lt_window.o : lt_window.cpp lt_window.h 
  8         mkoctfile -c  lt_window.cpp 
  9 
 10 testmclt.o: testmclt.cpp lt_window.h expmod_r_odd.h
 11         g++ -c -I$(OCTAVE_INCLUDE)octave testmclt.cpp 
 12 
 13 clean: 
 14         rm -f *.o testmclt
Topic archived. No new replies allowed.