jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 1 | # Copyright 2009 Google Inc. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 4 | # use this file except in compliance with the License. You may obtain a copy of |
| 5 | # the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations under |
| 13 | # the License. |
| 14 | |
| 15 | include ../config.mk |
| 16 | |
jat@google.com | 2318196 | 2009-09-03 22:22:56 +0000 | [diff] [blame] | 17 | # Make variables intended to be settable from the command line: |
jat@google.com | fbef83e | 2009-08-06 06:05:01 +0000 | [diff] [blame] | 18 | # DEFAULT_FIREFOX_LIBS points to /usr/lib/firefox or equivalent |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 19 | # PLUGIN_SDKS points to GWT /plugin-sdks directory |
| 20 | # GECKO_PLATFORM XPCOM ABI (ie, Linux_x86_64-gcc3) |
| 21 | # |
| 22 | |
| 23 | ifeq ($(OS),mac) |
jat@google.com | fbef83e | 2009-08-06 06:05:01 +0000 | [diff] [blame] | 24 | DEFAULT_FIREFOX_LIBS ?= /Applications/Firefox.app/Contents/MacOS |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 25 | RUN_PATH_FLAG = -executable_path |
| 26 | DLL_SUFFIX = .dylib |
conroy@google.com | 7c8d59f | 2011-01-27 17:50:46 +0000 | [diff] [blame] | 27 | DLLFLAGS += -bundle $(ALLARCHCFLAGS) -mmacosx-version-min=10.5 |
jat@google.com | 268f998 | 2009-11-06 21:34:25 +0000 | [diff] [blame] | 28 | CFLAGS += $(ALLARCHCFLAGS) |
| 29 | CXXFLAGS += $(ALLARCHCFLAGS) |
| 30 | TARGET_PLATFORM = Darwin-gcc3 |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 31 | # Mac puts multiple architectures into the same files |
jat@google.com | fbef83e | 2009-08-06 06:05:01 +0000 | [diff] [blame] | 32 | GECKO_PLATFORM = Darwin-gcc3 |
jat@google.com | a0d0bed | 2009-08-18 22:58:15 +0000 | [diff] [blame] | 33 | else |
| 34 | ifeq ($(OS),linux) |
jat@google.com | fbef83e | 2009-08-06 06:05:01 +0000 | [diff] [blame] | 35 | DEFAULT_FIREFOX_LIBS ?= /usr/lib/firefox |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 36 | RUN_PATH_FLAG = -rpath-link |
| 37 | DLL_SUFFIX = .so |
conroy@google.com | b109576 | 2010-10-22 11:28:03 +0000 | [diff] [blame] | 38 | DLLFLAGS += -shared -m$(FLAG32BIT) |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 39 | TARGET_PLATFORM = Linux_$(ARCH)-gcc3 |
jat@google.com | a0d0bed | 2009-08-18 22:58:15 +0000 | [diff] [blame] | 40 | else |
| 41 | ifeq ($(OS),sun) |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 42 | TARGET_PLATFORM = SunOS_$(ARCH)-sunc |
| 43 | RUN_PATH_FLAG = -rpath-link |
conroy@google.com | b109576 | 2010-10-22 11:28:03 +0000 | [diff] [blame] | 44 | DLLFLAGS ?= "" |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 45 | endif |
jat@google.com | a0d0bed | 2009-08-18 22:58:15 +0000 | [diff] [blame] | 46 | endif |
| 47 | endif |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 48 | |
| 49 | export FLAG32BIT |
| 50 | |
| 51 | ifeq ($(BROWSER),) |
acleung@google.com | 5531884 | 2012-02-06 16:46:53 +0000 | [diff] [blame] | 52 | $(warning Defaulting to FF3 build [set with BROWSER=ff3, ff3+, ff35, ff36, ff40, ff50, ff60, ff70, ff80, ff90, ff100]) |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 53 | BROWSER=ff3 |
| 54 | endif |
| 55 | |
conroy@google.com | b109576 | 2010-10-22 11:28:03 +0000 | [diff] [blame] | 56 | # Gold doesn't play nice with xpcom libs |
| 57 | LINKER=$(shell ld -v | awk '{print $$2}') |
| 58 | ifeq ($(LINKER), gold) |
| 59 | ifeq ($(wildcard /usr/lib/compat-ld),) |
| 60 | $(error cannot link with gold, use the BFD ld instead) |
| 61 | else |
| 62 | CFLAGS += -B/usr/lib/compat-ld/ |
| 63 | CXXFLAGS += -B/usr/lib/compat-ld/ |
| 64 | DLLFLAGS += -B/usr/lib/compat-ld/ |
| 65 | endif |
| 66 | endif |
| 67 | |
jat@google.com | 268f998 | 2009-11-06 21:34:25 +0000 | [diff] [blame] | 68 | CFLAGS += -DBROWSER=$(BROWSER) |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 69 | GECKO_MINOR_VERSION= |
conroy@google.com | 36cf748 | 2011-01-12 19:43:57 +0000 | [diff] [blame] | 70 | GECKO_DLLFLAGS = -lxpcomglue_s -lxpcom |
| 71 | NSPR_DLLFLAGS = -lnspr4 |
acleung@google.com | 82a20e7 | 2011-12-09 18:02:24 +0000 | [diff] [blame] | 72 | MOZJS_DLLFLAGS = -lxul |
conroy@google.com | 36cf748 | 2011-01-12 19:43:57 +0000 | [diff] [blame] | 73 | |
acleung@google.com | 82a20e7 | 2011-12-09 18:02:24 +0000 | [diff] [blame] | 74 | #defaults to post-FF4 |
| 75 | MOZALLOC_DLLFLAGS = -lmozalloc |
| 76 | |
| 77 | #default ALLARCHFLAGS for post-FF4 |
| 78 | ALLARCHCFLAGS = -arch i386 -arch x86_64 -Xarch_i386 -DFLAG32BIT=32 -Xarch_x86_64 -DFLAG32BIT=64 |
conroy@google.com | e3153e5 | 2011-01-24 12:30:43 +0000 | [diff] [blame] | 79 | |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 80 | # Python xpidl tool is the new hotness post-FF9 |
| 81 | XPIDL_TOOL = python |
| 82 | |
jat@google.com | a0d0bed | 2009-08-18 22:58:15 +0000 | [diff] [blame] | 83 | ifeq ($(BROWSER),ff3) |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 84 | XPIDL_TOOL = binary |
acleung@google.com | 82a20e7 | 2011-12-09 18:02:24 +0000 | [diff] [blame] | 85 | MOZALLOC_DLLFLAGS = |
jat@google.com | d9f13ab | 2010-06-17 18:57:35 +0000 | [diff] [blame] | 86 | GECKO_VERSION = 1.9.0 |
conroy@google.com | 36cf748 | 2011-01-12 19:43:57 +0000 | [diff] [blame] | 87 | CFLAGS += -DGECKO_VERSION=1900 |
acleung@google.com | 82a20e7 | 2011-12-09 18:02:24 +0000 | [diff] [blame] | 88 | MOZJS_DLLFLAGS = -lmozjs |
| 89 | ifeq ($(OS),mac) |
| 90 | ALLARCHCFLAGS = -arch i386 -arch ppc |
| 91 | endif |
jat@google.com | a0d0bed | 2009-08-18 22:58:15 +0000 | [diff] [blame] | 92 | else |
| 93 | ifeq ($(BROWSER),ff3+) |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 94 | XPIDL_TOOL = binary |
acleung@google.com | 82a20e7 | 2011-12-09 18:02:24 +0000 | [diff] [blame] | 95 | MOZALLOC_DLLFLAGS = |
jat@google.com | d9f13ab | 2010-06-17 18:57:35 +0000 | [diff] [blame] | 96 | GECKO_VERSION = 1.9.0 |
conroy@google.com | 36cf748 | 2011-01-12 19:43:57 +0000 | [diff] [blame] | 97 | CFLAGS += -DGECKO_VERSION=1901 |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 98 | GECKO_MINOR_VERSION=.10 |
acleung@google.com | 82a20e7 | 2011-12-09 18:02:24 +0000 | [diff] [blame] | 99 | MOZJS_DLLFLAGS = -lmozjs |
| 100 | ifeq ($(OS),mac) |
| 101 | ALLARCHCFLAGS = -arch i386 -arch ppc |
| 102 | endif |
jat@google.com | a0d0bed | 2009-08-18 22:58:15 +0000 | [diff] [blame] | 103 | else |
| 104 | ifeq ($(BROWSER),ff35) |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 105 | XPIDL_TOOL = binary |
acleung@google.com | 82a20e7 | 2011-12-09 18:02:24 +0000 | [diff] [blame] | 106 | MOZALLOC_DLLFLAGS = |
jat@google.com | d9f13ab | 2010-06-17 18:57:35 +0000 | [diff] [blame] | 107 | GECKO_VERSION = 1.9.1 |
conroy@google.com | 36cf748 | 2011-01-12 19:43:57 +0000 | [diff] [blame] | 108 | CFLAGS += -DGECKO_VERSION=1910 |
acleung@google.com | 82a20e7 | 2011-12-09 18:02:24 +0000 | [diff] [blame] | 109 | MOZJS_DLLFLAGS = -lmozjs |
| 110 | ifeq ($(OS),mac) |
| 111 | ALLARCHCFLAGS = -arch i386 -arch ppc |
| 112 | endif |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 113 | else |
jat@google.com | eb19eba | 2010-01-27 15:05:14 +0000 | [diff] [blame] | 114 | ifeq ($(BROWSER),ff36) |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 115 | XPIDL_TOOL = binary |
acleung@google.com | 82a20e7 | 2011-12-09 18:02:24 +0000 | [diff] [blame] | 116 | MOZALLOC_DLLFLAGS = |
jat@google.com | d9f13ab | 2010-06-17 18:57:35 +0000 | [diff] [blame] | 117 | GECKO_VERSION = 1.9.2 |
conroy@google.com | 36cf748 | 2011-01-12 19:43:57 +0000 | [diff] [blame] | 118 | CFLAGS += -DGECKO_VERSION=1920 |
acleung@google.com | 82a20e7 | 2011-12-09 18:02:24 +0000 | [diff] [blame] | 119 | MOZJS_DLLFLAGS = -lmozjs |
| 120 | ifeq ($(OS),mac) |
| 121 | ALLARCHCFLAGS = -arch i386 -arch ppc |
| 122 | endif |
jat@google.com | eb19eba | 2010-01-27 15:05:14 +0000 | [diff] [blame] | 123 | else |
jat@google.com | d9f13ab | 2010-06-17 18:57:35 +0000 | [diff] [blame] | 124 | ifeq ($(BROWSER),ff40) |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 125 | XPIDL_TOOL = binary |
conroy@google.com | 36cf748 | 2011-01-12 19:43:57 +0000 | [diff] [blame] | 126 | GECKO_VERSION = 2.0.0 |
| 127 | CFLAGS += -DGECKO_VERSION=2000 |
jat@google.com | d9f13ab | 2010-06-17 18:57:35 +0000 | [diff] [blame] | 128 | else |
conroy@google.com | 9911541 | 2011-06-23 19:36:33 +0000 | [diff] [blame] | 129 | ifeq ($(BROWSER),ff50) |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 130 | XPIDL_TOOL = binary |
conroy@google.com | 9911541 | 2011-06-23 19:36:33 +0000 | [diff] [blame] | 131 | GECKO_VERSION = 5.0.0 |
| 132 | CFLAGS += -DGECKO_VERSION=5000 |
conroy@google.com | 9911541 | 2011-06-23 19:36:33 +0000 | [diff] [blame] | 133 | else |
acleung@google.com | 8346ccf | 2011-08-30 01:03:44 +0000 | [diff] [blame] | 134 | ifeq ($(BROWSER),ff60) |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 135 | XPIDL_TOOL = binary |
acleung@google.com | 8346ccf | 2011-08-30 01:03:44 +0000 | [diff] [blame] | 136 | GECKO_VERSION = 6.0.0 |
| 137 | CFLAGS += -DGECKO_VERSION=6000 |
acleung@google.com | 8346ccf | 2011-08-30 01:03:44 +0000 | [diff] [blame] | 138 | else |
acleung@google.com | 0d1a4b4 | 2011-10-07 05:13:43 +0000 | [diff] [blame] | 139 | ifeq ($(BROWSER),ff70) |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 140 | XPIDL_TOOL = binary |
acleung@google.com | 0d1a4b4 | 2011-10-07 05:13:43 +0000 | [diff] [blame] | 141 | GECKO_VERSION = 7.0.0 |
| 142 | CFLAGS += -DGECKO_VERSION=7000 |
acleung@google.com | 0d1a4b4 | 2011-10-07 05:13:43 +0000 | [diff] [blame] | 143 | else |
acleung@google.com | 82a20e7 | 2011-12-09 18:02:24 +0000 | [diff] [blame] | 144 | ifeq ($(BROWSER),ff80) |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 145 | XPIDL_TOOL = binary |
acleung@google.com | 82a20e7 | 2011-12-09 18:02:24 +0000 | [diff] [blame] | 146 | GECKO_VERSION = 8.0.0 |
| 147 | CFLAGS += -DGECKO_VERSION=8000 |
| 148 | else |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 149 | ifeq ($(BROWSER),ff90) |
| 150 | GECKO_VERSION = 9.0.0 |
| 151 | CFLAGS += -DGECKO_VERSION=9000 |
| 152 | else |
acleung@google.com | 5531884 | 2012-02-06 16:46:53 +0000 | [diff] [blame] | 153 | ifeq ($(BROWSER),ff100) |
| 154 | GECKO_VERSION = 10.0.0 |
| 155 | CFLAGS += -DGECKO_VERSION=10000 |
| 156 | else |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 157 | $(error Unrecognized BROWSER of $(BROWSER) - options are ff3, ff3+, ff35, ff36, ff40, ff50, ff60, ff70, ff80, ff90) |
| 158 | endif |
acleung@google.com | 82a20e7 | 2011-12-09 18:02:24 +0000 | [diff] [blame] | 159 | endif |
acleung@google.com | 0d1a4b4 | 2011-10-07 05:13:43 +0000 | [diff] [blame] | 160 | endif |
acleung@google.com | 8346ccf | 2011-08-30 01:03:44 +0000 | [diff] [blame] | 161 | endif |
conroy@google.com | 9911541 | 2011-06-23 19:36:33 +0000 | [diff] [blame] | 162 | endif |
jat@google.com | eb19eba | 2010-01-27 15:05:14 +0000 | [diff] [blame] | 163 | endif |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 164 | endif |
jat@google.com | a0d0bed | 2009-08-18 22:58:15 +0000 | [diff] [blame] | 165 | endif |
| 166 | endif |
| 167 | endif |
acleung@google.com | 5531884 | 2012-02-06 16:46:53 +0000 | [diff] [blame] | 168 | endif |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 169 | |
| 170 | CFLAGS += -fshort-wchar |
| 171 | CXXFLAGS = $(CXXONLYFLAGS) $(CFLAGS) |
| 172 | DIR = $(shell pwd) |
| 173 | |
| 174 | # Set $PLUGIN_SDKS if it isn't in the default location |
| 175 | PLUGIN_SDKS ?= ../../../plugin-sdks |
| 176 | GECKO_PLATFORM ?= $(TARGET_PLATFORM) |
| 177 | |
| 178 | COMMON = ../common/libcommon$(FLAG32BIT).a |
| 179 | |
| 180 | OBJ_OUTDIR = build/$(TARGET_PLATFORM)-$(BROWSER) |
jat@google.com | 268f998 | 2009-11-06 21:34:25 +0000 | [diff] [blame] | 181 | EXTENSION_OUTDIR = prebuilt/extension |
| 182 | FF_PLATFORM_DIR = $(EXTENSION_OUTDIR)/lib/$(TARGET_PLATFORM)/$(BROWSER) |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 183 | |
jat@google.com | 268f998 | 2009-11-06 21:34:25 +0000 | [diff] [blame] | 184 | INSTALLER_XPI = prebuilt/gwt-dev-plugin.xpi |
| 185 | FF_DLL = $(OBJ_OUTDIR)/libgwt_dev_$(BROWSER)$(DLL_SUFFIX) |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 186 | #FF_TYPELIB = build/IOOPHM.xpt |
| 187 | #FF_HEADER = $(OBJ_OUTDIR)/IOOPHM.h |
| 188 | FF_TYPELIB = prebuilt/extension/components/IOOPHM.xpt |
| 189 | FF_HEADER = prebuilt/$(BROWSER)/include/IOOPHM.h |
| 190 | INSTALL_RDF = $(EXTENSION_OUTDIR)/install.rdf |
| 191 | |
| 192 | SDK_PATH = $(PLUGIN_SDKS)/gecko-sdks |
jat@google.com | d9f13ab | 2010-06-17 18:57:35 +0000 | [diff] [blame] | 193 | GECKO_SDK = $(SDK_PATH)/gecko-$(GECKO_VERSION) |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 194 | GECKO_PLAT_INC = $(GECKO_SDK)/$(GECKO_PLATFORM)/include |
| 195 | GECKO_LIBS = $(GECKO_SDK)/$(GECKO_PLATFORM)/lib$(GECKO_MINOR_VERSION) |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 196 | |
| 197 | ifeq ($(XPIDL_TOOL),python) |
| 198 | XPIDL = $(GECKO_SDK)/bin/xpidl.py |
| 199 | XPIDL_HEADER = $(GECKO_SDK)/bin/header.py |
| 200 | XPIDL_TYPELIBS = $(GECKO_SDK)/bin/typelib.py |
| 201 | else |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 202 | XPIDL = $(GECKO_SDK)/$(GECKO_PLATFORM)/bin/xpidl |
acleung@google.com | 7ffdec4 | 2012-02-06 21:08:46 +0000 | [diff] [blame] | 203 | XPIDL_HEADER = $(GECKO_SDK)/$(GECKO_PLATFORM)/bin/xpidl -m header |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 204 | XPIDL_TYPELIBS = $(GECKO_SDK)/$(GECKO_PLATFORM)/bin/xpidl -m typelib |
| 205 | endif |
| 206 | |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 207 | XPIDL_FLAGS = -I$(GECKO_SDK)/idl |
| 208 | |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 209 | DLLFLAGS += \ |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 210 | -L$(GECKO_LIBS) \ |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 211 | -Wl,$(RUN_PATH_FLAG),$(GECKO_LIBS) \ |
conroy@google.com | 36cf748 | 2011-01-12 19:43:57 +0000 | [diff] [blame] | 212 | $(GECKO_DLLFLAGS) $(NSPR_DLLFLAGS) \ |
| 213 | $(MOZALLOC_DLLFLAGS) $(MOZJS_DLLFLAGS) |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 214 | |
| 215 | INC += -I$(GECKO_PLAT_INC) -I$(GECKO_SDK)/include -I$(dir $(FF_HEADER)) |
| 216 | |
jat@google.com | eb19eba | 2010-01-27 15:05:14 +0000 | [diff] [blame] | 217 | VERSION ?= 1.0.$(shell ./getversion).$(shell date +%Y%m%d%H%M%S) |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 218 | |
| 219 | .PHONY: all xpi lib common browser clean depend install install-platform find-ff-libs |
| 220 | |
jat@google.com | 268f998 | 2009-11-06 21:34:25 +0000 | [diff] [blame] | 221 | all:: common lib xpi |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 222 | |
| 223 | lib:: browser $(OBJ_OUTDIR) $(EXTENSION_OUTDIR) $(FF_DLL) |
| 224 | xpi:: $(EXTENSION_OUTDIR) $(INSTALLER_XPI) |
| 225 | |
| 226 | find-ff-libs:: |
| 227 | ifeq ($(FIREFOX_LIBS),) |
| 228 | $(warning Using firefox libraries at $(GECKO_LIBS)) |
| 229 | $(eval FIREFOX_LIBS = $(GECKO_LIBS)) |
| 230 | endif |
| 231 | |
| 232 | browser:: find-ff-libs |
| 233 | # if [ ! -r $(GECKO_LIBS)/libxpcom.so ] |
| 234 | # then |
| 235 | # $(error Missing Firefox libraries at $(GECKO_LIBS)) |
| 236 | # fi |
| 237 | |
jat@google.com | 268f998 | 2009-11-06 21:34:25 +0000 | [diff] [blame] | 238 | generate-install:: $(EXTENSION_OUTDIR) install-template.rdf |
| 239 | sed -e s/GWT_DEV_PLUGIN_VERSION/$(VERSION)/ install-template.rdf >$(INSTALL_RDF) |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 240 | |
jat@google.com | 268f998 | 2009-11-06 21:34:25 +0000 | [diff] [blame] | 241 | linuxplatforms: |
jat@google.com | 8b76660 | 2009-12-01 01:41:06 +0000 | [diff] [blame] | 242 | $(MAKE) lib BROWSER=ff3 ARCH=x86 |
| 243 | $(MAKE) lib BROWSER=ff3+ ARCH=x86 |
| 244 | $(MAKE) lib BROWSER=ff35 ARCH=x86 |
jat@google.com | eb19eba | 2010-01-27 15:05:14 +0000 | [diff] [blame] | 245 | $(MAKE) lib BROWSER=ff36 ARCH=x86 |
jat@google.com | d9f13ab | 2010-06-17 18:57:35 +0000 | [diff] [blame] | 246 | $(MAKE) lib BROWSER=ff40 ARCH=x86 |
conroy@google.com | 9911541 | 2011-06-23 19:36:33 +0000 | [diff] [blame] | 247 | $(MAKE) lib BROWSER=ff50 ARCH=x86 |
acleung@google.com | 8346ccf | 2011-08-30 01:03:44 +0000 | [diff] [blame] | 248 | $(MAKE) lib BROWSER=ff60 ARCH=x86 |
acleung@google.com | 0d1a4b4 | 2011-10-07 05:13:43 +0000 | [diff] [blame] | 249 | $(MAKE) lib BROWSER=ff70 ARCH=x86 |
acleung@google.com | 82a20e7 | 2011-12-09 18:02:24 +0000 | [diff] [blame] | 250 | $(MAKE) lib BROWSER=ff80 ARCH=x86 |
acleung@google.com | 5531884 | 2012-02-06 16:46:53 +0000 | [diff] [blame] | 251 | $(MAKE) lib BROWSER=ff90 ARCH=x86 |
| 252 | $(MAKE) lib BROWSER=ff100 ARCH=x86 |
jat@google.com | 8b76660 | 2009-12-01 01:41:06 +0000 | [diff] [blame] | 253 | $(MAKE) lib BROWSER=ff3 ARCH=x86_64 |
| 254 | $(MAKE) lib BROWSER=ff3+ ARCH=x86_64 |
| 255 | $(MAKE) lib BROWSER=ff35 ARCH=x86_64 |
jat@google.com | d9f13ab | 2010-06-17 18:57:35 +0000 | [diff] [blame] | 256 | $(MAKE) lib BROWSER=ff36 ARCH=x86_64 |
| 257 | $(MAKE) lib BROWSER=ff40 ARCH=x86_64 |
conroy@google.com | 9911541 | 2011-06-23 19:36:33 +0000 | [diff] [blame] | 258 | $(MAKE) lib BROWSER=ff50 ARCH=x86_64 |
acleung@google.com | 8346ccf | 2011-08-30 01:03:44 +0000 | [diff] [blame] | 259 | $(MAKE) lib BROWSER=ff60 ARCH=x86_64 |
acleung@google.com | 0d1a4b4 | 2011-10-07 05:13:43 +0000 | [diff] [blame] | 260 | $(MAKE) lib BROWSER=ff70 ARCH=x86_64 |
acleung@google.com | 82a20e7 | 2011-12-09 18:02:24 +0000 | [diff] [blame] | 261 | $(MAKE) lib BROWSER=ff80 ARCH=x86_64 |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 262 | $(MAKE) lib BROWSER=ff90 ARCH=x86_64 |
acleung@google.com | 5531884 | 2012-02-06 16:46:53 +0000 | [diff] [blame] | 263 | $(MAKE) lib BROWSER=ff100 ARCH=x86_64 |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 264 | |
jat@google.com | 6707934 | 2009-11-10 19:25:04 +0000 | [diff] [blame] | 265 | macplatforms: |
jat@google.com | 8b76660 | 2009-12-01 01:41:06 +0000 | [diff] [blame] | 266 | $(MAKE) lib BROWSER=ff3 |
| 267 | $(MAKE) lib BROWSER=ff35 |
jat@google.com | eb19eba | 2010-01-27 15:05:14 +0000 | [diff] [blame] | 268 | $(MAKE) lib BROWSER=ff36 |
jat@google.com | d9f13ab | 2010-06-17 18:57:35 +0000 | [diff] [blame] | 269 | $(MAKE) lib BROWSER=ff40 |
conroy@google.com | 8c4d3c2 | 2011-06-27 13:32:57 +0000 | [diff] [blame] | 270 | $(MAKE) lib BROWSER=ff50 |
acleung@google.com | 0d1a4b4 | 2011-10-07 05:13:43 +0000 | [diff] [blame] | 271 | $(MAKE) lib BROWSER=ff60 |
| 272 | $(MAKE) lib BROWSER=ff70 |
acleung@google.com | 82a20e7 | 2011-12-09 18:02:24 +0000 | [diff] [blame] | 273 | $(MAKE) lib BROWSER=ff80 |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 274 | $(MAKE) lib BROWSER=ff90 |
acleung@google.com | 5531884 | 2012-02-06 16:46:53 +0000 | [diff] [blame] | 275 | $(MAKE) lib BROWSER=ff100 |
jat@google.com | 6707934 | 2009-11-10 19:25:04 +0000 | [diff] [blame] | 276 | |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 277 | SRCS = \ |
| 278 | ExternalWrapper.cpp \ |
| 279 | ModuleOOPHM.cpp \ |
| 280 | FFSessionHandler.cpp \ |
| 281 | JavaObject.cpp \ |
| 282 | JSRunner.cpp \ |
jat@google.com | 2318196 | 2009-09-03 22:22:56 +0000 | [diff] [blame] | 283 | Preferences.cpp \ |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 284 | XpcomDebug.cpp |
| 285 | |
| 286 | FF_OBJS = $(patsubst %.cpp,$(OBJ_OUTDIR)/%.o,$(SRCS)) |
| 287 | |
| 288 | $(FF_OBJS): $(OBJ_OUTDIR) |
| 289 | |
| 290 | $(OBJ_OUTDIR):: |
| 291 | @mkdir -p $@ |
| 292 | |
jat@google.com | 268f998 | 2009-11-06 21:34:25 +0000 | [diff] [blame] | 293 | $(INSTALLER_XPI): $(FF_TYPELIB) $(EXTENSION_OUTDIR) generate-install $(shell find prebuilt/extension $(EXTENSION_OUTDIR)) |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 294 | @mkdir -p $(EXTENSION_OUTDIR)/components |
jat@google.com | 268f998 | 2009-11-06 21:34:25 +0000 | [diff] [blame] | 295 | #(cd prebuilt/extension; find . \( -name .svn -prune \) -o -print | cpio -pmdua ../../$(EXTENSION_OUTDIR)) |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 296 | -rm $(INSTALLER_XPI) |
| 297 | (cd $(EXTENSION_OUTDIR) && zip -r -D -9 $(DIR)/$(INSTALLER_XPI) * -x '*/.svn/*' -x 'META-INF/*') |
| 298 | |
| 299 | $(FF_TYPELIB): IOOPHM.idl |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 300 | [ ! -x $(XPIDL) -o \( -e $(FF_TYPELIB) -a ! -w $(FF_TYPELIB) \) ] || $(XPIDL_TYPELIBS) $(XPIDL_FLAGS) -o $@ $< |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 301 | |
jat@google.com | 268f998 | 2009-11-06 21:34:25 +0000 | [diff] [blame] | 302 | $(FF_HEADER): IOOPHM.idl $(OBJ_OUTDIR) |
acleung@google.com | cd201b7 | 2012-01-24 16:23:41 +0000 | [diff] [blame] | 303 | [ ! -x $(XPIDL) -o \( -e $(FF_HEADER) -a ! -w $(FF_HEADER) \) ] || $(XPIDL_HEADER) $(XPIDL_FLAGS) -o $@ $< |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 304 | |
| 305 | $(FF_DLL): $(FF_OBJS) $(COMMON) |
conroy@google.com | e3153e5 | 2011-01-24 12:30:43 +0000 | [diff] [blame] | 306 | $(CXX) -o $@ $(FF_OBJS) $(COMMON) $(DLLFLAGS) |
jat@google.com | 268f998 | 2009-11-06 21:34:25 +0000 | [diff] [blame] | 307 | @mkdir -p $(FF_PLATFORM_DIR) |
| 308 | cp $(FF_DLL) $(FF_PLATFORM_DIR)/ |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 309 | |
| 310 | $(OBJ_OUTDIR)/%.o: %.cpp $(FF_HEADER) |
| 311 | $(CXX) $(CXXFLAGS) -c -o $@ -I. -I../common $< |
| 312 | |
| 313 | common $(COMMON): |
| 314 | (cd ../common && $(MAKE)) |
| 315 | |
| 316 | clean: |
| 317 | rm -rf build |
| 318 | |
| 319 | install-platform: |
| 320 | ifdef BROWSER |
jat@google.com | 268f998 | 2009-11-06 21:34:25 +0000 | [diff] [blame] | 321 | @-mkdir -p $(FF_PLATFORM_DIR) |
| 322 | -cp $(FF_DLL) $(FF_PLATFORM_DIR))/ |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 323 | ifeq ($(OS),mac) |
| 324 | @-mkdir -p $(subst $(EXTENSION_OUTDIR),prebuilt/extension-$(BROWSER),$(subst x86,ppc,$(FF_PLATFORM_DIR)))/components |
| 325 | -cp $(FF_DLL) $(subst $(EXTENSION_OUTDIR),prebuilt/extension-$(BROWSER),$(subst x86,ppc,$(FF_PLATFORM_DIR)))/components |
| 326 | endif |
| 327 | else |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 328 | @$(MAKE) $@ BROWSER=ff3 |
jat@google.com | 268f998 | 2009-11-06 21:34:25 +0000 | [diff] [blame] | 329 | @$(MAKE) $@ BROWSER=ff3+ |
| 330 | @$(MAKE) $@ BROWSER=ff35 |
jat@google.com | eb19eba | 2010-01-27 15:05:14 +0000 | [diff] [blame] | 331 | @$(MAKE) $@ BROWSER=ff36 |
jat@google.com | d9f13ab | 2010-06-17 18:57:35 +0000 | [diff] [blame] | 332 | @$(MAKE) $@ BROWSER=ff40 |
conroy@google.com | 9911541 | 2011-06-23 19:36:33 +0000 | [diff] [blame] | 333 | @$(MAKE) $@ BROWSER=ff50 |
jat@google.com | 134be54 | 2009-08-03 15:30:11 +0000 | [diff] [blame] | 334 | endif |
| 335 | |
| 336 | DEPEND = g++ -MM -MT'$$(OBJ_OUTDIR)/$(patsubst %.cpp,%.o,$(src))' \ |
| 337 | -I. -I../common -isystem$(dir $(FF_HEADER)) -isystem$(GECKO_SDK)/include $(src) && |
| 338 | depend: browser $(OBJ_OUTDIR) $(FF_HEADER) |
| 339 | ($(foreach src,$(SRCS),$(DEPEND)) true) >>Makefile |
| 340 | # makedepend -- $(CFLAGS) -- $(SRCS) |
| 341 | |
| 342 | # DO NOT DELETE |
| 343 | $(OBJ_OUTDIR)/ExternalWrapper.o: ExternalWrapper.cpp ExternalWrapper.h \ |
| 344 | mozincludes.h FFSessionHandler.h SessionData.h \ |
| 345 | ../common/SessionHandler.h ../common/BrowserChannel.h ../common/Value.h \ |
| 346 | ../common/Debug.h ../common/Platform.h ../common/DebugLevel.h \ |
| 347 | ../common/BrowserChannel.h ../common/scoped_ptr/scoped_ptr.h \ |
| 348 | ../common/LoadModuleMessage.h ../common/Message.h \ |
| 349 | ../common/BrowserChannel.h ../common/HostChannel.h ../common/Debug.h \ |
| 350 | ../common/ByteOrder.h ../common/Platform.h ../common/Socket.h \ |
| 351 | ../common/Platform.h ../common/Debug.h ../common/AllowedConnections.h \ |
| 352 | ../common/Platform.h ../common/Message.h ../common/ReturnMessage.h \ |
| 353 | ../common/Message.h ../common/BrowserChannel.h ../common/Value.h \ |
| 354 | ../common/Value.h ../common/SessionHandler.h ../common/SessionHandler.h \ |
| 355 | ../common/ServerMethods.h ../common/Value.h |
| 356 | $(OBJ_OUTDIR)/ModuleOOPHM.o: ModuleOOPHM.cpp ../common/Debug.h \ |
| 357 | ../common/Platform.h ../common/DebugLevel.h ExternalWrapper.h \ |
| 358 | mozincludes.h FFSessionHandler.h SessionData.h \ |
| 359 | ../common/SessionHandler.h ../common/BrowserChannel.h ../common/Value.h \ |
| 360 | ../common/Debug.h ../common/BrowserChannel.h \ |
| 361 | ../common/scoped_ptr/scoped_ptr.h |
| 362 | $(OBJ_OUTDIR)/FFSessionHandler.o: FFSessionHandler.cpp FFSessionHandler.h \ |
| 363 | mozincludes.h SessionData.h ../common/SessionHandler.h \ |
| 364 | ../common/BrowserChannel.h ../common/Value.h ../common/Debug.h \ |
| 365 | ../common/Platform.h ../common/DebugLevel.h ../common/BrowserChannel.h \ |
| 366 | ../common/HostChannel.h ../common/Debug.h ../common/ByteOrder.h \ |
| 367 | ../common/Platform.h ../common/Socket.h ../common/Platform.h \ |
| 368 | ../common/Debug.h ../common/AllowedConnections.h ../common/Platform.h \ |
| 369 | ../common/Message.h ../common/ReturnMessage.h ../common/Message.h \ |
| 370 | ../common/BrowserChannel.h ../common/Value.h ../common/Value.h \ |
| 371 | ../common/SessionHandler.h JavaObject.h JSRunner.h XpcomDebug.h \ |
| 372 | ../common/scoped_ptr/scoped_ptr.h RootedObject.h \ |
| 373 | ../common/InvokeMessage.h ../common/Message.h \ |
| 374 | ../common/BrowserChannel.h ../common/Value.h ../common/ServerMethods.h \ |
| 375 | ../common/Value.h |
| 376 | $(OBJ_OUTDIR)/JavaObject.o: JavaObject.cpp JavaObject.h mozincludes.h \ |
| 377 | FFSessionHandler.h SessionData.h ../common/SessionHandler.h \ |
| 378 | ../common/BrowserChannel.h ../common/Value.h ../common/Debug.h \ |
| 379 | ../common/Platform.h ../common/DebugLevel.h ../common/BrowserChannel.h \ |
| 380 | ../common/ServerMethods.h ../common/Value.h XpcomDebug.h \ |
| 381 | ../common/HostChannel.h ../common/Debug.h ../common/ByteOrder.h \ |
| 382 | ../common/Platform.h ../common/Socket.h ../common/Platform.h \ |
| 383 | ../common/Debug.h ../common/AllowedConnections.h ../common/Platform.h \ |
| 384 | ../common/Message.h ../common/ReturnMessage.h ../common/Message.h \ |
| 385 | ../common/BrowserChannel.h ../common/Value.h ../common/Value.h \ |
| 386 | ../common/SessionHandler.h ../common/InvokeMessage.h \ |
| 387 | ../common/Message.h ../common/BrowserChannel.h ../common/Value.h \ |
| 388 | ../common/scoped_ptr/scoped_ptr.h |
| 389 | $(OBJ_OUTDIR)/JSRunner.o: JSRunner.cpp JSRunner.h mozincludes.h |
| 390 | $(OBJ_OUTDIR)/XpcomDebug.o: XpcomDebug.cpp XpcomDebug.h mozincludes.h \ |
| 391 | JavaObject.h |