On 13/03/2015 10:19 p.m., Priya Agarwal wrote: > Hi, > > I wanted to link certain static libraries and use them in squid source > code. I added the following lines in Makefile.am of the 'src' directory. Please be aware if you do that your new code and anything built from the Squid Makefile MUST be GPLv2 compliant. > > squid_LDFLAGS = > -L/media/NewVolume/yocto/build_t4240qds_release/tmp/work/ppce6500-fsl_networking-linux/usdpaa/git-r5/lib_powerpc/ > > squid_LDLIBS = -lusdpaa_dma -lusdpaa_dpa_offload -lusdpaa_of -lusdpaa_ppac > -lusdpaa_qbman -lusdpaa_rmu -lusdpaa_srio -lusdpaa_dma_mem -lusdpaa_fman > -lusdpaa_pme \ > -lusdpaa_process -lusdpaa_rman -lusdpaa_sec -lusdpaa_syscfg > > squid_CPPFLAGS = > -I/media/NewVolume/yocto/build_t4240qds_release/tmp/work/ppce6500-fsl_networking-linux/usdpaa/git-r5/include/ > > But I think this wrong as libraries aren't getting linked. I am getting > "undefined reference to" errors. > So what variables should I add/change. Those options are auto-generated by the autotools build chain. The -L flag should be passed by the ./configure LDFLAGS= parameter or coded into Makefile.am variable as a relative path. Its unlikely the exact absolute path will remain the same even within your build machines. I see you are using some path under ".../tmp" for example. Libraries are added to squid_LDADD variable. That takes the form: squid_LDADD += -lusdpaa_dma or squid_LDADD += -L$(top_srcdir)/../usdpaa/ -lusdpaa_dma which assumes the squid and usdpaa library code checkouts are sitting next to each other. Same deal for the -I value in the ./configure CXXFLAGS= parameter, or in the Makefile.am as a relative path: AM_CPPFLAGS += -I$(top_srcdir)/../usdpaa/include/ Amos _______________________________________________ squid-users mailing list squid-users@xxxxxxxxxxxxxxxxxxxxx http://lists.squid-cache.org/listinfo/squid-users