pancake wrote:
> *) about -lmagic .. it would be better to have a single .mk with that 
> check and being enabled with USE_LIBMAGIC=YES so if USE_LIBMAGIC and 
> HAVE_LIBMAGIC is enabled this flag is appended to ldflags.

What I was planning was to move the "if HAVE_LIB_MAGIC" block out of
each of the relevant binr/*/Makefiles and into binr.mk, inside an ifeq
that checks whether the current BINDEPS contain "r_core"...  Then the
same for all the other dependencies: r_hash: -lm, r_fs: libgrubfs.a etc.

> *) more on magic.. the idea will be to have our own implementation of 
> libmagic included inside radare. any volunteer? i think openbsd one is 
> the more decent one.. but still bloated.. so a reimplementation would be 
> good. It's in TODO for 0.9. Having -lmagic as dependency makes porting a 
> bit complex.

The only implementation I can find is Ian Darwin's[1], which is
apparently in BSD, OSX, cygwin and every linux distro I've ever used.  I
agree it'd be good to have a lightweight internal version for when the
system doesn't have its own - but I also like having all my custom
locally-installed magic files, so I'd be in favour of keeping -lmagic as
an optional dependency.

> *) It's ok the use of absolute paths. i know there are some hacky things 
> here because of having to ../ ../.. and ../../.. to find stuff which is 
> ugly, but I didnt priorize

Cool, I'll put that in first, and it should make the other changes easier.

> *) interl-lib dependencies are not properly handled, it would be great 
> if we could fix this without using automake. any idea here?

How about splitting each r_* lib's Makefile up so that the DEP= lines
are in a separate .mk?  Then when make finds r_foo in DEP or BINDEP, it
can
 include libr/foo/subdeps.mk
and add all those subdependencies to the list.  Repeat until the list
stops growing (that bit may be harder to implement).

If this .mk also contains any -L/-l requirements, then binr.mk could
include each one listed in its current BINDEPS, rather than duplicating
each set of extra flags conditionally.

> keep in mind 
> those makefiles have to build:
> 
>   - libraries
>   - static plugins
>   - shared plugins
>   - test programs
>   - programs

A lot of the test programs also fail to build in nonPIC mode - some just
need the BINDEPS order changing, some need extra libs.  So for the
moment, all I'm testing is that my changes don't break any *more*
things while I'm getting libraries+programs (or standalone programs) to build.

> We can meet in IRC if you like to talk about it. I can help you in this 
> refactoring.

Thanks, I'll drop in when I can.

[1] http://www.darwinsys.com/file - not responding right now
_______________________________________________
radare mailing list
[email protected]
http://lists.nopcode.org/listinfo.cgi/radare-nopcode.org

Reply via email to