[uClinux-dev] application compile & library path

Sangsu Baek sangsu at emctech.net
Tue Jan 16 01:32:34 EST 2007


To Per Hallsmark

Thank you for your reply. It ~~~~~ works   :-)


Best Regards.

---
Sangsu Baek




----- Original Message ----- 
From: "Per Hallsmark" <per.hallsmark at t2data.se>
To: "uClinux development list" <uclinux-dev at uclinux.org>
Sent: Monday, January 15, 2007 6:25 PM
Subject: Re: [uClinux-dev] application compile & library path


> Hi Sangsu,
> 
> I think one definitely wants to compile all applications using the same 
> compiler/libs.
> uClinux has a nice wrapper taking care of this, ucfront-gcc, which the 
> normal
> make variable CC is defined to.
> 
> Attached is a simple Makefile I use for building utilities. If you've 
> got a directory
> user/mytools with this makefile in and a bunch of files like tool1.c, 
> tool2.c and
> so forth, they will be built and installed as /bin/tool1, /bin/tool2 etc.
> (ok, you also need to edit config/config.in and user/Makefile in order 
> to have
> the uClinux build framework to include mytools... ;-)
> 
> Best regards,
> Per
> 
> 
> Sangsu Baek wrote:
>> hi uclinux !!
>>
>> i want to compile my-own-application with 
>> uclibc & libraries included in snapgear-3.3.0, not with libraries in toolchain.
>> i've googled and  found that i can't redefine default library path or library search order by compiler.
>> compiler always search library under /usr/local/ firstly.
>> i've tried '-L' option already but failed.
>>
>> regards
>>
>> Sangsu Baek
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> uClinux-dev mailing list
>> uClinux-dev at uclinux.org
>> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
>> This message was resent by uclinux-dev at uclinux.org
>> To unsubscribe see:
>> http://mailman.uclinux.org/mailman/options/uclinux-dev
> 
>


--------------------------------------------------------------------------------


> SRCS=$(shell ls *c)
> OBJS=$(subst .c,.o,$(SRCS))
> APPS=$(subst .c,,$(SRCS))
> 
> all: $(APPS)
> 
> %.o: %.c
> $(Q) $(CC) -c $(CFLAGS) $< -o $@
> 
> $(APPS): %: %.o
> $(Q) $(CC) $(LDFLAGS) $@.o -o $@
> 
> 
> romfs:
> @for app in $(APPS); do \
> $(ROMFSINST) /bin/$$app ;\
> done
> 
> clean:
> $(RM) $(APPS) *.elf *.gdb *.o
> 
>


--------------------------------------------------------------------------------


> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev


More information about the uClinux-dev mailing list