1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 444688 - Autotools shared lib example not building

- make changes to default shared library template to handle
  changes made to external autotools
- add the rpath specification to the exampleProgram build so it
  will just run without having to set LD_LIBRARY_PATH

Change-Id: I299c274bc07e91bbe6cf955c5391faf4f87b3edc
Reviewed-on: https://git.eclipse.org/r/34531
Tested-by: Hudson CI
Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
Tested-by: Jeff Johnston <jjohnstn@redhat.com>
(cherry picked from commit e39e96bd9c)
Reviewed-on: https://git.eclipse.org/r/34602
This commit is contained in:
Jeff Johnston 2014-10-07 10:53:09 -04:00
parent 671fea7f49
commit ead5d54e4b
4 changed files with 14 additions and 5 deletions

View file

@ -1 +1,2 @@
SUBDIRS=$(libName) include exampleProgram SUBDIRS=$(libName) include exampleProgram
ACLOCAL_AMFLAGS=-I m4

View file

@ -6,6 +6,8 @@ AC_PROG_CC
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
AC_CONFIG_MACRO_DIR([m4])
dnl Initialize automake dnl Initialize automake
AM_INIT_AUTOMAKE AM_INIT_AUTOMAKE
@ -15,10 +17,6 @@ AM_PROG_CC_C_O
dnl Initialize Libtool dnl Initialize Libtool
LT_INIT LT_INIT
dnl Check if Libtool is present
dnl Libtool is used for building share libraries
AC_PROG_LIBTOOL
AC_CONFIG_FILES(Makefile AC_CONFIG_FILES(Makefile
exampleProgram/Makefile exampleProgram/Makefile
$(libName)/Makefile $(libName)/Makefile

View file

@ -15,11 +15,16 @@ noinst_PROGRAMS=exampleProgram
# replaced by '_'. So a.out becomes a_out and the appropriate suffex added. # replaced by '_'. So a.out becomes a_out and the appropriate suffex added.
# '_SOURCES' for example. # '_SOURCES' for example.
ACLOCAL_AMFLAGS=-I ../m4
# Sources for the a.out # Sources for the a.out
exampleProgram_SOURCES= exampleProgram.c exampleProgram_SOURCES= exampleProgram.c
# Libraries for a.out
exampleProgram_LDADD = $(top_srcdir)/$(libName)/$(libName).la
# Linker options for a.out # Linker options for a.out
exampleProgram_LDFLAGS = $(top_srcdir)/$(libName)/$(libName).la exampleProgram_LDFLAGS = -rpath `cd $(top_srcdir);pwd`/$(libName)/.libs
# Compiler options for a.out # Compiler options for a.out
exampleProgram_CPPFLAGS = -I$(top_srcdir)/include exampleProgram_CPPFLAGS = -I$(top_srcdir)/include

View file

@ -52,6 +52,11 @@
<simple name="path" value="include"/> <simple name="path" value="include"/>
</process> </process>
<process type="org.eclipse.cdt.core.CreateSourceFolder">
<simple name="projectName" value="$(projectName)"/>
<simple name="path" value="m4"/>
</process>
<process type="org.eclipse.cdt.core.AddFiles"> <process type="org.eclipse.cdt.core.AddFiles">
<simple name="projectName" value="$(projectName)"/> <simple name="projectName" value="$(projectName)"/>
<complex-array name="files"> <complex-array name="files">