| 1 |
# |
| 2 |
# BEGIN COPYRIGHT BLOCK |
| 3 |
# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. |
| 4 |
# Copyright (C) 2005 Red Hat, Inc. |
| 5 |
# All rights reserved. |
| 6 |
# |
| 7 |
# License: GPL (version 3 or any later version). |
| 8 |
# See LICENSE for details. |
| 9 |
# END COPYRIGHT BLOCK |
| 10 |
# |
| 11 |
# |
| 12 |
# Makefile for certmap example program. |
| 13 |
# |
| 14 |
|
| 15 |
# |
| 16 |
# Please set the ARCH variable to one of the following: |
| 17 |
# SOLARIS, IRIX, HPUX |
| 18 |
# |
| 19 |
ARCH = |
| 20 |
|
| 21 |
|
| 22 |
# |
| 23 |
# Please set the SROOT to be same as your server root |
| 24 |
# |
| 25 |
SROOT = |
| 26 |
|
| 27 |
# |
| 28 |
# Uncomment the following if you need the debug build |
| 29 |
# |
| 30 |
#COMMON_DEFS = -g |
| 31 |
|
| 32 |
ifndef ARCH |
| 33 |
arch: |
| 34 |
@echo "Please edit the Makefile and set the variable: ARCH" |
| 35 |
@exit 1 |
| 36 |
endif |
| 37 |
|
| 38 |
ifndef SROOT |
| 39 |
sroot: |
| 40 |
@echo "Please edit the Makefile and set the server root variable: SROOT" |
| 41 |
@exit 1 |
| 42 |
endif |
| 43 |
|
| 44 |
ifeq ($(ARCH), SOLARIS) |
| 45 |
CC_CMD = cc -DSOLARIS -D_REENTRANT |
| 46 |
LD_SHAREDCMD = ld -G |
| 47 |
endif |
| 48 |
|
| 49 |
ifeq ($(ARCH), HPUX) |
| 50 |
BIN = certmap.sl |
| 51 |
else |
| 52 |
BIN = certmap.so |
| 53 |
endif |
| 54 |
|
| 55 |
OBJS = init.o plugin.o |
| 56 |
|
| 57 |
INCLUDE_FLAGS=-I. -I$(SROOT)/include |
| 58 |
|
| 59 |
INC_FILES = \ |
| 60 |
$(SROOT)/include/certmap.h \ |
| 61 |
$(SROOT)/include/ldap.h \ |
| 62 |
$(SROOT)/include/lber.h |
| 63 |
|
| 64 |
all: $(BIN) |
| 65 |
|
| 66 |
$(INC_FILES): |
| 67 |
@echo |
| 68 |
@echo "To extend the Certificate to LDAP entry mapping by" |
| 69 |
@echo "writing your own functions, you need to download the" |
| 70 |
@echo "Certmap API (version 1.0) and LDAP SDK (version 1.0)." |
| 71 |
@echo "Please download these from http://???" |
| 72 |
@echo "Make sure the following files exist:" |
| 73 |
@echo "\t$(SROOT)/include/certmap.h" |
| 74 |
@echo "\t$(SROOT)/include/ldap.h" |
| 75 |
@echo "\t$(SROOT)/include/lber.h" |
| 76 |
@echo |
| 77 |
@exit 1 |
| 78 |
|
| 79 |
$(BIN): $(INC_FILES) $(OBJS) |
| 80 |
$(LD_SHAREDCMD) $(OBJS) -o $@ $(EXTRA_LDDEFINES) |
| 81 |
|
| 82 |
certmap.dll: $(OBJS) |
| 83 |
$(LD_SHAREDCMD) $(OBJS) -o $@ $(EXTRA_LDDEFINES) |
| 84 |
|
| 85 |
.c.o: |
| 86 |
$(CC_CMD) $(COMMON_DEFS) $(INCLUDE_FLAGS) -c $< |
| 87 |
|
| 88 |
clean: |
| 89 |
rm -f $(OBJS) certmap.so $(EXTRA_CLEAN) |