home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / nsprpub / lib / prstreams / Makefile next >
Encoding:
Makefile  |  1998-04-08  |  2.4 KB  |  101 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. # Software distributed under the NPL is distributed on an "AS IS" basis,
  7. # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  8. # for the specific language governing rights and limitations under the
  9. # NPL.
  10. # The Initial Developer of this code under the NPL is Netscape
  11. # Communications Corporation.  Portions created by Netscape are
  12. # Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  13. # Reserved.
  14. #
  15.  
  16. #! gmake
  17.  
  18. MOD_DEPTH = ../..
  19.  
  20. include $(MOD_DEPTH)/config/config.mk
  21.  
  22. # Disable optimization of the nspr on SunOS4.1.3
  23. ifeq ($(OS_ARCH),SunOS)
  24. ifeq ($(OS_RELEASE),4.1.3_U1)
  25. OPTIMIZER =
  26. endif
  27. endif
  28. ifeq ($(OS_ARCH), IRIX)
  29. CFLAGS += -KPIC
  30. ifneq ($(OS_RELEASE),5.3)
  31. CFLAGS += -exceptions
  32. endif
  33. endif
  34.  
  35. INCLUDES = -I$(DIST)/include -I../../../include
  36.  
  37. HEADERS = *.h
  38.  
  39. CXXSRCS =           \
  40.     prstrms.cpp    \
  41.     $(NULL)
  42.  
  43. OBJS = $(addprefix $(OBJDIR)/,$(CXXSRCS:.cpp=.o))
  44.  
  45. ifeq ($(OS_ARCH), WINNT)
  46. ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
  47. EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).lib
  48. else
  49. DLLBASE=/BASE:0x30000000
  50. RES=$(OBJDIR)/prstrms.res
  51. RESNAME=$(MOD_DEPTH)/pr/src/nspr.rc
  52. OS_LIBS = user32.lib
  53. EXTRA_LIBS = $(DIST)/lib/libnspr$(MOD_VERSION).lib
  54. endif
  55. else
  56. ifeq ($(OS_ARCH), AIX)
  57. ifeq ($(CLASSIC_NSPR),1)
  58. OS_LIBS += -lC -lc
  59. else
  60. OS_LIBS += -lC_r -lc_r
  61. endif
  62. endif
  63. ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
  64. EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION)_shr
  65. else
  66. EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION)
  67. endif
  68. endif
  69.  
  70. # On NCR and SCO_SV, we can't link with extra libraries when
  71. # we build a shared library.  If we do so, the linker doesn't
  72. # complain, but we would run into weird problems at run-time.
  73. # Therefore on these platforms, we link just the .o files.
  74. ifeq ($(OS_ARCH),NCR)
  75. EXTRA_LIBS =
  76. endif
  77. ifeq ($(OS_ARCH),SCO_SV)
  78. EXTRA_LIBS =
  79. endif
  80.  
  81. ifeq ($(OS_ARCH), UNIXWARE)
  82. OS_LIBS += -lC
  83. endif
  84.  
  85. LIBRARY_NAME    = prstrms
  86. LIBRARY_VERSION = $(MOD_VERSION)
  87.  
  88. RELEASE_HEADERS = $(HEADERS)
  89. RELEASE_HEADERS_DEST = $(RELEASE_INCLUDE_DIR)
  90. RELEASE_LIBS    = $(TARGETS)
  91.  
  92. include $(MOD_DEPTH)/config/rules.mk
  93.  
  94. export:: $(TARGETS) $(HEADERS)
  95.     $(INSTALL) -m 444 $(HEADERS) $(DIST)/include
  96.     $(INSTALL) -m 444 $(TARGETS) $(DIST)/lib
  97.  
  98. install:: export
  99.