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/.
8 topsrcdir
= @top_srcdir@
12 include $(MOD_DEPTH
)/config
/autoconf.mk
14 # Indicate that this directory builds build tools.
17 # For sanity's sake, we compile nsinstall without the wrapped system
18 # headers, so that we can use it to set up the wrapped system headers.
21 # autoconf.mk must be deleted last (from the top-level directory)
22 # because it is included by every makefile.
23 DIST_GARBAGE
= nsprincl.mk nsprincl.sh nspr-config nspr.
pc
25 RELEASE_BINS
= nspr-config
27 include $(topsrcdir
)/config
/config.mk
31 # This version hasn't been ported for us; the one in mozilla/config has
32 ifneq ($(OS_ARCH
),OS2
)
38 ifeq (,$(CROSS_COMPILE
)$(filter-out WINNT OS2
,$(OS_ARCH
)))
44 # Temporary workaround to disable the generation of
45 # library build time because now.c uses the 'long long'
46 # data type that's not available on some platforms.
47 ifeq (,$(filter-out QNX SCOOS UNIXWARE
,$(OS_ARCH
)))
48 DEFINES
+= -DOMIT_LIB_BUILD_TIME
51 ifeq ($(OS_ARCH
), IRIX
)
52 ifeq ($(basename $(OS_RELEASE
)),6)
55 XLDOPTS
+= -n32
-Wl
,-woff
,85
67 ifeq ($(OS_ARCH
), HP-UX
)
73 ifeq ($(OS_ARCH
), OS2
)
74 XCFLAGS
= $(OS_CFLAGS
)
77 include $(topsrcdir
)/config
/rules.mk
79 PROGS
= $(OBJDIR
)/now
$(PROG_SUFFIX
)
81 ifeq (,$(CROSS_COMPILE
)$(filter-out OS2 WINNT
,$(OS_ARCH
)))
84 ifeq (,$(filter-out SYMBIAN WINCE
,$(OS_ARCH
)))
87 PROGS
+= $(OBJDIR
)/nsinstall
$(PROG_SUFFIX
)
88 TARGETS
= $(PROGS
) $(PLSRCS
:.pl
=)
92 OUTOPTION
= -o
# end of the line
93 ifeq (,$(filter-out WINNT WIN95 WINCE
,$(OS_TARGET
)))
99 # Redefine MAKE_OBJDIR for just this directory
101 if
test ! -d
$(@D
); then
rm -rf
$(@D
); mkdir
$(@D
); else true
; fi
105 rm -f
$(dist_bindir
)/nspr-config
107 ifdef WRAP_SYSTEM_INCLUDES
109 if
test ! -d system_wrappers
; then mkdir system_wrappers
; fi
110 $(PERL
) $(srcdir)/make-system-wrappers.pl system_wrappers
< $(srcdir)/system-headers
111 $(INSTALL
) system_wrappers
$(dist_includedir
)
114 $(OBJDIR
)/%$(PROG_SUFFIX
): $(OBJDIR
)/%.
$(OBJ_SUFFIX
)
116 $(CC
) $(XCFLAGS
) $< $(LDFLAGS
) $(XLDOPTS
) $(OUTOPTION
)$@
119 $(NSINSTALL
) -D
$(DESTDIR
)$(datadir)/aclocal
120 $(NSINSTALL
) -t
-m
0644 $< $(DESTDIR
)$(datadir)/aclocal
123 $(NSINSTALL
) -D
$(DESTDIR
)$(libdir)/pkgconfig
124 $(NSINSTALL
) -t
-m
0644 $< $(DESTDIR
)$(libdir)/pkgconfig