build.atpkg 2.51 KB
Newer Older
Drew's avatar
Drew committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
;; Copyright (c) 2016 Anarchy Tools Contributors.
;;
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;;   http:;;www.apache.org/licenses/LICENSE-2.0
;;
;; Unless required by applicable law or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.

(package
  :name "atbin"
Drew's avatar
Drew committed
17
  :version "1.0"
Drew's avatar
Drew committed
18 19 20 21 22 23 24 25 26 27
  :tasks {
    :slib {
      :tool "atllbuild"
      :name "slib"
      :output-type "static-library"
      :sources ["lib/**.swift"]
      :umbrella-header "lib/lib.h"
      :module-map "synthesized"
    }

Drew's avatar
Drew committed
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
    :use-satbin {
      :tool "atllbuild"
      :name "usesatbin"
      :output-type "executable"
      :sources ["use/**.swift"]
      :dependencies ["satbin"]
      :link-with-atbin ["bin/staticatbin.atbin"]
    }

    :use-datbin {
      :tool "atllbuild"
      :name "usesatbin"
      :output-type "executable"
      :sources ["used/**.swift"]
      :dependencies ["datbin"]
      :link-with-atbin ["bin/dynamicatbin.atbin"]
    }

Drew's avatar
Drew committed
46 47 48 49 50 51 52 53 54 55 56 57
    :dlib {
      :tool "atllbuild"
      :name "dlib"
      :output-type "dynamic-library"
      :sources ["lib/**.swift"]
      :umbrella-header "lib/lib.h"
      :module-map "synthesized"

      ;;installing a dependency here allows us to check
      ;; a corner case of the platform logic; we want to match
      ;; the dependencies platforms
      :dependencies ["slib"]
Drew's avatar
Drew committed
58
      :link-with-product ["slib.a"]
Drew's avatar
Drew committed
59 60 61 62 63 64 65 66 67 68 69 70 71 72
    }

    :exec {
      :tool "atllbuild"
      :name "exec"
      :output-type "executable"
      :sources ["exec/**.swift"]
    }

    :datbin {
      :tool "packageatbin"
      :name "dynamicatbin"
      :atllbuild-task "dlib"
      :platforms ["all"]
Drew's avatar
Drew committed
73
      :compress true
Drew's avatar
Drew committed
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
    }

    :ebin {
      :tool "packageatbin"
      :name "executableatbin"
      :atllbuild-task "exec"
      :platforms ["all"]
    }

    :satbin {
      :tool "packageatbin"
      :name "staticatbin"
      :atllbuild-task "slib"
      :platforms ["all"]
    }

    :simatbin {
      :tool "packageatbin"
      :name "sim"
      :atllbuild-task "slib"
      :platforms ["ios-x86_64" "ios-i386"]
    }

Drew's avatar
Drew committed
97 98 99 100 101
    :use {
      :tool "nop"
      :dependencies ["use-satbin" "use-datbin"]
    }

Drew's avatar
Drew committed
102 103 104 105 106 107 108
    :default {
      :tool "nop"
      :dependencies ["datbin" "satbin" "ebin" "simatbin"]
    }
  }

)