1999-04-13 04:15:34 +00:00
|
|
|
#
|
1999-11-06 03:40:37 +00:00
|
|
|
# The contents of this file are subject to the Netscape 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/NPL/
|
1999-04-13 04:15:34 +00:00
|
|
|
#
|
1999-11-06 03:40:37 +00:00
|
|
|
# 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.
|
1999-04-13 04:15:34 +00:00
|
|
|
#
|
|
|
|
# The Original Code is Mozilla Communicator client code,
|
|
|
|
# released March 31, 1998.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is Netscape Communications
|
1999-11-06 03:40:37 +00:00
|
|
|
# Corporation. Portions created by Netscape are
|
|
|
|
# Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
# Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
1999-04-13 04:15:34 +00:00
|
|
|
#
|
|
|
|
|
1999-09-01 23:27:16 +00:00
|
|
|
DEPTH = ../..
|
1999-04-13 04:15:34 +00:00
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
2004-01-07 13:37:00 +00:00
|
|
|
MODULE = build
|
|
|
|
PACKAGE_FILE = unix.pkg
|
|
|
|
|
1999-09-01 23:27:16 +00:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
1999-04-13 04:15:34 +00:00
|
|
|
|
2002-04-25 02:52:44 +00:00
|
|
|
# Hack to make sure that mozilla-config has the proper nspr dependencies
|
|
|
|
ifdef MOZ_NATIVE_NSPR
|
|
|
|
FULL_NSPR_CFLAGS=$(shell $(NSPR_CONFIG) --cflags)
|
|
|
|
FULL_NSPR_LIBS=$(shell $(NSPR_CONFIG) --libs)
|
|
|
|
else
|
|
|
|
FULL_NSPR_CFLAGS=-I$(includedir)/nspr
|
|
|
|
FULL_NSPR_LIBS=$(subst -L$(libdir),-L$(mozappdir),$(shell $(DEPTH)/nsprpub/config/nspr-config --libs))
|
|
|
|
endif
|
|
|
|
|
2002-11-19 03:11:13 +00:00
|
|
|
ifdef MOZ_ENABLE_GTK
|
|
|
|
SUPERWIN_LIBS=-lgtksuperwin
|
|
|
|
endif
|
|
|
|
|
2002-07-11 20:19:14 +00:00
|
|
|
_DEFS = $(subst \,\\\\\,$(ACDEFINES))
|
2002-04-25 02:52:44 +00:00
|
|
|
|
2004-02-25 03:27:11 +00:00
|
|
|
pkg_config_files=$(MOZ_APP_NAME)-nspr.pc $(MOZ_APP_NAME)-xpcom.pc \
|
|
|
|
$(MOZ_APP_NAME)-js.pc $(MOZ_APP_NAME)-gtkmozembed.pc \
|
|
|
|
$(MOZ_APP_NAME)-nss.pc $(MOZ_APP_NAME)-plugin.pc
|
2002-05-29 22:14:08 +00:00
|
|
|
|
2002-07-06 20:00:45 +00:00
|
|
|
GARBAGE = $(pkg_config_files) mozilla-config
|
|
|
|
|
2004-02-25 03:27:11 +00:00
|
|
|
$(MOZ_APP_NAME)-config:: mozilla-config.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
|
2002-04-25 02:52:44 +00:00
|
|
|
cat $< | sed \
|
|
|
|
-e "s|%prefix%|$(prefix)|" \
|
|
|
|
-e "s|%exec_prefix%|$(exec_prefix)|" \
|
|
|
|
-e "s|%includedir%|$(includedir)|" \
|
|
|
|
-e "s|%libdir%|$(mozappdir)|" \
|
2004-02-25 03:27:11 +00:00
|
|
|
-e "s|%idldir%|$(idldir)|" \
|
|
|
|
-e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
|
2002-05-29 22:14:08 +00:00
|
|
|
-e "s|%DEFS%|$(_DEFS)|" \
|
|
|
|
-e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
|
|
|
|
-e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" > $@
|
|
|
|
|
2004-02-25 03:27:11 +00:00
|
|
|
$(MOZ_APP_NAME)-%.pc : mozilla-%.pc.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
|
2002-05-29 22:14:08 +00:00
|
|
|
cat $< | sed \
|
|
|
|
-e "s|%prefix%|$(prefix)|" \
|
|
|
|
-e "s|%exec_prefix%|$(exec_prefix)|" \
|
|
|
|
-e "s|%includedir%|$(includedir)|" \
|
|
|
|
-e "s|%libdir%|$(mozappdir)|" \
|
2004-02-25 03:27:11 +00:00
|
|
|
-e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
|
2002-11-19 03:11:13 +00:00
|
|
|
-e "s|%SUPERWIN_LIBS%|$(SUPERWIN_LIBS)|" \
|
2002-04-25 02:52:44 +00:00
|
|
|
-e "s|%DEFS%|$(_DEFS)|" \
|
|
|
|
-e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
|
|
|
|
-e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" > $@
|
|
|
|
|
2004-02-25 03:27:11 +00:00
|
|
|
libs:: $(MOZ_APP_NAME)-config
|
2002-04-25 02:52:44 +00:00
|
|
|
chmod 755 $<
|
|
|
|
$(INSTALL) -m 755 $< $(DIST)/bin
|
1999-09-06 04:20:50 +00:00
|
|
|
|
2002-05-29 22:14:08 +00:00
|
|
|
libs:: $(srcdir)/run-mozilla.sh $(pkg_config_files)
|
2000-04-13 20:17:35 +00:00
|
|
|
$(INSTALL) $< $(DIST)/bin
|
2002-04-25 02:52:44 +00:00
|
|
|
|
2002-12-12 00:08:59 +00:00
|
|
|
ifeq ($(OS_ARCH),OpenVMS)
|
|
|
|
libs:: vms/mozilla.com vms/install.com vms/getinfo.com
|
|
|
|
$(INSTALL) $? $(DIST)/bin
|
|
|
|
endif
|
|
|
|
|
2002-04-25 02:52:44 +00:00
|
|
|
install:: run-mozilla.sh
|
|
|
|
$(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(mozappdir)
|
|
|
|
|
2004-02-25 03:27:11 +00:00
|
|
|
install:: $(MOZ_APP_NAME)-config
|
2002-04-25 02:52:44 +00:00
|
|
|
$(SYSINSTALL) $(IFLAGS2) $< $(DESTDIR)$(bindir)
|
|
|
|
|
2002-05-29 22:14:08 +00:00
|
|
|
install:: $(pkg_config_files)
|
|
|
|
chmod 644 $<
|
|
|
|
$(SYSINSTALL) $(IFLAGS1) $(pkg_config_files) \
|
|
|
|
$(DESTDIR)$(libdir)/pkgconfig
|