[uClinux-dev] basic/simple question

David McCullough davidm at snapgear.com
Sun Nov 3 19:11:09 EST 2002

Jivin Martin lays it down ...
> Phil,
> Thanks. I had
> dir_$(CONFIG_MYAPP_MYAPP)              += myapp
> instead of
> dir_$(CONFIG_USER_MYAPP_MYAPP)         += myapp
> Now my "hello world" compiles, is included in the
> image.bin and runs ;)
> Some Makefiles have
> $(EXEC): $(OBJS)
>         $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS$(LDLIBS-$(@)))
> while others have
> $(EXEC): $(OBJS)
> 	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
> Whats the difference or is there any?

The line:

	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS$(LDLIBS-$(@)))

is the newer way.  It allows the config.arch to override the link-time
libraries for individual apps.  This allows you to customise your romfs
even more by linking some applications with shared libraries and some
without etc.


Will give you an example of how to do this,


David McCullough:    Ph: +61 7 3435 2815  http://www.SnapGear.com
davidm at snapgear.com  Fx: +61 7 3891 3630  Custom Embedded Solutions + Security

More information about the uClinux-dev mailing list