Create SHARED library

Falk Brettschneider gigafalk at geocities.com
Thu Sep 30 08:40:00 BST 1999


Hi,

Judin Max wrote:
> 
> How I can create SHARED library from files which lay in different directory?
> 
> ---
> Judin Max
> KDEStudio developer.
> novaprint at mtu-net.ru
> http://www.chat.ru/~kdestudio

Take a look at tmake (http://www.troll.no)! You only have to write a
.pro file for shared library and then generate the appropriate makefile.
Such .pro file looks for a shared library consisting of files from
different directories simply like this:

-------------------------
TEMPLATE        = lib
CONFIG          = qt dll warn_on debug
INCLUDEPATH    += include \
                  $(BLABLA)/include1 \
                  $(ANY)/include2
HEADERS = include1/blabla.h \
        include1/bla.h \
        include2/something.h \
        include2/anything.h
SOURCES = src1/blabla.cpp \
        src1/bla.cpp \
        src2/something.cpp \
        src2/anything.cpp
TARGET        = anything
DESTDIR = ../lib
VERSION = 0.1

--------------------------
After writing your .pro file, call this:

   tmake test.pro -o Makefile
   make

and you will get a shared library called:
   libanything.so       (link)
   libanything.so.0     (link)
   libanything.so.0.1   (file)


BTW: I would really love it, if KDevelop integrated tmake-.pro-files in
its IDE.

-- 

Ciao,
--Falk



More information about the KDevelop mailing list