home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / modules / libpref / src / Makefile < prev    next >
Encoding:
Makefile  |  1998-04-08  |  2.3 KB  |  94 lines

  1. #
  2. # The contents of this file are subject to the Netscape Public License
  3. # Version 1.0 (the "NPL"); you may not use this file except in
  4. # compliance with the NPL.  You may obtain a copy of the NPL at
  5. # http://www.mozilla.org/NPL/
  6. #
  7. # Software distributed under the NPL is distributed on an "AS IS" basis,
  8. # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  9. # for the specific language governing rights and limitations under the
  10. # NPL.
  11. #
  12. # The Initial Developer of this code under the NPL is Netscape
  13. # Communications Corporation.  Portions created by Netscape are
  14. # Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  15. # Reserved.
  16.  
  17. DEPTH        = ../../..
  18.  
  19. MODULE        = pref
  20. LIBRARY_NAME    = pref
  21.  
  22. REQUIRES    = libxp js pref nspr dbm security ldap java img layer util
  23.  
  24. ifneq ($(subst /,_,$(shell uname -s)),OS2)
  25. CSRCS        = unix/unixpref.c
  26. else
  27. CSRCS        = prefldap.c
  28. LIBRARY        = xppref32.$(LIB_SUFFIX)
  29. EXPORTS        = initpref.js init/all.js init/config.js win/winpref.js os2/os2pref.js
  30. OS2_IMPLIB    = 1
  31. DEF_FILE    = xpOS2.def
  32. EXTRA_LIBS    = $(DIST)/lib/js$(MOZ_BITS)$(VERSION_NUMBER).lib \
  33.           $(LIBNSPR) \
  34.           $(DIST)/lib/libldap.lib $(DIST)/lib/liblber.lib \
  35.           $(DIST)/lib/libldap.lib $(DIST)/lib/libhash.lib \
  36.           $(NULL)
  37. endif
  38.  
  39. CSRCS        += prefapi.c
  40.  
  41. include $(DEPTH)/config/rules.mk
  42.  
  43. INCLUDES    += -I$(DEPTH)/cmd/xfe/icons -Iunix
  44.  
  45. GARBAGE        += unix/jsbuffer.h
  46.  
  47. CONFIG_FILES    = initpref.js \
  48.           init/all.js \
  49.           $(NULL)
  50.  
  51. ifdef MOZ_MAIL_NEWS
  52. CONFIG_FILES    += \
  53.           init/mailnews.js \
  54.           $(NULL)
  55. endif
  56.  
  57. ifndef NO_SECURITY
  58. CONFIG_FILES    += \
  59.           init/security.js \
  60.           $(NULL)
  61. endif
  62.  
  63. ifdef EDITOR
  64. CONFIG_FILES    += \
  65.           init/editor.js \
  66.           $(NULL)
  67. endif
  68.  
  69. ifndef MOZ_MAIL_NEWS
  70. CONFIG_FILES    += \
  71.           init/configr.js \
  72.           $(NULL)
  73. else
  74. CONFIG_FILES    += \
  75.           init/config.js \
  76.           $(NULL)
  77. endif
  78.  
  79. CONFIG_FILES    += \
  80.           unix/unix.js \
  81.           $(NULL)
  82.  
  83. $(LIBRARY): $(OBJS)
  84.  
  85. unix/unixpref.c: unix/jsbuffer.h
  86.  
  87. unix/jsbuffer.h: Makefile $(CONFIG_FILES)
  88.     @echo "/* This is an automatically generated file */" > $@
  89.     @echo >> $@
  90.     @echo "static char* pref_init_buffer = " >> $@
  91.     @cat $(CONFIG_FILES) | sed 's/\\/\\\\/g' | sed 's/\\r/\\n/' | sed 's/\"/\\\"/g' | sed 's/^M//g' | sed 's/^/"/' | sed 's/$$/\\n"/' >> $@
  92.     @echo \; >> $@
  93.