[Click] Building elements as a package

Rajendra J. Magar Rajendra.J.Magar at Dartmouth.EDU
Fri Mar 24 02:06:21 EST 2006


Hi, Eddie

Thanks a lot for your response.

Here's the content of my CMakeLists.txt, which is the Makefile equivalent used by cmake.


INCLUDE_DIRECTORIES(/net/grad/magar/wlansec/code/common/network/include /usr/include/glib-2.0/include 
                     /usr/include/glib-2.0/glib /usr/lib/glib-2.0/include/ /data/map/analysis/vxl_bin/core 
                     /data/map/analysis/vxl_bin/vcl /data/map/analysis/vxl-1.4.0/core /data/map/analysis/vxl-1.4.0/vcl)
LINK_DIRECTORIES(/data/map/analysis/vxl_bin/lib)
LINK_LIBRARIES(vnl_algo netlib vcl vnl vnl_io vpl vsl vbl vul pcap glib-2.0)
ADD_EXECUTABLE(ecm ECM.cc)


This is from a standalone build. Now I would like to be able to take ECM.cc to Click so I can integrate with other elements coded by my project partner, but I am not sure what the above lines would translate into in Makefile.in. My sense is that stuff in INCLUDE_DIRECTORIES can be defined as CXX_FLAGS, that in LINK_DIRECTORIES as LDFLAGS and that in LINK_LIBRARIES as -lname_of_library. I have been relying on my very little knowledge of 'make' and trial and error to make these work, but I haven't succeeded yet.

If you are interested in the tarball of my project to help you help me, please let me know. I will send them your way instantly.

Thanks a lot,
Raz


--- You wrote:
Rajendra,

Click package makefiles are pretty simple and I would recommend you stick to 
the Click system.  It is a major headache to build makefiles that work with 
userlevel, linux 2.4, and linux 2.6.

Click package makefiles work as follows.

- Create a directory like etc/samplepackage
- Dump .cc and .c files in that directory
- Decorate those .cc and .c files with ELEMENT_PROVIDES()/EXPORT_ELEMENT() 
statements
- The makefile system should find all of those .cc/.c files and compile and 
link them together.

If you say a bit more about what cmake is doing for you someone on the list 
may be able to help.

automake is not the right approach for Click, btw.

Eddie


Rajendra J. Magar wrote:
> Hi,
> 
> I am trying to develop my project as a packge in Click. I was wondering 
> if there is a good documentation on how to make changes to Makefile.in? 
> Up until now I have been using 'cmake', which automatically generates 
> Makefile for further build. I wanted to be able to port all my 'cmake' 
> commands to Click, and so, while searching for a way to do that, I found 
> that I would have to make corresponding changes to Makefile.in given in 
> etc/samplepackage, but I am not sure how I would go about doing that. 
> Apparently, there's 'automake' for automatically generating Makefile.in, 
> but I am guessing this is not the right approach. If you could point me 
> to a documentation on writing Makefile.in, that would be great.
> 
> Thank you,
> Raz Magar
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
--- end of quote ---



More information about the click mailing list