michael@0: # vim:set ts=8 sw=8 sts=8 et: michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: PREF_JS_EXPORTS = $(srcdir)/xulrunner.js michael@0: GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/,xulrunner.js) michael@0: michael@0: DEFINES += -DAB_CD=$(AB_CD) michael@0: michael@0: ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) michael@0: TK_LIBS := -framework Cocoa $(TK_LIBS) michael@0: endif michael@0: michael@0: LIBS += \ michael@0: $(XPCOM_STANDALONE_GLUE_LDOPTS) \ michael@0: $(NULL) michael@0: michael@0: ifndef MOZ_WINCONSOLE michael@0: ifdef MOZ_DEBUG michael@0: MOZ_WINCONSOLE = 1 michael@0: else michael@0: MOZ_WINCONSOLE = 0 michael@0: endif michael@0: endif michael@0: michael@0: # This switches $(INSTALL) to copy mode, like $(SYSINSTALL), so things that michael@0: # shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall. michael@0: NSDISTMODE = copy michael@0: michael@0: include $(topsrcdir)/config/config.mk michael@0: michael@0: ifeq ($(OS_ARCH),WINNT) michael@0: OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool) michael@0: endif michael@0: michael@0: include $(topsrcdir)/config/rules.mk michael@0: michael@0: DEFINES += -DXULRUNNER_ICO='"$(DIST)/branding/xulrunner.ico"' -DDOCUMENT_ICO='"$(DIST)/branding/document.ico"' michael@0: michael@0: ifdef MOZ_WIDGET_GTK michael@0: libs:: michael@0: $(INSTALL) $(IFLAGS1) $(DIST)/branding/default16.png $(DIST)/bin/chrome/icons/default michael@0: $(INSTALL) $(IFLAGS1) $(DIST)/branding/default32.png $(DIST)/bin/chrome/icons/default michael@0: $(INSTALL) $(IFLAGS1) $(DIST)/branding/default48.png $(DIST)/bin/chrome/icons/default michael@0: endif michael@0: michael@0: # XXX applications would need to supply this file michael@0: #export:: brand.dtd.in michael@0: # $(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $^ -o brand.dtd) michael@0: michael@0: export:: michael@0: $(NSINSTALL) -D $(DIST)/branding michael@0: ifeq ($(OS_ARCH),WINNT) michael@0: cp $(srcdir)/xulrunner.ico $(DIST)/branding/xulrunner.ico michael@0: cp $(srcdir)/xulrunner.ico $(DIST)/branding/app.ico michael@0: cp $(srcdir)/document.ico $(DIST)/branding/document.ico michael@0: endif michael@0: ifdef MOZ_WIDGET_GTK michael@0: cp $(srcdir)/default16.png $(DIST)/branding/default16.png michael@0: cp $(srcdir)/default32.png $(DIST)/branding/default32.png michael@0: cp $(srcdir)/default48.png $(DIST)/branding/default48.png michael@0: endif michael@0: michael@0: ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) michael@0: michael@0: FRAMEWORK_NAME = XUL michael@0: FRAMEWORK_VERSION = $(MOZILLA_VERSION) michael@0: michael@0: FRAMEWORK_DIR = \ michael@0: $(DIST)/$(FRAMEWORK_NAME).framework/Versions/$(FRAMEWORK_VERSION) michael@0: michael@0: $(FRAMEWORK_DIR)/Resources: michael@0: $(NSINSTALL) -D $@ michael@0: michael@0: tools:: $(PROGRAM) $(FRAMEWORK_DIR)/Resources michael@0: $(NSINSTALL) $(srcdir)/macbuild/InfoPlist.strings $(FRAMEWORK_DIR)/Resources michael@0: sed -e 's/APP_VERSION/$(APP_VERSION)/' $(srcdir)/macbuild/Info.plist.in > $(FRAMEWORK_DIR)/Info.plist michael@0: rsync -av $(DIST)/bin/ $(FRAMEWORK_DIR) --exclude mangle --exclude shlibsign michael@0: rm -f $(DIST)/$(FRAMEWORK_NAME).framework/Versions/Current \ michael@0: $(DIST)/$(FRAMEWORK_NAME).framework/libxpcom.dylib \ michael@0: $(DIST)/$(FRAMEWORK_NAME).framework/XUL \ michael@0: $(DIST)/$(FRAMEWORK_NAME).framework/xulrunner michael@0: ln -s $(FRAMEWORK_VERSION) $(DIST)/$(FRAMEWORK_NAME).framework/Versions/Current michael@0: ln -s Versions/Current/libxpcom.dylib $(DIST)/$(FRAMEWORK_NAME).framework/libxpcom.dylib michael@0: ln -s Versions/Current/XUL $(DIST)/$(FRAMEWORK_NAME).framework/XUL michael@0: ln -s Versions/Current/xulrunner $(DIST)/$(FRAMEWORK_NAME).framework/xulrunner michael@0: michael@0: clean clobber:: michael@0: rm -rf $(DIST)/$(FRAMEWORK_NAME).framework michael@0: endif michael@0: michael@0: README_FILE = $(srcdir)/../README.xulrunner michael@0: michael@0: libs:: michael@0: $(INSTALL) $(IFLAGS1) $(README_FILE) $(DIST)/bin michael@0: $(INSTALL) $(IFLAGS1) $(topsrcdir)/LICENSE $(DIST)/bin michael@0: $(INSTALL) $(IFLAGS1) $(srcdir)/install_app.py $(DIST)/bin michael@0: