1999-10-16 01:36:53 +04:00
|
|
|
#! gmake
|
|
|
|
#
|
2004-04-25 19:03:26 +04:00
|
|
|
# ***** BEGIN LICENSE BLOCK *****
|
|
|
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
#
|
|
|
|
# The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
# 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
# http://www.mozilla.org/MPL/
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
# for the specific language governing rights and limitations under the
|
|
|
|
# License.
|
|
|
|
#
|
2000-06-21 01:48:45 +04:00
|
|
|
# The Original Code is the Netscape Portable Runtime (NSPR).
|
2004-04-25 19:03:26 +04:00
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is
|
|
|
|
# Netscape Communications Corporation.
|
|
|
|
# Portions created by the Initial Developer are Copyright (C) 1998-2000
|
|
|
|
# the Initial Developer. All Rights Reserved.
|
|
|
|
#
|
2000-06-14 00:59:02 +04:00
|
|
|
# Contributor(s):
|
2004-04-25 19:03:26 +04:00
|
|
|
#
|
|
|
|
# Alternatively, the contents of this file may be used under the terms of
|
|
|
|
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
# in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
# of those above. If you wish to allow use of your version of this file only
|
|
|
|
# under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
# use your version of this file under the terms of the MPL, indicate your
|
|
|
|
# decision by deleting the provisions above and replace them with the notice
|
|
|
|
# and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
# the provisions above, a recipient may use your version of this file under
|
|
|
|
# the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
#
|
|
|
|
# ***** END LICENSE BLOCK *****
|
1999-10-16 01:36:53 +04:00
|
|
|
|
|
|
|
MOD_DEPTH = ..
|
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(MOD_DEPTH)/config/autoconf.mk
|
|
|
|
|
|
|
|
# Indicate that this directory builds build tools.
|
|
|
|
INTERNAL_TOOLS = 1
|
|
|
|
|
2005-04-30 01:02:55 +04:00
|
|
|
# For sanity's sake, we compile nsinstall without the wrapped system
|
|
|
|
# headers, so that we can use it to set up the wrapped system headers.
|
|
|
|
VISIBILITY_FLAGS =
|
|
|
|
|
2000-03-17 01:46:02 +03:00
|
|
|
# autoconf.mk must be deleted last (from the top-level directory)
|
|
|
|
# because it is included by every makefile.
|
2001-05-12 03:57:21 +04:00
|
|
|
DIST_GARBAGE = nsprincl.mk nsprincl.sh nspr-config
|
|
|
|
|
|
|
|
RELEASE_BINS = nspr-config
|
2000-03-17 01:46:02 +03:00
|
|
|
|
1999-10-16 01:36:53 +04:00
|
|
|
include $(topsrcdir)/config/config.mk
|
|
|
|
|
2000-12-30 03:47:58 +03:00
|
|
|
CSRCS = now.c
|
1999-10-16 01:36:53 +04:00
|
|
|
|
2000-12-30 03:47:58 +03:00
|
|
|
# This version hasn't been ported for us; the one in mozilla/config has
|
|
|
|
ifneq ($(OS_ARCH),OS2)
|
|
|
|
CSRCS += nsinstall.c
|
|
|
|
|
1999-10-16 01:36:53 +04:00
|
|
|
PLSRCS = nfspwd.pl
|
2000-12-30 03:47:58 +03:00
|
|
|
endif
|
1999-10-16 01:36:53 +04:00
|
|
|
|
2004-04-13 02:31:36 +04:00
|
|
|
ifeq (,$(CROSS_COMPILE)$(filter-out WINNT OS2,$(OS_ARCH)))
|
1999-10-16 01:36:53 +04:00
|
|
|
PROG_SUFFIX = .exe
|
|
|
|
else
|
|
|
|
PROG_SUFFIX =
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Temporary workaround to disable the generation of
|
|
|
|
# library build time because now.c uses the 'long long'
|
|
|
|
# data type that's not available on some platforms.
|
|
|
|
ifeq (,$(filter-out NEC NEXTSTEP QNX SCOOS UNIXWARE,$(OS_ARCH)))
|
|
|
|
DEFINES += -DOMIT_LIB_BUILD_TIME
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS_ARCH), IRIX)
|
|
|
|
ifeq ($(basename $(OS_RELEASE)),6)
|
2001-06-14 06:23:42 +04:00
|
|
|
ifndef NS_USE_GCC
|
|
|
|
ifeq ($(USE_N32),1)
|
|
|
|
XLDOPTS += -n32 -Wl,-woff,85
|
|
|
|
else
|
|
|
|
ifeq ($(USE_64),1)
|
|
|
|
XLDOPTS += -64
|
|
|
|
else
|
|
|
|
XLDOPTS += -32
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
1999-10-16 01:36:53 +04:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS_ARCH), HP-UX)
|
|
|
|
ifeq ($(USE_64),1)
|
2002-05-18 04:41:20 +04:00
|
|
|
XLDOPTS += +DD64
|
1999-10-16 01:36:53 +04:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2000-12-30 03:47:58 +03:00
|
|
|
ifeq ($(MOZ_OS2_TOOLS),EMX)
|
2001-03-21 18:56:31 +03:00
|
|
|
XCFLAGS = $(OS_CFLAGS)
|
2000-12-30 03:47:58 +03:00
|
|
|
ifeq ($(MOZ_OS2_EMX_OBJECTFORMAT),OMF)
|
|
|
|
XLDOPTS = -Zlinker /PM:VIO
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(MOZ_OS2_TOOLS),PGCC)
|
2001-03-21 18:56:31 +03:00
|
|
|
XCFLAGS = $(OS_CFLAGS)
|
1999-10-16 01:36:53 +04:00
|
|
|
XLDOPTS = -Zlinker /PM:VIO
|
|
|
|
endif
|
|
|
|
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
|
|
|
PROGS = $(OBJDIR)/now$(PROG_SUFFIX)
|
|
|
|
|
2004-04-13 02:31:36 +04:00
|
|
|
ifeq (,$(CROSS_COMPILE)$(filter-out OS2 WINNT,$(OS_ARCH)))
|
1999-10-16 01:36:53 +04:00
|
|
|
TARGETS = $(PROGS)
|
|
|
|
else
|
|
|
|
PROGS += $(OBJDIR)/nsinstall$(PROG_SUFFIX)
|
|
|
|
TARGETS = $(PROGS) $(PLSRCS:.pl=)
|
|
|
|
endif
|
|
|
|
|
|
|
|
OUTOPTION = -o # end of the line
|
|
|
|
ifeq (,$(filter-out WINNT WIN95,$(OS_TARGET)))
|
2003-01-20 19:26:24 +03:00
|
|
|
ifndef NS_USE_GCC
|
2005-06-01 18:28:35 +04:00
|
|
|
OUTOPTION = -Fe
|
1999-10-16 01:36:53 +04:00
|
|
|
endif
|
2003-01-20 19:26:24 +03:00
|
|
|
endif
|
1999-10-16 01:36:53 +04:00
|
|
|
|
|
|
|
# Redefine MAKE_OBJDIR for just this directory
|
|
|
|
define MAKE_OBJDIR
|
|
|
|
if test ! -d $(@D); then rm -rf $(@D); mkdir $(@D); else true; fi
|
|
|
|
endef
|
|
|
|
|
|
|
|
export:: $(TARGETS)
|
2001-05-16 02:57:39 +04:00
|
|
|
rm -f $(dist_bindir)/nspr-config
|
1999-10-16 01:36:53 +04:00
|
|
|
|
2005-04-30 01:02:55 +04:00
|
|
|
ifdef WRAP_SYSTEM_INCLUDES
|
|
|
|
export::
|
|
|
|
if test ! -d system_wrappers; then mkdir system_wrappers; fi
|
|
|
|
$(PERL) $(srcdir)/make-system-wrappers.pl system_wrappers < $(srcdir)/system-headers
|
|
|
|
$(INSTALL) system_wrappers $(dist_includedir)
|
|
|
|
endif
|
|
|
|
|
1999-10-16 01:36:53 +04:00
|
|
|
$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
|
|
|
|
@$(MAKE_OBJDIR)
|
|
|
|
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
2001-02-24 08:39:43 +03:00
|
|
|
$(LD) $(EXEFLAGS) $<
|
1999-10-16 01:36:53 +04:00
|
|
|
else
|
2002-12-12 03:13:46 +03:00
|
|
|
$(CC) $(XCFLAGS) $< $(LDFLAGS) $(XLDOPTS) $(OUTOPTION)$@
|
1999-10-19 09:30:36 +04:00
|
|
|
endif
|
2001-05-12 03:57:21 +04:00
|
|
|
|
|
|
|
real_install:: nspr.m4
|
|
|
|
$(NSINSTALL) -D $(DESTDIR)$(datadir)/aclocal
|
|
|
|
$(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(datadir)/aclocal
|