|
1 # This Source Code Form is subject to the terms of the Mozilla Public |
|
2 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
4 |
|
5 ifndef INCLUDED_VERSION_MK |
|
6 INCLUDED_VERSION_MK=1 |
|
7 |
|
8 # Windows gmake build: |
|
9 # Build default .rc file if $(RESFILE) isn't defined. |
|
10 # TODO: |
|
11 # PBI : Private build info. Not used currently. |
|
12 # Guessing the best way would be to set an env var. |
|
13 # BINARY : Binary name. Not used currently. |
|
14 ifeq ($(MOZ_WIDGET_TOOLKIT),windows) |
|
15 ifndef RESFILE |
|
16 RCFILE=./module.rc |
|
17 RESFILE=./module.res |
|
18 _RC_STRING = -QUIET 1 -DEPTH $(DEPTH) -TOPSRCDIR $(topsrcdir) -OBJDIR . -SRCDIR $(srcdir) -DISPNAME "$(MOZ_APP_DISPLAYNAME)" -APPVERSION "$(MOZ_APP_VERSION)" |
|
19 ifdef MOZILLA_OFFICIAL |
|
20 _RC_STRING += -OFFICIAL 1 |
|
21 endif |
|
22 ifdef MOZ_DEBUG |
|
23 _RC_STRING += -DEBUG 1 |
|
24 endif |
|
25 ifdef PROGRAM |
|
26 _RC_STRING += -BINARY $(PROGRAM) |
|
27 else |
|
28 ifdef _PROGRAM |
|
29 _RC_STRING += -BINARY $(_PROGRAM) |
|
30 else |
|
31 ifdef SHARED_LIBRARY |
|
32 _RC_STRING += -BINARY $(SHARED_LIBRARY) |
|
33 endif |
|
34 endif |
|
35 endif |
|
36 ifdef RCINCLUDE |
|
37 _RC_STRING += -RCINCLUDE $(srcdir)/$(RCINCLUDE) |
|
38 endif |
|
39 |
|
40 GARBAGE += $(RESFILE) $(RCFILE) |
|
41 |
|
42 #dummy target so $(RCFILE) doesn't become the default =P |
|
43 all:: |
|
44 |
|
45 $(RCFILE): $(RCINCLUDE) $(topsrcdir)/config/version_win.pl |
|
46 $(PERL) $(topsrcdir)/config/version_win.pl $(_RC_STRING) |
|
47 |
|
48 endif # RESFILE |
|
49 endif # Windows |
|
50 |
|
51 endif |