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
), HP-UX
)
57 ifeq ($(OS_ARCH
), OS2
)
58 XCFLAGS
= $(OS_CFLAGS
)
61 include $(topsrcdir
)/config
/rules.mk
63 PROGS
= $(OBJDIR
)/now
$(PROG_SUFFIX
)
65 ifeq (,$(CROSS_COMPILE
)$(filter-out OS2 WINNT
,$(OS_ARCH
)))
68 ifeq (,$(filter-out WINCE
,$(OS_ARCH
)))
71 PROGS
+= $(OBJDIR
)/nsinstall
$(PROG_SUFFIX
)
72 TARGETS
= $(PROGS
) $(PLSRCS
:.pl
=)
76 OUTOPTION
= -o
# end of the line
77 ifeq (,$(filter-out WINNT WIN95 WINCE
,$(OS_TARGET
)))
83 # Redefine MAKE_OBJDIR for just this directory
85 if
test ! -d
$(@D
); then
rm -rf
$(@D
); mkdir
$(@D
); else true
; fi
89 rm -f
$(dist_bindir
)/nspr-config
91 ifdef WRAP_SYSTEM_INCLUDES
93 if
test ! -d system_wrappers
; then mkdir system_wrappers
; fi
94 $(PERL
) $(srcdir)/make-system-wrappers.pl system_wrappers
< $(srcdir)/system-headers
95 $(INSTALL
) system_wrappers
$(dist_includedir
)
98 $(OBJDIR
)/%$(PROG_SUFFIX
): $(OBJDIR
)/%.
$(OBJ_SUFFIX
)
100 $(CC
) $(XCFLAGS
) $< $(LDFLAGS
) $(XLDOPTS
) $(OUTOPTION
)$@
103 $(NSINSTALL
) -D
$(DESTDIR
)$(datadir)/aclocal
104 $(NSINSTALL
) -t
-m
0644 $< $(DESTDIR
)$(datadir)/aclocal
107 $(NSINSTALL
) -D
$(DESTDIR
)$(libdir)/pkgconfig
108 $(NSINSTALL
) -t
-m
0644 $< $(DESTDIR
)$(libdir)/pkgconfig