Makefile.in 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. #! gmake
  2. #
  3. # This Source Code Form is subject to the terms of the Mozilla Public
  4. # License, v. 2.0. If a copy of the MPL was not distributed with this
  5. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  6. MOD_DEPTH = ..
  7. topsrcdir = @top_srcdir@
  8. srcdir = @srcdir@
  9. VPATH = @srcdir@
  10. include $(MOD_DEPTH)/config/autoconf.mk
  11. # Indicate that this directory builds build tools.
  12. INTERNAL_TOOLS = 1
  13. # For sanity's sake, we compile nsinstall without the wrapped system
  14. # headers, so that we can use it to set up the wrapped system headers.
  15. VISIBILITY_FLAGS =
  16. # autoconf.mk must be deleted last (from the top-level directory)
  17. # because it is included by every makefile.
  18. DIST_GARBAGE = nsprincl.mk nsprincl.sh nspr-config nspr.pc
  19. RELEASE_BINS = nspr-config
  20. include $(topsrcdir)/config/config.mk
  21. CSRCS = now.c
  22. # This version hasn't been ported for us; the one in mozilla/config has
  23. ifneq ($(OS_ARCH),OS2)
  24. CSRCS += nsinstall.c
  25. PLSRCS = nfspwd.pl
  26. endif
  27. ifeq (,$(CROSS_COMPILE)$(filter-out WINNT OS2,$(OS_ARCH)))
  28. PROG_SUFFIX = .exe
  29. else
  30. PROG_SUFFIX =
  31. endif
  32. # Temporary workaround to disable the generation of
  33. # library build time because now.c uses the 'long long'
  34. # data type that's not available on some platforms.
  35. ifeq (,$(filter-out QNX SCOOS UNIXWARE,$(OS_ARCH)))
  36. DEFINES += -DOMIT_LIB_BUILD_TIME
  37. endif
  38. ifeq ($(OS_ARCH), HP-UX)
  39. ifeq ($(USE_64),1)
  40. XLDOPTS += +DD64
  41. endif
  42. endif
  43. ifeq ($(OS_ARCH), OS2)
  44. XCFLAGS = $(OS_CFLAGS)
  45. endif
  46. include $(topsrcdir)/config/rules.mk
  47. PROGS = $(OBJDIR)/now$(PROG_SUFFIX)
  48. ifeq (,$(CROSS_COMPILE)$(filter-out OS2 WINNT,$(OS_ARCH)))
  49. TARGETS = $(PROGS)
  50. else
  51. ifeq (,$(filter-out WINCE,$(OS_ARCH)))
  52. TARGETS = $(PROGS)
  53. else
  54. PROGS += $(OBJDIR)/nsinstall$(PROG_SUFFIX)
  55. TARGETS = $(PROGS) $(PLSRCS:.pl=)
  56. endif
  57. endif
  58. OUTOPTION = -o # end of the line
  59. ifeq (,$(filter-out WINNT WIN95 WINCE,$(OS_TARGET)))
  60. ifndef NS_USE_GCC
  61. OUTOPTION = -Fe
  62. endif
  63. endif
  64. # Redefine MAKE_OBJDIR for just this directory
  65. define MAKE_OBJDIR
  66. if test ! -d $(@D); then rm -rf $(@D); mkdir $(@D); else true; fi
  67. endef
  68. export:: $(TARGETS)
  69. rm -f $(dist_bindir)/nspr-config
  70. ifdef WRAP_SYSTEM_INCLUDES
  71. export::
  72. if test ! -d system_wrappers; then mkdir system_wrappers; fi
  73. $(PERL) $(srcdir)/make-system-wrappers.pl system_wrappers < $(srcdir)/system-headers
  74. $(INSTALL) system_wrappers $(dist_includedir)
  75. endif
  76. $(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
  77. @$(MAKE_OBJDIR)
  78. $(CC) $(XCFLAGS) $< $(LDFLAGS) $(XLDOPTS) $(OUTOPTION)$@
  79. install:: nspr.m4
  80. $(NSINSTALL) -D $(DESTDIR)$(datadir)/aclocal
  81. $(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(datadir)/aclocal
  82. install:: nspr.pc
  83. $(NSINSTALL) -D $(DESTDIR)$(libdir)/pkgconfig
  84. $(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(libdir)/pkgconfig