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

« back to all changes in this revision

Viewing changes to build/wince/tools/linkargs.c

  • 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
#include "toolspath.h"
 
2
#include "linkargs.h"
 
3
 
 
4
void checkLinkArgs(int* k, int* s, int* i, int* j, char** args, char** argv) {
 
5
      if (strncmp(argv[*j], "-DLL", 4) == 0 ||
 
6
          strncmp(argv[*j], "/DLL", 4) == 0) {
 
7
        *k = 1;
 
8
      }
 
9
      if (strncmp(argv[*j], "-entry", 6) == 0 ||
 
10
          strncmp(argv[*j], "/entry", 6) == 0 ||
 
11
          strncmp(argv[*j], "-ENTRY", 6) == 0 ||
 
12
          strncmp(argv[*j], "/ENTRY",6 ) == 0) {
 
13
        *k = 1;
 
14
      }
 
15
      if (strncmp(argv[*j], "-subsystem:", 11) == 0 ||
 
16
          strncmp(argv[*j], "/subsystem:", 11) == 0 ||
 
17
          strncmp(argv[*j], "-SUBSYSTEM:", 11) == 0 ||
 
18
          strncmp(argv[*j], "/SUBSYSTEM:", 11) == 0) {
 
19
        *s = 1;
 
20
      }
 
21
}
 
22
 
 
23
void addLinkArgs(int k, int s, int *i, int *j, char** args, char** argv) {
 
24
  args[(*i)++] = "/LIBPATH:\"" WCE_LIB "\"";
 
25
  args[(*i)++] = "/LIBPATH:\"" WCE_CRT "\"";
 
26
  args[(*i)++] = "/LIBPATH:\"" ATL_LIB "\"";
 
27
  args[(*i)++] = "/LIBPATH:\"" OGLES_SDK_LIB "\"";
 
28
  args[(*i)++] = "/NODEFAULTLIB";
 
29
 
 
30
  args[(*i)++] = "/MAP";
 
31
  args[(*i)++] = "/MAPINFO:EXPORTS";
 
32
 
 
33
  if (getenv("LOCK_DLLS") != NULL) {
 
34
    // lock our dlls in memory
 
35
    args[(*i)++] = "/SECTION:.text,\!P";
 
36
    args[(*i)++] = "/SECTION:.rdata,\!P";
 
37
  }
 
38
 
 
39
#ifdef HAVE_SHUNT   // simple test to see if we're in configure or not
 
40
  if(getenv("NO_SHUNT") == NULL) {
 
41
    args[(*i)++] = "/LIBPATH:\"" SHUNT_LIB "\"";
 
42
    args[(*i)++] = "mozce_shunt.lib";
 
43
  }
 
44
#endif
 
45
 
 
46
  args[(*i)++] = "corelibc.lib";
 
47
  args[(*i)++] = "coredll.lib";
 
48
  args[(*i)++] = "ceshell.lib";
 
49
  args[(*i)++] = "mmtimer.lib";
 
50
 
 
51
  if (k==0)
 
52
    args[(*i)++] = "/ENTRY:main";
 
53
 
 
54
  if (s==0){
 
55
    args[(*i)++] = "/subsystem:\"WINDOWSCE,5.02\"";
 
56
  }
 
57
}