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
34 ifeq (,$(CROSS_COMPILE
)$(filter-out WINNT
,$(OS_ARCH
)))
40 # Temporary workaround to disable the generation of
41 # library build time because now.c uses the 'long long'
42 # data type that's not available on some platforms.
43 ifeq (,$(filter-out QNX
,$(OS_ARCH
)))
44 DEFINES
+= -DOMIT_LIB_BUILD_TIME
47 ifeq ($(OS_ARCH
), HP-UX
)
53 include $(topsrcdir
)/config
/rules.mk
55 PROGS
= $(OBJDIR
)/now
$(PROG_SUFFIX
)
57 ifeq (,$(CROSS_COMPILE
)$(filter-out WINNT
,$(OS_ARCH
)))
60 ifeq (,$(filter-out WINCE
,$(OS_ARCH
)))
63 PROGS
+= $(OBJDIR
)/nsinstall
$(PROG_SUFFIX
)
64 TARGETS
= $(PROGS
) $(PLSRCS
:.pl
=)
68 OUTOPTION
= -o
# end of the line
69 ifeq (,$(filter-out WINNT WIN95 WINCE
,$(OS_TARGET
)))
75 # Redefine MAKE_OBJDIR for just this directory
77 if
test ! -d
$(@D
); then
rm -rf
$(@D
); mkdir
$(@D
); else true
; fi
81 rm -f
$(dist_bindir
)/nspr-config
83 ifdef WRAP_SYSTEM_INCLUDES
85 if
test ! -d system_wrappers
; then mkdir system_wrappers
; fi
86 $(PERL
) $(srcdir)/make-system-wrappers.pl system_wrappers
< $(srcdir)/system-headers
87 $(INSTALL
) system_wrappers
$(dist_includedir
)
90 $(OBJDIR
)/%$(PROG_SUFFIX
): $(OBJDIR
)/%.
$(OBJ_SUFFIX
)
92 $(CC
) $(XCFLAGS
) $< $(LDFLAGS
) $(XLDOPTS
) $(OUTOPTION
)$@
95 $(NSINSTALL
) -D
$(DESTDIR
)$(datadir)/aclocal
96 $(NSINSTALL
) -t
-m
0644 $< $(DESTDIR
)$(datadir)/aclocal
99 $(NSINSTALL
) -D
$(DESTDIR
)$(libdir)/pkgconfig
100 $(NSINSTALL
) -t
-m
0644 $< $(DESTDIR
)$(libdir)/pkgconfig