Makefile 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. #
  2. # BEGIN COPYRIGHT BLOCK
  3. # This Program is free software; you can redistribute it and/or modify it under
  4. # the terms of the GNU General Public License as published by the Free Software
  5. # Foundation; version 2 of the License.
  6. #
  7. # This Program is distributed in the hope that it will be useful, but WITHOUT
  8. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  10. #
  11. # You should have received a copy of the GNU General Public License along with
  12. # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
  13. # Place, Suite 330, Boston, MA 02111-1307 USA.
  14. #
  15. # In addition, as a special exception, Red Hat, Inc. gives You the additional
  16. # right to link the code of this Program with code not covered under the GNU
  17. # General Public License ("Non-GPL Code") and to distribute linked combinations
  18. # including the two, subject to the limitations in this paragraph. Non-GPL Code
  19. # permitted under this exception must only link to the code of this Program
  20. # through those well defined interfaces identified in the file named EXCEPTION
  21. # found in the source code files (the "Approved Interfaces"). The files of
  22. # Non-GPL Code may instantiate templates or use macros or inline functions from
  23. # the Approved Interfaces without causing the resulting work to be covered by
  24. # the GNU General Public License. Only Red Hat, Inc. may make changes or
  25. # additions to the list of Approved Interfaces. You must obey the GNU General
  26. # Public License in all respects for all of the Program code and other code used
  27. # in conjunction with the Program except the Non-GPL Code covered by this
  28. # exception. If you modify this file, you may extend this exception to your
  29. # version of the file, but you are not obligated to do so. If you do not wish to
  30. # provide this exception without modification, you must delete this exception
  31. # statement from your version and license this file solely under the GPL without
  32. # exception.
  33. #
  34. #
  35. # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  36. # Copyright (C) 2005 Red Hat, Inc.
  37. # All rights reserved.
  38. # END COPYRIGHT BLOCK
  39. #
  40. #
  41. # Makefile for libaccess.a
  42. #
  43. BUILD_ROOT=../..
  44. MODULE=LibAccess
  45. include $(BUILD_ROOT)/nsdefs.mk
  46. OBJDEST=$(OBJDIR)/lib/libaccess
  47. UTESTDEST=$(OBJDIR)/lib/libaccess/utest
  48. LEX=flex
  49. include $(BUILD_ROOT)/nsconfig.mk
  50. ifeq ($(ARCH), WINNT)
  51. LIBS=$(OBJDIR)/lib/libaccess.lib
  52. CC=cl -nologo -MT
  53. VALUES=$(OBJDEST)/values.h
  54. else
  55. VALUES=
  56. LIBS=$(OBJDIR)/lib/libaccess.a
  57. endif
  58. all: $(OBJDEST) $(LIBS)
  59. $(OBJDEST):
  60. mkdir -p $(OBJDEST)
  61. $(UTESTDEST):
  62. mkdir -p $(UTESTDEST)
  63. OSOBJS =
  64. OBJS=$(addprefix $(OBJDEST)/, usi.o \
  65. nseframe.o \
  66. nsautherr.o \
  67. symbols.o \
  68. acltools.o \
  69. aclutil.o \
  70. aclcache.o \
  71. aclflush.o \
  72. authdb.o \
  73. method.o \
  74. ldapacl.o \
  75. register.o \
  76. lasdns.o \
  77. lasip.o \
  78. lastod.o \
  79. usrcache.o \
  80. lasgroup.o \
  81. lasuser.o \
  82. aclspace.o \
  83. acl.tab.o \
  84. acl.yy.o \
  85. acleval.o \
  86. oneeval.o \
  87. access_plhash.o \
  88. aclerror.o \
  89. $(OSOBJS) \
  90. )
  91. MODULE_CFLAGS=-I$(BUILD_ROOT)/include -DACL_LIB_INTERNAL $(TESTFLAGS)
  92. ifeq ($(LDAP_NO_LIBLCACHE),1)
  93. MODULE_CFLAGS+=-DNO_LIBLCACHE
  94. endif
  95. LOCAL_DEPS = $(LDAPSDK_DEP)
  96. $(LIBS): $(LOCAL_DEPS) $(OBJS)
  97. rm -f $@
  98. $(AR) $(OBJS)
  99. $(RANLIB) $@
  100. include $(INCLUDE_DEPENDS)
  101. #
  102. # acl.tab.c acl.tab.h and acl.yy.c should not be generated by the build,
  103. # they are checked in and should be pulled from the tree by
  104. # default. The following rules are provided in case the grammar or
  105. # lexer needs changes.
  106. #
  107. #
  108. # Right now it's best to run yacc on a Solaris machine because the
  109. # /usr/lib/yaccpar makes the NT compiler happier. It should work on
  110. # other UNIX systems -- but that's what is checked in and tested.
  111. #
  112. yacc:
  113. $(YACC) -d acltext.y
  114. sed -f yy-sed y.tab.h > acl.tab.h
  115. sed -f yy-sed y.tab.c > acl.tab.cpp
  116. rm y.tab.h y.tab.c
  117. #
  118. # Flex generates a case insenitive lexer. It also provides mechanisms
  119. # that allow NSPR to replace it's standard IO routines. The standard UNIX
  120. # lex wants to use some stupid library! One would think that lex could
  121. # generate all the code it needs just like FLEX.
  122. #
  123. flex:
  124. $(LEX) -i aclscan.l
  125. sed -f yy-sed lex.yy.c > acl.yy.cpp
  126. rm lex.yy.c