3 # ***** BEGIN LICENSE BLOCK *****
4 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 # The contents of this file are subject to the Mozilla Public License Version
7 # 1.1 (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
9 # http://www.mozilla.org/MPL/
11 # Software distributed under the License is distributed on an "AS IS" basis,
12 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 # for the specific language governing rights and limitations under the
16 # The Original Code is the Netscape Portable Runtime (NSPR).
18 # The Initial Developer of the Original Code is
19 # Netscape Communications Corporation.
20 # Portions created by the Initial Developer are Copyright (C) 1998-2000
21 # the Initial Developer. All Rights Reserved.
25 # Alternatively, the contents of this file may be used under the terms of
26 # either the GNU General Public License Version 2 or later (the "GPL"), or
27 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 # in which case the provisions of the GPL or the LGPL are applicable instead
29 # of those above. If you wish to allow use of your version of this file only
30 # under the terms of either the GPL or the LGPL, and not to allow others to
31 # use your version of this file under the terms of the MPL, indicate your
32 # decision by deleting the provisions above and replace them with the notice
33 # and other provisions required by the GPL or the LGPL. If you do not delete
34 # the provisions above, a recipient may use your version of this file under
35 # the terms of any one of the MPL, the GPL or the LGPL.
37 # ***** END LICENSE BLOCK *****
40 topsrcdir
= @top_srcdir@
44 include $(MOD_DEPTH
)/config
/autoconf.mk
46 # Indicate that this directory builds build tools.
49 # For sanity's sake, we compile nsinstall without the wrapped system
50 # headers, so that we can use it to set up the wrapped system headers.
53 # autoconf.mk must be deleted last (from the top-level directory)
54 # because it is included by every makefile.
55 DIST_GARBAGE
= nsprincl.mk nsprincl.sh nspr-config
57 RELEASE_BINS
= nspr-config
59 include $(topsrcdir
)/config
/config.mk
63 # This version hasn't been ported for us; the one in mozilla/config has
64 ifneq ($(OS_ARCH
),OS2
)
70 ifeq (,$(CROSS_COMPILE
)$(filter-out WINNT OS2
,$(OS_ARCH
)))
76 # Temporary workaround to disable the generation of
77 # library build time because now.c uses the 'long long'
78 # data type that's not available on some platforms.
79 ifeq (,$(filter-out NEC NEXTSTEP QNX SCOOS UNIXWARE
,$(OS_ARCH
)))
80 DEFINES
+= -DOMIT_LIB_BUILD_TIME
83 ifeq ($(OS_ARCH
), IRIX
)
84 ifeq ($(basename $(OS_RELEASE
)),6)
87 XLDOPTS
+= -n32
-Wl
,-woff
,85
99 ifeq ($(OS_ARCH
), HP-UX
)
105 ifeq ($(OS_ARCH
), OS2
)
106 XCFLAGS
= $(OS_CFLAGS
)
109 include $(topsrcdir
)/config
/rules.mk
111 PROGS
= $(OBJDIR
)/now
$(PROG_SUFFIX
)
113 ifeq (,$(CROSS_COMPILE
)$(filter-out OS2 WINNT
,$(OS_ARCH
)))
116 PROGS
+= $(OBJDIR
)/nsinstall
$(PROG_SUFFIX
)
117 TARGETS
= $(PROGS
) $(PLSRCS
:.pl
=)
120 OUTOPTION
= -o
# end of the line
121 ifeq (,$(filter-out WINNT WIN95
,$(OS_TARGET
)))
127 # Redefine MAKE_OBJDIR for just this directory
129 if
test ! -d
$(@D
); then
rm -rf
$(@D
); mkdir
$(@D
); else true
; fi
133 rm -f
$(dist_bindir
)/nspr-config
135 ifdef WRAP_SYSTEM_INCLUDES
137 if
test ! -d system_wrappers
; then mkdir system_wrappers
; fi
138 $(PERL
) $(srcdir)/make-system-wrappers.pl system_wrappers
< $(srcdir)/system-headers
139 $(INSTALL
) system_wrappers
$(dist_includedir
)
142 $(OBJDIR
)/%$(PROG_SUFFIX
): $(OBJDIR
)/%.
$(OBJ_SUFFIX
)
144 $(CC
) $(XCFLAGS
) $< $(LDFLAGS
) $(XLDOPTS
) $(OUTOPTION
)$@
147 $(NSINSTALL
) -D
$(DESTDIR
)$(datadir)/aclocal
148 $(NSINSTALL
) -t
-m
0644 $< $(DESTDIR
)$(datadir)/aclocal