25 lines
712 B
Plaintext
25 lines
712 B
Plaintext
# @(#)gcc.default 10.1 (Sleepycat) 11/13/97
|
|
|
|
If you're using gcc and there's no better shared library example for your
|
|
architecture, the following shared library build procedure will probably
|
|
work.
|
|
|
|
First, add the "-fpic" option to the CFLAGS value in the Makefile.
|
|
|
|
Then, rebuild all of your .o files. This will create a DB library that
|
|
contains .o files with PIC code. To build the shared library, then take
|
|
the following steps in the library build directory:
|
|
|
|
% mkdir tmp
|
|
% cd tmp
|
|
% ar xv ../libdb.a
|
|
% gcc -shared -o libdb.so *.o
|
|
% mv libdb.so ..
|
|
% cd ..
|
|
% rm -rf tmp
|
|
|
|
Note, you may have to change the gcc line depending on the requirements
|
|
of your system.
|
|
|
|
The file libdb.so is your shared library.
|