1999-10-15 21:36:53 +00:00
|
|
|
#! gmake
|
|
|
|
#
|
2004-04-25 15:03:26 +00: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-20 21:48:45 +00:00
|
|
|
# The Original Code is the Netscape Portable Runtime (NSPR).
|
2004-04-25 15:03:26 +00: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-13 20:59:02 +00:00
|
|
|
# Contributor(s):
|
2004-04-25 15:03:26 +00: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-15 21:36:53 +00: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-29 21:02:55 +00: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-16 22:46:02 +00:00
|
|
|
# autoconf.mk must be deleted last (from the top-level directory)
|
|
|
|
# because it is included by every makefile.
|
2001-05-11 23:57:21 +00:00
|
|
|
DIST_GARBAGE = nsprincl.mk nsprincl.sh nspr-config
|
|
|
|
|
|
|
|
RELEASE_BINS = nspr-config
|
2000-03-16 22:46:02 +00:00
|
|
|
|
1999-10-15 21:36:53 +00:00
|
|
|
include $(topsrcdir)/config/config.mk
|
|
|
|
|
2000-12-30 00:47:58 +00:00
|
|
|
CSRCS = now.c
|
1999-10-15 21:36:53 +00:00
|
|
|
|
2000-12-30 00:47:58 +00:00
|
|
|
# This version hasn't been ported for us; the one in mozilla/config has
|
|
|
|
ifneq ($(OS_ARCH),OS2)
|
|
|
|
CSRCS += nsinstall.c
|
|
|
|
|
1999-10-15 21:36:53 +00:00
|
|
|
PLSRCS = nfspwd.pl
|
2000-12-30 00:47:58 +00:00
|
|
|
endif
|
1999-10-15 21:36:53 +00:00
|
|
|
|
2004-04-12 22:31:36 +00:00
|
|
|
ifeq (,$(CROSS_COMPILE)$(filter-out WINNT OS2,$(OS_ARCH)))
|
1999-10-15 21:36:53 +00: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 02:23:42 +00: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-15 21:36:53 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(OS_ARCH), HP-UX)
|
|
|
|
ifeq ($(USE_64),1)
|
2002-05-18 00:41:20 +00:00
|
|
|
XLDOPTS += +DD64
|
1999-10-15 21:36:53 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2000-12-30 00:47:58 +00:00
|
|
|
ifeq ($(MOZ_OS2_TOOLS),EMX)
|
2001-03-21 15:56:31 +00:00
|
|
|
XCFLAGS = $(OS_CFLAGS)
|
2000-12-30 00:47:58 +00:00
|
|
|
ifeq ($(MOZ_OS2_EMX_OBJECTFORMAT),OMF)
|
|
|
|
XLDOPTS = -Zlinker /PM:VIO
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(MOZ_OS2_TOOLS),PGCC)
|
2001-03-21 15:56:31 +00:00
|
|
|
XCFLAGS = $(OS_CFLAGS)
|
1999-10-15 21:36:53 +00:00
|
|
|
XLDOPTS = -Zlinker /PM:VIO
|
|
|
|
endif
|
|
|
|
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
|
|
|
PROGS = $(OBJDIR)/now$(PROG_SUFFIX)
|
|
|
|
|
2004-04-12 22:31:36 +00:00
|
|
|
ifeq (,$(CROSS_COMPILE)$(filter-out OS2 WINNT,$(OS_ARCH)))
|
1999-10-15 21:36:53 +00: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 16:26:24 +00:00
|
|
|
ifndef NS_USE_GCC
|
2005-06-01 14:28:35 +00:00
|
|
|
OUTOPTION = -Fe
|
1999-10-15 21:36:53 +00:00
|
|
|
endif
|
2003-01-20 16:26:24 +00:00
|
|
|
endif
|
1999-10-15 21:36:53 +00: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-15 22:57:39 +00:00
|
|
|
rm -f $(dist_bindir)/nspr-config
|
1999-10-15 21:36:53 +00:00
|
|
|
|
2005-04-29 21:02:55 +00: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-15 21:36:53 +00:00
|
|
|
$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
|
|
|
|
@$(MAKE_OBJDIR)
|
|
|
|
ifeq ($(MOZ_OS2_TOOLS),VACPP)
|
2001-02-24 05:39:43 +00:00
|
|
|
$(LD) $(EXEFLAGS) $<
|
1999-10-15 21:36:53 +00:00
|
|
|
else
|
2002-12-12 00:13:46 +00:00
|
|
|
$(CC) $(XCFLAGS) $< $(LDFLAGS) $(XLDOPTS) $(OUTOPTION)$@
|
1999-10-19 05:30:36 +00:00
|
|
|
endif
|
2001-05-11 23:57:21 +00:00
|
|
|
|
2005-11-23 06:35:20 +00:00
|
|
|
install:: nspr.m4
|
2001-05-11 23:57:21 +00:00
|
|
|
$(NSINSTALL) -D $(DESTDIR)$(datadir)/aclocal
|
|
|
|
$(NSINSTALL) -t -m 0644 $< $(DESTDIR)$(datadir)/aclocal
|