[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
testing with .so and other questions
From: |
Waldemar Rosenbach |
Subject: |
testing with .so and other questions |
Date: |
Fri, 02 Aug 2002 13:41:38 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204 |
Linux 2.4.18
GNU Make version 3.79.1
autoconf (GNU Autoconf) 2.52
automake (GNU automake) 1.6.3
I'm trying to make a shared library and to test it.
The library to test is libFiniteStateMachine.so and is built in the
$(top_builddir)
I have to create a libTestAction.so library in the $(top_builddir)/test
just to run a test (loadable module).
The Makefile.am in the $(top_srcdir)/test looks as follows:
VPATH = ${srcdir}
TESTS = test1.sh
#check_LTLIBRARIES = libTestAction.la
#noinst_LTLIBRARIES = libTestAction.la
lib_LTLIBRARIES = libTestAction.la
check_SCRIPTS = test1.sh
check_PROGRAMS = test
EXTRA_DEST = ./test.fsm
test_SOURCES = test.cpp
libTestAction_la_SOURCES = \
testaction.cpp\
testaction.h\
init.cpp\
init.h
test_LDADD = $(top_builddir)/.libs/libFiniteStateMachine.so
libTestAction_la_LIBADD = $(top_builddir)/.libs/libFiniteStateMachine.so
./test.fsm: $(top_srcdir)/test.fsm
-rm -f ./test.fsm
$(LN_S) $(top_srcdir)/test.fsm ./test.fsm
test1.sh: test ./test.fsm libTestAction.la
@echo creating test1.sh...
@-rm -f test1.sh
@echo "#!/bin/sh" > test1.sh
@echo "export
LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(top_builddir)/.libs:.libs" >> test1.sh
@echo "./test" >> test1.sh
@chmod +x test1.sh
Now the questions:
1. if I use lib_LTLIBRARIES, then libTestAction.so is created, but also
installed if I call make install, if I use check_LTLIBRARIES or
noinst_LTLIBRARIES, then libTestAction.so is not created, but only
libTestAction.la
How to create libTestAction.so without installing it? And also to
clean at 'make clean'?
2. ./test.fsm should be just a copy (or link) of this file from the
source directory in the actual directory and is read by the test
programm. But it is not created. If I call 'make ./test.fsm' then I get:
make: »../../test/test.fsm« is already actual.
3. test1.sh is a script, that is generated by the Makefile. But it is
not deleted if I call 'make clean'. How to tell the automake to delete
it at clean?
- testing with .so and other questions,
Waldemar Rosenbach <=