mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-03-19 15:50:25 +08:00
updated depdemo
This commit is contained in:
parent
61bb801686
commit
5a20021ee6
@ -2,27 +2,22 @@
|
||||
#
|
||||
AUTOMAKE_OPTIONS = no-dependencies foreign
|
||||
|
||||
lib_LTLIBRARIES = libl1.la libl2.la libl3.la libl4.la
|
||||
libl1_la_SOURCES = l1.c l1.h sysdep.h
|
||||
libl2_la_SOURCES = l2.c l2.h sysdep.h
|
||||
libl2_la_LIBADD = libl1.la
|
||||
libl3_la_SOURCES = l3.c l3.h sysdep.h
|
||||
libl3_la_LIBADD = libl1.la libl2.la
|
||||
libl4_la_SOURCES = l4.c l4.h sysdep.h
|
||||
libl4_la_LIBADD = libl3.la
|
||||
SUBDIRS = l1 l2 l3 l4
|
||||
|
||||
EXTRA_DIST = sysdep.h
|
||||
|
||||
bin_PROGRAMS = depdemo depdemo.static
|
||||
|
||||
depdemo_SOURCES = main.c
|
||||
depdemo_LDADD = libl1.la libl2.la libl4.la \
|
||||
libl3.la # remove this!
|
||||
depdemo_DEPENDENCIES = libl1.la libl2.la libl4.la
|
||||
depdemo_LDADD = $(top_builddir)/l1/libl1.la $(top_builddir)/l2/libl2.la \
|
||||
$(top_builddir)/l4/libl4.la
|
||||
depdemo_DEPENDENCIES = $(top_builddir)/l1/libl1.la \
|
||||
$(top_builddir)/l2/libl2.la $(top_builddir)/l4/libl4.la
|
||||
|
||||
depdemo_static_SOURCES = main.c
|
||||
depdemo_static_LDADD = libl1.la libl2.la libl4.la \
|
||||
libl3.la # remove this!
|
||||
depdemo_static_DEPENDENCIES = libl1.la libl2.la libl4.la
|
||||
depdemo_static_LDFLAGS = -static
|
||||
depdemo_static_SOURCES = $(depdemo_SOURCES)
|
||||
depdemo_static_LDADD = $(depdemo_LDADD)
|
||||
depdemo_static_DEPENDENCIES = $(depdemo_DEPENDENCIES)
|
||||
depdemo_static_LDFLAGS = $(STATIC)
|
||||
|
||||
$(OBJECTS): libtool
|
||||
libtool: $(LIBTOOL_DEPS)
|
||||
|
@ -7,9 +7,22 @@ AC_EXEEXT
|
||||
AM_PROG_LIBTOOL
|
||||
AC_SUBST(LIBTOOL_DEPS)
|
||||
|
||||
if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then
|
||||
STATIC=-static
|
||||
else
|
||||
STATIC=
|
||||
fi
|
||||
AC_SUBST(STATIC)
|
||||
|
||||
AC_CHECK_HEADERS(math.h)
|
||||
|
||||
AC_CHECK_LIBM
|
||||
|
||||
dnl Output the makefile
|
||||
AC_OUTPUT(Makefile)
|
||||
AC_OUTPUT(
|
||||
Makefile
|
||||
l1/Makefile
|
||||
l2/Makefile
|
||||
l3/Makefile
|
||||
l4/Makefile
|
||||
)
|
||||
|
7
depdemo/l1/Makefile.am
Normal file
7
depdemo/l1/Makefile.am
Normal file
@ -0,0 +1,7 @@
|
||||
# A brief demonstration of inter-library dependencies
|
||||
#
|
||||
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
|
||||
lib_LTLIBRARIES = libl1.la
|
||||
libl1_la_SOURCES = l1.c l1.h
|
@ -17,17 +17,17 @@ along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
USA. */
|
||||
|
||||
#include "l1.h"
|
||||
#include "l1/l1.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int var_l1;
|
||||
|
||||
int
|
||||
func_l1(int ident)
|
||||
func_l1(int indent)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ident; i++)
|
||||
for (i = 0; i < indent; i++)
|
||||
putchar(' ');
|
||||
printf("l1\n");
|
||||
return 0;
|
8
depdemo/l2/Makefile.am
Normal file
8
depdemo/l2/Makefile.am
Normal file
@ -0,0 +1,8 @@
|
||||
# A brief demonstration of inter-library dependencies
|
||||
#
|
||||
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
|
||||
lib_LTLIBRARIES = libl2.la
|
||||
libl2_la_SOURCES = l2.c l2.h
|
||||
libl2_la_LIBADD = $(top_builddir)/l1/libl1.la
|
@ -17,21 +17,21 @@ along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
USA. */
|
||||
|
||||
#include "l2.h"
|
||||
#include "l2/l2.h"
|
||||
|
||||
#include "l1.h"
|
||||
#include "l1/l1.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int var_l2;
|
||||
|
||||
int
|
||||
func_l2(int ident)
|
||||
func_l2(int indent)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ident; i++)
|
||||
for (i = 0; i < indent; i++)
|
||||
putchar(' ');
|
||||
printf("l2\n");
|
||||
func_l1(ident+1);
|
||||
func_l1(indent+1);
|
||||
return 0;
|
||||
}
|
8
depdemo/l3/Makefile.am
Normal file
8
depdemo/l3/Makefile.am
Normal file
@ -0,0 +1,8 @@
|
||||
# A brief demonstration of inter-library dependencies
|
||||
#
|
||||
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
|
||||
lib_LTLIBRARIES = libl3.la
|
||||
libl3_la_SOURCES = l3.c l3.h
|
||||
libl3_la_LIBADD = $(top_builddir)/l1/libl1.la $(top_builddir)/l2/libl2.la
|
@ -17,23 +17,23 @@ along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
USA. */
|
||||
|
||||
#include "l3.h"
|
||||
#include "l3/l3.h"
|
||||
|
||||
#include "l1.h"
|
||||
#include "l2.h"
|
||||
#include "l1/l1.h"
|
||||
#include "l2/l2.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int var_l3;
|
||||
|
||||
int
|
||||
func_l3(int ident)
|
||||
func_l3(int indent)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ident; i++)
|
||||
for (i = 0; i < indent; i++)
|
||||
putchar(' ');
|
||||
printf("l3\n");
|
||||
func_l1(ident+1);
|
||||
func_l2(ident+1);
|
||||
func_l1(indent+1);
|
||||
func_l2(indent+1);
|
||||
return 0;
|
||||
}
|
8
depdemo/l4/Makefile.am
Normal file
8
depdemo/l4/Makefile.am
Normal file
@ -0,0 +1,8 @@
|
||||
# A brief demonstration of inter-library dependencies
|
||||
#
|
||||
|
||||
INCLUDES = -I$(top_srcdir)
|
||||
|
||||
lib_LTLIBRARIES = libl4.la
|
||||
libl4_la_SOURCES = l4.c l4.h
|
||||
libl4_la_LIBADD = $(top_builddir)/l3/libl3.la
|
@ -17,9 +17,9 @@ along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
USA. */
|
||||
|
||||
#include "l4.h"
|
||||
#include "l4/l4.h"
|
||||
|
||||
#include "l3.h"
|
||||
#include "l3/l3.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef HAVE_MATH_H
|
||||
@ -29,15 +29,15 @@ USA. */
|
||||
int var_l4;
|
||||
|
||||
int
|
||||
func_l4(int ident)
|
||||
func_l4(int indent)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ident; i++)
|
||||
for (i = 0; i < indent; i++)
|
||||
putchar(' ');
|
||||
printf("l4\n");
|
||||
func_l3(ident+1);
|
||||
for (i = 0; i <= ident; i++)
|
||||
func_l3(indent+1);
|
||||
for (i = 0; i <= indent; i++)
|
||||
putchar(' ');
|
||||
printf("libm [sin(1.5) = %f]\n", sin(1.5));
|
||||
return 0;
|
@ -17,9 +17,9 @@ along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
USA. */
|
||||
|
||||
#include "l1.h"
|
||||
#include "l2.h"
|
||||
#include "l4.h"
|
||||
#include "l1/l1.h"
|
||||
#include "l2/l2.h"
|
||||
#include "l4/l4.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user