I already searched the emacs documentation, the cedet website and here on SO in vain. If my question is already been answered, fell free to (point out to an existing answer and) close it.
I'm trying to familiarize myself with EDE-projects in emacs. So far I can set up a simple project with one or more files.
Now I'd like to separate a part of my code and pack it into a library. Basically I'm trying to achieve the same thing I get with the following hand-written naive Makefile:
matrix:
g++ -c -o lib/libmatrix.o lib/matrix.cpp -std=c++0x
ar crf lib/libmatrix.a lib/libmatrix.o
num:
g++ num.cpp -Llib -Ilib -std=c++0x -o num -g
Here I have a library consisting of "lib/matrix.h" and "lib/matrix.cpp" (it's a toy implementation of a matrix type) and a file "num.cpp" that uses matrix.
I don't know how to tell emacs to compile matrix properly. So far I got the following EDE-project, but of course it doesn't compile.
;; Object Numbers
;; EDE project file.
(ede-proj-project "Numbers"
:name "Numbers"
:file "Project.ede"
:targets (list
(ede-proj-target-makefile-program "num"
:name "num"
:path ""
:source '("num.cpp")
:compiler 'ede-g++-compiler
:linker 'ede-g++-linker
:configuration-variables 'nil
:ldflags '("-std=c++0x" "-Llib" "-Ilib")
:ldlibs '("matrix")
)
(ede-proj-target-makefile-archive "matrix"
:name "matrix"
:path "/lib"
:source '("matrix.cpp")
:compiler 'ede-g++-compiler
:linker 'ede-archive-linker
:configuration-variables 'nil
)
)
:configuration-variables 'nil
)