Simple Applicatoin & Library Example
Steve Hyatt <shyatt-4YDSCbhY/[email protected]> Fri, 10 Feb 2006 11:06:40 -0700
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
Hi All.
Cool tool, hope to use it for all my projects. I however am having
trouble getting the following to work.
Basically I have a app that has a 'lib' directory and an 'app'
directory. The lib directory is built into a static lib and the app
directory is built into an executable statically linked with the lib.
I have:
lib-tester
/main.aap
/lib
/hello.h
/hello.cpp
/main.aap
/libhello.a (build from running with main.aap)
/app
/tester.cpp
/main.aap
If I do the following it works:
$cd lib
$aap
$cd ../aap
$aap
$./tester
However I am not able to just run aap against the 'root' main.aap. I get:
Aap: No target on the command line and no $TARGET, build rules or "all"
target in a recipe
Also, if I do not manually run aap in the lib directory before running
aap in the app directory I get then the compilation fails because the
linker can't find -lhello.
I have checked the documentation as well as the mailling list and can
not resolve the issues. This would be nice example to add to the
documentation once I figure it out as I believe this is a common
scenario. At least I do it that way. 8-)
So basically my questions is:
1) How do you 'force' a ':lib' target on an ':program' target. I tried
to ":include' the lib main.aap but no luck.
2) How can I simply have the root main.aap build all libs (in this case
just one) and then build all the apps (again in this case just one).
I am happy to try out options and provide documentation writeup
afterwords if that would be helpful.
Thanks.
Steve
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642