mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-28 11:28:38 +00:00
155 lines
5.8 KiB
Plaintext
155 lines
5.8 KiB
Plaintext
======================================================================
|
|
NETSCAPE DIRECTORY SDK FOR C:
|
|
BUILD INSTRUCTIONS
|
|
Last updated: May 31, 1998
|
|
======================================================================
|
|
For information on the Netscape Directory SDK source release,
|
|
see http://www.mozilla.org/directory/
|
|
|
|
Unix/Linux Build Instructions
|
|
-----------------------------
|
|
|
|
System Requirements:
|
|
32MB of RAM, 128MB of swap, recommended 64MB of RAM.
|
|
|
|
Tool Requirements:
|
|
Native C compiler or GNU C/C++ compiler 2.7.2
|
|
(or a more recent version)
|
|
GNU make 3.74 or a more recent version
|
|
|
|
Instructions:
|
|
1. Uncompress and extract the source files by entering the
|
|
following command (or your preferred variant of this command):
|
|
|
|
gzip -dc <filename>.tar.gz | tar -xvf -
|
|
|
|
2. Set and unset the following environment variables.
|
|
|
|
In csh/tcsh:
|
|
setenv MOZILLA_CLIENT 1
|
|
setenv NO_MDUPDATE 1
|
|
setenv MOZ_LDAP_SDK 1
|
|
unsetenv MOZ_LI
|
|
unsetenv MOZ_LITE
|
|
unsetenv MOZ_MEDIUM
|
|
unsetenv NO_SECURITY
|
|
|
|
In sh/bash/ksh:
|
|
MOZILLA_CLIENT=1
|
|
NO_MDUPDATE=1
|
|
MOZ_LDAP_SDK=1
|
|
export MOZILLA_CLIENT NO_MDUPDATE MOZ_LDAP_SDK
|
|
unset MOZ_LI
|
|
unset MOZ_LITE
|
|
unset MOZ_MEDIUM
|
|
unset NO_SECURITY
|
|
|
|
3. Build the SDK by entering the following commands:
|
|
|
|
cd mozilla
|
|
gmake -f directory/ldapsdk.mk build
|
|
|
|
The SDK will be built and copied into the following directories:
|
|
mozilla/dist/public/ldap - header files
|
|
mozilla/dist/<architecture>/bin - LDAP API shared object/libraries
|
|
(libldap.so, liblber.so)
|
|
|
|
|
|
Windows Build Instructions
|
|
--------------------------
|
|
|
|
System Requirements:
|
|
Windows NT 3.51 or 4.0 (4.0 preferred).
|
|
|
|
Tool Requirements:
|
|
Microsoft Visual C++ version 4.2 or a more recent version
|
|
GNU Tools for Windows (you can find these on the Internet).
|
|
Specifically, you'll need:
|
|
cp.exe
|
|
rm.exe
|
|
Here are some sample download sites to find these:
|
|
Cygnus (http://www.cygnus.com/misc/gnu-win32)
|
|
GNU (http://www.gnu.org/order/ftp.html)
|
|
MIT (ftp://prep.ai.mit.edu/pub/gnu)
|
|
Netscape uses internally modified versions of the following tools:
|
|
gmake.exe
|
|
shmsdos.exe
|
|
uname.exe
|
|
You can download them from http://www.mozilla.org/download-mozilla.html
|
|
(click the Windows Build Tools link). When you unzip the file, the
|
|
tools will be located in the windows\bin\x86 directory.
|
|
Netscape-developed tools (makedep.exe, txt2rc.exe, waitfor.exe),
|
|
which are located in the mozilla\cmd\winfe\mkfiles32 directory
|
|
|
|
All of these tools need to be put in your path.
|
|
|
|
Extracting the Source Files:
|
|
The source files for the Directory C SDK are zipped in the file
|
|
ldap-c-sdk.zip. When unzipping the file, make sure to specify
|
|
that you want to preserve the directory structure. For example,
|
|
make sure that "Use Folder Names" is checked.
|
|
|
|
Instructions:
|
|
NOTE: Make sure to run the commands from a standard Windows NT
|
|
command prompt. Although you may be able to use other shells
|
|
to build the SDK, you may need to adjust the makefiles for
|
|
the shell that you are using.
|
|
1. Set the following environment variables (within the command session,
|
|
either manually or via a script), or within the system environment
|
|
through the Control Panel | System control panel):
|
|
set HOME=(your home directory)
|
|
set MOZ_BITS=32
|
|
set MOZ_DEBUG=1
|
|
set MOZ_GOLD=0
|
|
set MOZ_JAVA=0
|
|
set MOZ_NT=351 (if running NT 3.51, don't set otherwise)
|
|
set MOZ_SRC=(top of your source tree, drive letter and path.
|
|
For example, set MOZ_SRC=d:\mozilla_src, if the mozilla
|
|
directory is at d:\mozilla_src\mozilla.)
|
|
set MOZ_TOOLS=(location of the bin directory containing your
|
|
GNU tools. The build looks for MOZ_TOOLS\bin\gmake.exe,
|
|
so make sure that the MOZ_TOOLS environment variable
|
|
is set correctly.)
|
|
set PATH=%MOZ_TOOLS%\bin;%PATH%
|
|
set TEMP=(your temp directory)
|
|
set TMP=(your temp directory)
|
|
set VERBOSE=1
|
|
|
|
Unset the following environment variables:
|
|
set MOZ_LI=
|
|
set MOZ_LITE=
|
|
set MOZ_MEDIUM=
|
|
|
|
2. Enter the following commands to build the SDK:
|
|
cd mozilla\directory
|
|
nmake -f ldapsdk.mak
|
|
|
|
The SDK will be built and copied into the following directories:
|
|
mozilla\dist\public\ldap - header files
|
|
mozilla\dist\Win32_d.obj\bin - LDAP API DLL (nsldap32.dll)
|
|
mozilla\dist\Win32_d.obj\lib - import and static libraries
|
|
(nsldap32.lib, nsldap32s.lib)
|
|
|
|
Notes:
|
|
This build process does not use Visual C++ generated project files.
|
|
(Reasons for this include size, maintainability, and the long-term
|
|
desire to use tools like gmake or plug-and-play developer tools.)
|
|
This does not preclude you from using the Visual C++ IDE or its debugger.
|
|
|
|
Common Build Problems:
|
|
If the build fails with the message "'.\WIN32' unexpected",
|
|
you didn't set the environment variables correctly. Check for
|
|
extra spaces at the end of the set statements (this is a
|
|
common problem when copying and pasting commands).
|
|
If directory-related errors are reported, check the full path to
|
|
the source for any spaces. Make sure that when you originally extracted
|
|
the source files, you used a utility that understands long filenames.
|
|
If you are not sure if your extraction utility understands long filenames,
|
|
use Info-Zip. (You can get this from ftp://ftp.cdrom.com/pub/infozip.)
|
|
|
|
|
|
--------------------------------------------------------
|
|
Copyright (c) 1998 Netscape Communications Corporation.
|
|
(http://home.netscape.com/misc/contact_info.html)
|
|
|