1 # Derived from Inferno libmach/mkfile
2 # http://code.google.com/p/inferno-os/source/browse/utils/libmach/mkfile
3 #
4 # Copyright © 1994-1999 Lucent Technologies Inc.
5 # Power PC support Copyright © 1995-2004 C H Forsyth (forsyth@terzarima.net).
6 # Portions Copyright © 1997-1999 Vita Nuova Limited.
7 # Portions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).
8 # Revisions Copyright © 2000-2004 Lucent Technologies Inc. and others.
9 # Portions Copyright © 2009 The Go Authors. All rights reserved.
10 #
11 # Permission is hereby granted, free of charge, to any person obtaining a copy
12 # of this software and associated documentation files (the "Software"), to deal
13 # in the Software without restriction, including without limitation the rights
14 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 # copies of the Software, and to permit persons to whom the Software is
16 # furnished to do so, subject to the following conditions:
17 #
18 # The above copyright notice and this permission notice shall be included in
19 # all copies or substantial portions of the Software.
20 #
21 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27 # THE SOFTWARE.
28
29 include ../Make.inc
30 O:=$(HOST_O)
31
32 LIB=libmach.a
33 OFILES=\
34 executable.$O\
35 fakeobj.$O\
36 map.$O\
37 obj.$O\
38 swap.$O\
39 sym.$O\
40 access.$O\
41 machdata.$O\
42 setmach.$O\
43 5.$O\
44 6.$O\
45 8.$O\
46 5db.$O\
47 8db.$O\
48 5obj.$O\
49 6obj.$O\
50 8obj.$O\
51
52 ifneq ($(GOHOSTOS),windows)
53 OFILES+=\
54 $(shell uname | tr A-Z a-z).$O\
55
56 else
57 OFILES+=\
58 windows.$O\
59
60 endif
61
62 HFILES=../../include/mach.h elf.h macho.h obj.h
63
64 include ../Make.clib