Show Table of Contents
4.2. Compiling the Plug-in Example
The makefile in Example 4.2, “Makefile” can compile the example.
This example assumes that the source code is stored in
srchxmpl.c and that the plug-in being compiled is srchxmpl.so. Additionally, the 389-ds-base-devel package must have been installed or the header file, slapi-plugin.h, is in /usr/include/dirsrv specified in the include path. Otherwise, specify -I /path/to/slapi-plugin.h in the CFLAGS directive.
Example 4.2. Makefile
# Makefile for Directory Server plug-in examples # CC = gcc LD = gcc CFLAGS = -fPIC -I /usr/include/nspr4 -Wall LDFLAGS = -shared -z defs -L/usr/lib64/dirsrv -lslapd OBJS = srchxmpl.o all: srchxmpl.so srchxmpl.so: $(OBJS) $(LD) $(LDFLAGS) -o $@ $(OBJS) .c.o: $(CC) $(CFLAGS) -c $< clean: -rm -f $(OBJS) srchxmpl.so

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.