Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. # Please set the ARCH variable to one of the following:
  16. # SOLARIS, IRIX, HPUX
  17. #
  18. ARCH =
  19. #
  20. # Please set the SROOT to be same as your server root
  21. #
  22. SROOT =
  23. #
  24. # Uncomment the following if you need the debug build
  25. #
  26. #COMMON_DEFS = -g
  27. ifndef ARCH
  28. arch:
  29. @echo "Please edit the Makefile and set the variable: ARCH"
  30. @exit 1
  31. endif
  32. ifndef SROOT
  33. sroot:
  34. @echo "Please edit the Makefile and set the server root variable: SROOT"
  35. @exit 1
  36. endif
  37. ifeq ($(ARCH), SOLARIS)
  38. CC_CMD = cc -DSOLARIS -D_REENTRANT
  39. LD_SHAREDCMD = ld -G
  40. endif
  41. ifeq ($(ARCH), HPUX)
  42. BIN = certmap.sl
  43. else
  44. BIN = certmap.so
  45. endif
  46. OBJS = init.o plugin.o
  47. INCLUDE_FLAGS=-I. -I$(SROOT)/include
  48. INC_FILES = \
  49. $(SROOT)/include/certmap.h \
  50. $(SROOT)/include/ldap.h \
  51. $(SROOT)/include/lber.h
  52. all: $(BIN)
  53. $(INC_FILES):
  54. @echo
  55. @echo "To extend the Certificate to LDAP entry mapping by"
  56. @echo "writing your own functions, you need to download the"
  57. @echo "Certmap API (version 1.0) and LDAP SDK (version 1.0)."
  58. @echo "Please download these from http://???"
  59. @echo "Make sure the following files exist:"
  60. @echo "\t$(SROOT)/include/certmap.h"
  61. @echo "\t$(SROOT)/include/ldap.h"
  62. @echo "\t$(SROOT)/include/lber.h"
  63. @echo
  64. @exit 1
  65. $(BIN): $(INC_FILES) $(OBJS)
  66. $(LD_SHAREDCMD) $(OBJS) -o $@ $(EXTRA_LDDEFINES)
  67. certmap.dll: $(OBJS)
  68. $(LD_SHAREDCMD) $(OBJS) -o $@ $(EXTRA_LDDEFINES)
  69. .c.o:
  70. $(CC_CMD) $(COMMON_DEFS) $(INCLUDE_FLAGS) -c $<
  71. clean:
  72. rm -f $(OBJS) certmap.so $(EXTRA_CLEAN)