[asterisk-dev] Makefile Help

Sean Kelly keenskelly at gmail.com
Thu Aug 2 19:11:09 CDT 2012


I finally figured this out... on to the next problem!

The issue below (nevermind the superfluous "-Wl, -E" which "-c"
rendered ineffective) was the use of "$<" on the shared object instead
of "$^" - it was only getting the first object in the list and
therefore those were the only symbols defined. duh.

Here's the final:
----------
mydir/core_mymodule.o: mydir/core_mymodule.c
        $(CC) -fPIC -c $< -o $@

app_mymodule.so: app_mymodule.o mydir/core_mymodule.o mydir/lib/libfftw3.a
        $(LD) $(SOLINK) -E -o $@ $^
        echo first only:[$<]
        echo whole list:[$^]
----------

The key to tracking it down was to simply add an echo to the shared
object's make rules which revealed it was the $< delivering only one
of the three files to the linker.

Regards,
- Sean



More information about the asterisk-dev mailing list