home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / nsprpub / config / Linux.mk < prev    next >
Encoding:
Text File  |  1998-04-08  |  2.9 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. ######################################################################
  17. # Config stuff for Linux (all architectures)
  18. ######################################################################
  19.  
  20. ######################################################################
  21. # Version-independent
  22. ######################################################################
  23.  
  24. include $(MOD_DEPTH)/config/UNIX.mk
  25.  
  26. #
  27. # The default implementation strategy for Linux is classic nspr.
  28. #
  29. ifeq ($(USE_PTHREADS),1)
  30. IMPL_STRATEGY = _PTH
  31. DEFINES            += -D_REENTRANT
  32. else
  33. DEFINES            += -D_PR_LOCAL_THREADS_ONLY
  34. endif
  35.  
  36. ifeq (86,$(findstring 86,$(OS_TEST)))
  37. CPU_ARCH        := x86
  38. else
  39. CPU_ARCH        := $(OS_TEST)
  40. endif
  41.  
  42. CC            = gcc
  43. CCC            = g++
  44. RANLIB            = ranlib
  45.  
  46. OS_INCLUDES        =
  47. G++INCLUDES        = -I/usr/include/g++
  48.  
  49. # The -pipe flag doesn't work on Alpha Linux in recursive sub-makes
  50. #PLATFORM_FLAGS        = -ansi -Wall -pipe -DLINUX -Dlinux
  51. PLATFORM_FLAGS        = -ansi -Wall -DLINUX -Dlinux
  52. PORT_FLAGS        = -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR
  53.  
  54. OS_CFLAGS        = $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
  55.  
  56. ######################################################################
  57. # Version-specific stuff
  58. ######################################################################
  59.  
  60. ifeq ($(CPU_ARCH),alpha)
  61. PLATFORM_FLAGS        += -DLINUX1_2 -D_ALPHA_ -D__alpha
  62. endif
  63. ifeq ($(CPU_ARCH),ppc)
  64. PLATFORM_FLAGS        += -DMKLINUX -DMACLINUX -DLINUX1_2
  65. OS_INCLUDES        += -I/usr/local/include
  66. endif
  67. ifeq ($(CPU_ARCH),sparc)
  68. PLATFORM_FLAGS        += -DLINUX1_2
  69. endif
  70. ifeq ($(CPU_ARCH),x86)
  71. PLATFORM_FLAGS        += -mno-486 -DLINUX1_2 -Di386
  72. endif
  73.  
  74. ifeq ($(OS_RELEASE),2.0)
  75. PLATFORM_FLAGS        += -DLINUX2_0
  76. endif
  77.  
  78. #
  79. # Linux ppc and 2.0 have shared libraries.
  80. #
  81.  
  82. MKSHLIB            = $(LD) $(DSO_LDOPTS) -soname $(@:$(OBJDIR)/%.so=%.so)
  83.  
  84. ######################################################################
  85. # Overrides for defaults in config.mk (or wherever)
  86. ######################################################################
  87.  
  88. ifneq (,$(filter-out x86 ppc,$(CPU_ARCH)))
  89. CPU_ARCH_TAG        = _$(CPU_ARCH)
  90. endif
  91.  
  92. ######################################################################
  93. # Other
  94. ######################################################################
  95.  
  96. DSO_CFLAGS        = -fPIC
  97. DSO_LDOPTS        = -shared
  98. DSO_LDFLAGS        =
  99.