~ubuntu-branches/ubuntu/oneiric/enigmail/oneiric-updates

« back to all changes in this revision

Viewing changes to build/wince/tools/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2010-04-10 01:42:24 UTC
  • Revision ID: james.westby@ubuntu.com-20100410014224-fbq9ui5x3b0h2t36
Tags: 2:1.0.1-0ubuntu1
* First releaase of enigmail 1.0.1 for tbird/icedove 3
  (LP: #527138)
* redo packaging from scratch 
  + add debian/make-orig target that uses xulrunner provided
    buildsystem + enigmail tarball to produce a proper orig.tar.gz
  + use debhelper 7 with mozilla-devscripts
  + use debian source format 3.0 (quilt)
  + patch enigmail to use frozen API only
    - add debian/patches/frozen_api.diff
  + patch build system to not link against -lxul - which isnt
    available for sdks produced by all-static apps like tbird
    - add debian/patches/build_system_dont_link_libxul.diff
  + add minimal build-depends to control

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# ***** BEGIN LICENSE BLOCK *****
 
3
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
4
#
 
5
# The contents of this file are subject to the Mozilla Public License Version
 
6
# 1.1 (the "License"); you may not use this file except in compliance with
 
7
# the License. You may obtain a copy of the License at
 
8
# http://www.mozilla.org/MPL/
 
9
#
 
10
# Software distributed under the License is distributed on an "AS IS" basis,
 
11
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 
12
# for the specific language governing rights and limitations under the
 
13
# License.
 
14
#
 
15
# The Original Code is Mozilla CE Shunt Library.
 
16
#
 
17
# The Initial Developer of the Original Code is Mozilla Corporation.
 
18
# Portions created by the Initial Developer are Copyright (C) 2008
 
19
# the Initial Developer. All Rights Reserved.
 
20
#
 
21
# Contributor(s):
 
22
#       John Wolfe (wolfe@lobo.us)
 
23
#
 
24
# Alternatively, the contents of this file may be used under the terms of
 
25
# either of the GNU General Public License Version 2 or later (the "GPL"),
 
26
# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 
27
# in which case the provisions of the GPL or the LGPL are applicable instead
 
28
# of those above. If you wish to allow use of your version of this file only
 
29
# under the terms of either the GPL or the LGPL, and not to allow others to
 
30
# use your version of this file under the terms of the MPL, indicate your
 
31
# decision by deleting the provisions above and replace them with the notice
 
32
# and other provisions required by the GPL or the LGPL. If you do not delete
 
33
# the provisions above, a recipient may use your version of this file under
 
34
# the terms of any one of the MPL, the GPL or the LGPL.
 
35
#
 
36
# ***** END LICENSE BLOCK *****
 
37
 
 
38
# this file is used directly during configure as well as included from Makefile.in
 
39
 
 
40
DEVENV_FLAG=-
 
41
 
 
42
CC=cl -O2
 
43
 
 
44
MOZCE_DEVENV=vs$(MOZ_MSVCVERSION)
 
45
 
 
46
MOZCE_TOOLS_DIR=$(TOPSRCDIR)/build/wince/tools
 
47
 
 
48
ifdef MOZCE_NOT_CONFIGURE
 
49
MOZCE_TOOLS_BIN_DIR=$(OBJDIR)/build/wince/tools
 
50
else
 
51
# if we're building the tools in configure, we want them to go directly to the sdk 
 
52
# so they get rebuilt once we have a full environment
 
53
MOZCE_TOOLS_BIN_DIR=$(OBJDIR)/dist/sdk/bin
 
54
endif
 
55
 
 
56
BUILD_SWITCH=$(DEVENV_FLAG)Build
 
57
REBUILD_SWITCH=$(DEVENV_FLAG)Rebuild
 
58
CLEAN_SWITCH=$(DEVENV_FLAG)clean
 
59
 
 
60
ifeq ($(VCINSTALLDIR),)
 
61
$(error Environment variable VCINSTALLDIR not set! Are you using MozillaBuild?)
 
62
endif
 
63
 
 
64
ifeq ($(WINCE_SDK_DIR),)
 
65
$(error Environment variable WINCE_SDK_DIR not set! It must be passed to make if not running from configure)
 
66
endif
 
67
 
 
68
ifeq ($(MOZ_MSVCVERSION),)
 
69
$(error Environment variable MOZ_MSVCVERSION not set! Are you using MozillaBuild?)
 
70
endif
 
71
 
 
72
CFLAGS += \
 
73
  -DVC_PATH='"$(subst \,\\,$(VCINSTALLDIR))\\"' \
 
74
  -DWM_SDK_PATH='"$(subst \,\\,$(WINCE_SDK_DIR))\\"' \
 
75
  -DOGLES_SDK_PATH='"$(subst \,\\,$(OGLES_SDK_DIR))\\"' \
 
76
  -DMOZCE_DEVENV='"$(MOZCE_DEVENV)"' \
 
77
  -DTOPSRCDIR='"$(TOPSRCDIR)"' \
 
78
  $(NULL)
 
79
 
 
80
ifneq ($(WINDOWSSDKDIR),)
 
81
CFLAGS += -DWIN_SDK_PATH='"$(subst \,\\,$(WINDOWSSDKDIR))"'
 
82
else
 
83
ifeq ($(SDKDIR),)
 
84
$(error Environment variable WINDOWSSDKDIR not set! Are you using MozillaBuild?)
 
85
else
 
86
CFLAGS += -DWIN_SDK_PATH='"$(subst \,\\,$(SDKDIR))"'
 
87
endif
 
88
endif
 
89
 
 
90
ifdef VPATH
 
91
CFLAGS  += -DSHUNT_INC='"$(OBJDIR)/dist/include/mozce_shunt"'
 
92
CFLAGS  += -DSHUNT_LIB='"$(OBJDIR)/dist/lib"'
 
93
CFLAGS  += -DJEMALLOC_LIB='"$(OBJDIR)/dist/lib/jemalloc.lib"'
 
94
endif
 
95
CFLAGS += -DEBUG -Zi
 
96
 
 
97
SDK_TOOLS = $(MOZCE_TOOLS_BIN_DIR)/arm-wince-as.exe \
 
98
            $(MOZCE_TOOLS_BIN_DIR)/arm-wince-gcc.exe \
 
99
            $(MOZCE_TOOLS_BIN_DIR)/arm-wince-lib.exe \
 
100
            $(MOZCE_TOOLS_BIN_DIR)/arm-wince-link.exe \
 
101
            $(MOZCE_TOOLS_BIN_DIR)/arm-wince-res.exe 
 
102
 
 
103
all: libs export
 
104
 
 
105
libs: $(SDK_TOOLS)
 
106
 
 
107
clean: clobber
 
108
 
 
109
 
 
110
clobber:
 
111
        rm $(MOZCE_TOOLS_BIN_DIR)/*.exe  
 
112
 
 
113
$(MOZCE_TOOLS_BIN_DIR)/linkargs.obj:    $(MOZCE_TOOLS_DIR)/linkargs.c $(MOZCE_TOOLS_DIR)/toolspath.h $(MOZCE_TOOLS_DIR)/Makefile
 
114
        mkdir -p $(MOZCE_TOOLS_BIN_DIR);
 
115
        $(CC) $(CFLAGS) -c -Fo$(MOZCE_TOOLS_BIN_DIR)/linkargs.obj $(MOZCE_TOOLS_DIR)/linkargs.c
 
116
 
 
117
$(MOZCE_TOOLS_BIN_DIR)/toolspath.obj:   $(MOZCE_TOOLS_DIR)/toolspath.c $(MOZCE_TOOLS_DIR)/toolspath.h $(MOZCE_TOOLS_DIR)/Makefile
 
118
        mkdir -p $(MOZCE_TOOLS_BIN_DIR);
 
119
        $(CC) $(CFLAGS) -c -Fo$(MOZCE_TOOLS_BIN_DIR)/toolspath.obj $(MOZCE_TOOLS_DIR)/toolspath.c
 
120
 
 
121
$(MOZCE_TOOLS_BIN_DIR)/arm-wince-as.exe:        $(MOZCE_TOOLS_DIR)/arm-wince-as.c $(MOZCE_TOOLS_DIR)/toolspath.h $(MOZCE_TOOLS_DIR)/Makefile $(MOZCE_TOOLS_BIN_DIR)/toolspath.obj
 
122
        mkdir -p $(MOZCE_TOOLS_BIN_DIR);
 
123
        $(CC) $(CFLAGS) -Fo$(MOZCE_TOOLS_BIN_DIR) -Fe$@ $(MOZCE_TOOLS_DIR)/arm-wince-as.c -link $(MOZCE_TOOLS_BIN_DIR)/toolspath.obj
 
124
 
 
125
$(MOZCE_TOOLS_BIN_DIR)/arm-wince-gcc.exe:       $(MOZCE_TOOLS_DIR)/arm-wince-gcc.c $(MOZCE_TOOLS_DIR)/toolspath.h $(MOZCE_TOOLS_DIR)/Makefile $(MOZCE_TOOLS_BIN_DIR)/linkargs.obj $(MOZCE_TOOLS_BIN_DIR)/toolspath.obj
 
126
        mkdir -p $(MOZCE_TOOLS_BIN_DIR);
 
127
        $(CC) $(CFLAGS) -Fo$(MOZCE_TOOLS_BIN_DIR) -Fe$@ $(MOZCE_TOOLS_DIR)/arm-wince-gcc.c -link $(MOZCE_TOOLS_BIN_DIR)/linkargs.obj $(MOZCE_TOOLS_BIN_DIR)/toolspath.obj
 
128
 
 
129
$(MOZCE_TOOLS_BIN_DIR)/arm-wince-lib.exe:       $(MOZCE_TOOLS_DIR)/arm-wince-lib.c $(MOZCE_TOOLS_DIR)/toolspath.h $(MOZCE_TOOLS_DIR)/Makefile $(MOZCE_TOOLS_BIN_DIR)/toolspath.obj
 
130
        mkdir -p $(MOZCE_TOOLS_BIN_DIR);
 
131
        $(CC) $(CFLAGS) -Fo$(MOZCE_TOOLS_BIN_DIR) -Fe$@ $(MOZCE_TOOLS_DIR)/arm-wince-lib.c -link $(MOZCE_TOOLS_BIN_DIR)/toolspath.obj
 
132
 
 
133
$(MOZCE_TOOLS_BIN_DIR)/arm-wince-link.exe:      $(MOZCE_TOOLS_DIR)/arm-wince-link.c $(MOZCE_TOOLS_DIR)/toolspath.h $(MOZCE_TOOLS_DIR)/Makefile $(MOZCE_TOOLS_BIN_DIR)/linkargs.obj $(MOZCE_TOOLS_BIN_DIR)/toolspath.obj
 
134
        mkdir -p $(MOZCE_TOOLS_BIN_DIR);
 
135
        $(CC) $(CFLAGS) -Fo$(MOZCE_TOOLS_BIN_DIR) -Fe$@ $(MOZCE_TOOLS_DIR)/arm-wince-link.c -link $(MOZCE_TOOLS_BIN_DIR)/linkargs.obj $(MOZCE_TOOLS_BIN_DIR)/toolspath.obj
 
136
 
 
137
$(MOZCE_TOOLS_BIN_DIR)/arm-wince-res.exe:       $(MOZCE_TOOLS_DIR)/arm-wince-res.c $(MOZCE_TOOLS_DIR)/toolspath.h $(MOZCE_TOOLS_DIR)/Makefile $(MOZCE_TOOLS_BIN_DIR)/toolspath.obj
 
138
        mkdir -p $(MOZCE_TOOLS_BIN_DIR);
 
139
        $(CC) $(CFLAGS) -Fo$(MOZCE_TOOLS_BIN_DIR) -Fe$@ $(MOZCE_TOOLS_DIR)/arm-wince-res.c -link $(MOZCE_TOOLS_BIN_DIR)/toolspath.obj
 
140
 
 
141
 
 
142
export:: $(SDK_TOOLS)
 
143
ifdef MOZCE_NOT_CONFIGURE
 
144
        mkdir -p $(OBJDIR)/dist/sdk/bin
 
145
        cp $^ $(OBJDIR)/dist/sdk/bin
 
146
endif