mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 06:32:10 +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:
parent
671fea7f49
commit
ead5d54e4b
4 changed files with 14 additions and 5 deletions
|
@ -1 +1,2 @@
|
|||
SUBDIRS=$(libName) include exampleProgram
|
||||
ACLOCAL_AMFLAGS=-I m4
|
||||
|
|
|
@ -6,6 +6,8 @@ AC_PROG_CC
|
|||
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
dnl Initialize automake
|
||||
AM_INIT_AUTOMAKE
|
||||
|
||||
|
@ -15,10 +17,6 @@ AM_PROG_CC_C_O
|
|||
dnl Initialize Libtool
|
||||
LT_INIT
|
||||
|
||||
dnl Check if Libtool is present
|
||||
dnl Libtool is used for building share libraries
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
AC_CONFIG_FILES(Makefile
|
||||
exampleProgram/Makefile
|
||||
$(libName)/Makefile
|
||||
|
|
|
@ -15,11 +15,16 @@ noinst_PROGRAMS=exampleProgram
|
|||
# replaced by '_'. So a.out becomes a_out and the appropriate suffex added.
|
||||
# '_SOURCES' for example.
|
||||
|
||||
ACLOCAL_AMFLAGS=-I ../m4
|
||||
|
||||
# Sources for the a.out
|
||||
exampleProgram_SOURCES= exampleProgram.c
|
||||
|
||||
# Libraries for a.out
|
||||
exampleProgram_LDADD = $(top_srcdir)/$(libName)/$(libName).la
|
||||
|
||||
# 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
|
||||
exampleProgram_CPPFLAGS = -I$(top_srcdir)/include
|
||||
|
|
|
@ -52,6 +52,11 @@
|
|||
<simple name="path" value="include"/>
|
||||
</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">
|
||||
<simple name="projectName" value="$(projectName)"/>
|
||||
<complex-array name="files">
|
||||
|
|
Loading…
Add table
Reference in a new issue