OSDN Git Service

libgo: Use the right files on Solaris variants.
[pf3gnuchains/gcc-fork.git] / libgo / Makefile.am
1 # Makefile.am -- Go library Makefile.
2
3 # Copyright 2009 The Go Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style
5 # license that can be found in the LICENSE file.
6
7 # Process this file with autoreconf to produce Makefile.in.
8
9 # Go support.
10 SUFFIXES = .c .go .gox .o .obj .lo .a
11
12 if LIBGO_IS_RTEMS
13 subdirs = testsuite
14 endif
15
16 SUBDIRS = ${subdirs}
17
18 gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
19
20 MAINT_CHARSET = latin1
21
22 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
23 PWD_COMMAND = $${PWDCMD-pwd}
24 STAMP = echo timestamp >
25
26 toolexecdir = $(glibgo_toolexecdir)
27 toolexeclibdir = $(glibgo_toolexeclibdir)
28
29 LIBFFI = @LIBFFI@
30 LIBFFIINCS = @LIBFFIINCS@
31
32 WARN_CFLAGS = $(WARN_FLAGS) $(WERROR)
33
34 # -I/-D flags to pass when compiling.
35 AM_CPPFLAGS = -I $(srcdir)/runtime $(LIBFFIINCS) $(PTHREAD_CFLAGS)
36
37 ACLOCAL_AMFLAGS = -I ./config -I ../config
38
39 AM_CFLAGS = -fexceptions -fplan9-extensions $(SPLIT_STACK) $(WARN_CFLAGS) \
40         $(STRINGOPS_FLAG) \
41         -I $(srcdir)/../gcc -I $(MULTIBUILDTOP)../../gcc/include
42
43 if USING_SPLIT_STACK
44 AM_LDFLAGS = -XCClinker $(SPLIT_STACK)
45 endif
46
47 # Multilib support.
48 MAKEOVERRIDES=
49
50 # Work around what appears to be a GNU make  handling MAKEFLAGS
51 # values defined in terms of make variables, as is the case for CC and
52 # friends when we are called from the top level Makefile.
53 AM_MAKEFLAGS = \
54         "AR_FLAGS=$(AR_FLAGS)" \
55         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
56         "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
57         "CFLAGS=$(CFLAGS)" \
58         "CXXFLAGS=$(CXXFLAGS)" \
59         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
60         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
61         "GOC_FOR_TARGET=$(GOC_FOR_TARGET)" \
62         "GOC=$(GOC)" \
63         "GOCFLAGS=$(GOCFLAGS)" \
64         "INSTALL=$(INSTALL)" \
65         "INSTALL_DATA=$(INSTALL_DATA)" \
66         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
67         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
68         "LDFLAGS=$(LDFLAGS)" \
69         "LIBCFLAGS=$(LIBCFLAGS)" \
70         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
71         "MAKE=$(MAKE)" \
72         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
73         "PICFLAG=$(PICFLAG)" \
74         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
75         "SHELL=$(SHELL)" \
76         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
77         "exec_prefix=$(exec_prefix)" \
78         "infodir=$(infodir)" \
79         "libdir=$(libdir)" \
80         "includedir=$(includedir)" \
81         "prefix=$(prefix)" \
82         "tooldir=$(tooldir)" \
83         "gxx_include_dir=$(gxx_include_dir)" \
84         "AR=$(AR)" \
85         "AS=$(AS)" \
86         "LD=$(LD)" \
87         "RANLIB=$(RANLIB)" \
88         "NM=$(NM)" \
89         "NM_FOR_BUILD=$(NM_FOR_BUILD)" \
90         "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
91         "DESTDIR=$(DESTDIR)" \
92         "WERROR=$(WERROR)"
93
94 # Subdir rules rely on $(FLAGS_TO_PASS)
95 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
96
97 toolexeclib_LTLIBRARIES = libgo.la
98 toolexeclib_LIBRARIES = libgobegin.a
99
100 toolexeclibgodir = $(toolexeclibdir)/go/$(gcc_version)/$(target_alias)
101
102 toolexeclibgo_DATA = \
103         asn1.gox \
104         big.gox \
105         bufio.gox \
106         bytes.gox \
107         cmath.gox \
108         crypto.gox \
109         ebnf.gox \
110         exec.gox \
111         expvar.gox \
112         flag.gox \
113         fmt.gox \
114         gob.gox \
115         hash.gox \
116         html.gox \
117         http.gox \
118         image.gox \
119         io.gox \
120         json.gox \
121         log.gox \
122         math.gox \
123         mime.gox \
124         net.gox \
125         netchan.gox \
126         os.gox \
127         patch.gox \
128         path.gox \
129         rand.gox \
130         reflect.gox \
131         regexp.gox \
132         rpc.gox \
133         runtime.gox \
134         scanner.gox \
135         smtp.gox \
136         sort.gox \
137         strconv.gox \
138         strings.gox \
139         sync.gox \
140         syscall.gox \
141         syslog.gox \
142         tabwriter.gox \
143         template.gox \
144         testing.gox \
145         time.gox \
146         try.gox \
147         unicode.gox \
148         utf16.gox \
149         utf8.gox \
150         websocket.gox \
151         xml.gox
152
153 toolexeclibgoarchivedir = $(toolexeclibgodir)/archive
154
155 toolexeclibgoarchive_DATA = \
156         archive/tar.gox \
157         archive/zip.gox
158
159 toolexeclibgocompressdir = $(toolexeclibgodir)/compress
160
161 toolexeclibgocompress_DATA = \
162         compress/bzip2.gox \
163         compress/flate.gox \
164         compress/gzip.gox \
165         compress/lzw.gox \
166         compress/zlib.gox
167
168 toolexeclibgocontainerdir = $(toolexeclibgodir)/container
169
170 toolexeclibgocontainer_DATA = \
171         container/heap.gox \
172         container/list.gox \
173         container/ring.gox \
174         container/vector.gox
175
176 toolexeclibgocryptodir = $(toolexeclibgodir)/crypto
177
178 toolexeclibgocrypto_DATA = \
179         crypto/aes.gox \
180         crypto/block.gox \
181         crypto/blowfish.gox \
182         crypto/cast5.gox \
183         crypto/cipher.gox \
184         crypto/dsa.gox \
185         crypto/ecdsa.gox \
186         crypto/elliptic.gox \
187         crypto/hmac.gox \
188         crypto/md4.gox \
189         crypto/md5.gox \
190         crypto/ocsp.gox \
191         crypto/openpgp.gox \
192         crypto/rand.gox \
193         crypto/rc4.gox \
194         crypto/ripemd160.gox \
195         crypto/rsa.gox \
196         crypto/sha1.gox \
197         crypto/sha256.gox \
198         crypto/sha512.gox \
199         crypto/subtle.gox \
200         crypto/tls.gox \
201         crypto/twofish.gox \
202         crypto/x509.gox \
203         crypto/xtea.gox
204
205 toolexeclibgocryptoopenpgpdir = $(toolexeclibgocryptodir)/openpgp
206
207 toolexeclibgocryptoopenpgp_DATA = \
208         crypto/openpgp/armor.gox \
209         crypto/openpgp/error.gox \
210         crypto/openpgp/packet.gox \
211         crypto/openpgp/s2k.gox
212
213 toolexeclibgodebugdir = $(toolexeclibgodir)/debug
214
215 toolexeclibgodebug_DATA = \
216         debug/dwarf.gox \
217         debug/elf.gox \
218         debug/gosym.gox \
219         debug/macho.gox \
220         debug/pe.gox \
221         debug/proc.gox
222
223 toolexeclibgoencodingdir = $(toolexeclibgodir)/encoding
224
225 toolexeclibgoencoding_DATA = \
226         encoding/ascii85.gox \
227         encoding/base32.gox \
228         encoding/base64.gox \
229         encoding/binary.gox \
230         encoding/line.gox \
231         encoding/git85.gox \
232         encoding/hex.gox \
233         encoding/pem.gox
234
235 toolexeclibgoexpdir = $(toolexeclibgodir)/exp
236
237 toolexeclibgoexp_DATA = \
238         exp/datafmt.gox \
239         exp/draw.gox \
240         exp/eval.gox
241
242 toolexeclibgogodir = $(toolexeclibgodir)/go
243
244 toolexeclibgogo_DATA = \
245         go/ast.gox \
246         go/doc.gox \
247         go/parser.gox \
248         go/printer.gox \
249         go/scanner.gox \
250         go/token.gox \
251         go/typechecker.gox
252
253 toolexeclibgohashdir = $(toolexeclibgodir)/hash
254
255 toolexeclibgohash_DATA = \
256         hash/adler32.gox \
257         hash/crc32.gox \
258         hash/crc64.gox \
259         hash/fnv.gox
260
261 toolexeclibgohttpdir = $(toolexeclibgodir)/http
262
263 toolexeclibgohttp_DATA = \
264         http/cgi.gox \
265         http/httptest.gox \
266         http/pprof.gox
267
268 toolexeclibgoimagedir = $(toolexeclibgodir)/image
269
270 toolexeclibgoimage_DATA = \
271         image/jpeg.gox \
272         image/png.gox
273
274 toolexeclibgoindexdir = $(toolexeclibgodir)/index
275
276 toolexeclibgoindex_DATA = \
277         index/suffixarray.gox
278
279 toolexeclibgoiodir = $(toolexeclibgodir)/io
280
281 toolexeclibgoio_DATA = \
282         io/ioutil.gox
283
284 toolexeclibgomimedir = $(toolexeclibgodir)/mime
285
286 toolexeclibgomime_DATA = \
287         mime/multipart.gox
288
289 toolexeclibgonetdir = $(toolexeclibgodir)/net
290
291 toolexeclibgonet_DATA = \
292         net/dict.gox \
293         net/textproto.gox
294
295 toolexeclibgoosdir = $(toolexeclibgodir)/os
296
297 if LIBGO_IS_LINUX
298 # os_inotify_gox = os/inotify.gox
299 os_inotify_gox =
300 else
301 os_inotify_gox =
302 endif
303
304 toolexeclibgoos_DATA = \
305         $(os_inotify_gox) \
306         os/signal.gox
307
308 toolexeclibgopathdir = $(toolexeclibgodir)/path
309
310 toolexeclibgopath_DATA = \
311         path/filepath.gox
312
313 toolexeclibgorpcdir = $(toolexeclibgodir)/rpc
314
315 toolexeclibgorpc_DATA = \
316         rpc/jsonrpc.gox
317
318 toolexeclibgoruntimedir = $(toolexeclibgodir)/runtime
319
320 toolexeclibgoruntime_DATA = \
321         runtime/debug.gox \
322         runtime/pprof.gox
323
324 toolexeclibgosyncdir = $(toolexeclibgodir)/sync
325
326 toolexeclibgosync_DATA = \
327         sync/atomic.gox
328
329 toolexeclibgotestingdir = $(toolexeclibgodir)/testing
330
331 toolexeclibgotesting_DATA = \
332         testing/iotest.gox \
333         testing/quick.gox \
334         testing/script.gox
335
336 if HAVE_SYS_MMAN_H
337 runtime_mem_file = runtime/mem.c
338 else
339 runtime_mem_file = runtime/mem_posix_memalign.c
340 endif
341
342 if LIBGO_IS_RTEMS
343 rtems_task_variable_add_file = runtime/rtems-task-variable-add.c
344 else
345 rtems_task_variable_add_file =
346 endif
347
348 runtime_files = \
349         runtime/go-append.c \
350         runtime/go-assert.c \
351         runtime/go-assert-interface.c \
352         runtime/go-byte-array-to-string.c \
353         runtime/go-breakpoint.c \
354         runtime/go-caller.c \
355         runtime/go-can-convert-interface.c \
356         runtime/go-cgo.c \
357         runtime/go-chan-cap.c \
358         runtime/go-chan-len.c \
359         runtime/go-check-interface.c \
360         runtime/go-close.c \
361         runtime/go-construct-map.c \
362         runtime/go-convert-interface.c \
363         runtime/go-copy.c \
364         runtime/go-defer.c \
365         runtime/go-deferred-recover.c \
366         runtime/go-eface-compare.c \
367         runtime/go-eface-val-compare.c \
368         runtime/go-getgoroot.c \
369         runtime/go-go.c \
370         runtime/go-gomaxprocs.c \
371         runtime/go-int-array-to-string.c \
372         runtime/go-int-to-string.c \
373         runtime/go-interface-compare.c \
374         runtime/go-interface-eface-compare.c \
375         runtime/go-interface-val-compare.c \
376         runtime/go-lock-os-thread.c \
377         runtime/go-map-delete.c \
378         runtime/go-map-index.c \
379         runtime/go-map-len.c \
380         runtime/go-map-range.c \
381         runtime/go-nanotime.c \
382         runtime/go-new-channel.c \
383         runtime/go-new-map.c \
384         runtime/go-new.c \
385         runtime/go-note.c \
386         runtime/go-panic.c \
387         runtime/go-panic-defer.c \
388         runtime/go-print.c \
389         runtime/go-rec-big.c \
390         runtime/go-rec-nb-big.c \
391         runtime/go-rec-nb-small.c \
392         runtime/go-rec-small.c \
393         runtime/go-recover.c \
394         runtime/go-reflect.c \
395         runtime/go-reflect-call.c \
396         runtime/go-reflect-chan.c \
397         runtime/go-reflect-map.c \
398         runtime/go-rune.c \
399         runtime/go-runtime-error.c \
400         runtime/go-sched.c \
401         runtime/go-select.c \
402         runtime/go-semacquire.c \
403         runtime/go-send-big.c \
404         runtime/go-send-nb-big.c \
405         runtime/go-send-nb-small.c \
406         runtime/go-send-small.c \
407         runtime/go-signal.c \
408         runtime/go-strcmp.c \
409         runtime/go-string-to-byte-array.c \
410         runtime/go-string-to-int-array.c \
411         runtime/go-strplus.c \
412         runtime/go-strslice.c \
413         runtime/go-trampoline.c \
414         runtime/go-type-eface.c \
415         runtime/go-type-error.c \
416         runtime/go-type-identity.c \
417         runtime/go-type-interface.c \
418         runtime/go-type-string.c \
419         runtime/go-typedesc-equal.c \
420         runtime/go-typestring.c \
421         runtime/go-unreflect.c \
422         runtime/go-unsafe-new.c \
423         runtime/go-unsafe-newarray.c \
424         runtime/go-unsafe-pointer.c \
425         runtime/go-unwind.c \
426         runtime/cpuprof.c \
427         runtime/mcache.c \
428         runtime/mcentral.c \
429         $(runtime_mem_file) \
430         runtime/mfinal.c \
431         runtime/mfixalloc.c \
432         runtime/mgc0.c \
433         runtime/mheap.c \
434         runtime/msize.c \
435         runtime/proc.c \
436         runtime/thread.c \
437         $(rtems_task_variable_add_file) \
438         chan.c \
439         iface.c \
440         malloc.c \
441         map.c \
442         mprof.c \
443         reflect.c \
444         sigqueue.c \
445         string.c
446
447 goc2c.$(OBJEXT): runtime/goc2c.c
448         $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) $<
449
450 goc2c: goc2c.$(OBJEXT)
451         $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $<
452
453 malloc.c: $(srcdir)/runtime/malloc.goc goc2c
454         ./goc2c --gcc --go-prefix libgo_runtime $< > $@.tmp
455         mv -f $@.tmp $@
456
457 mprof.c: $(srcdir)/runtime/mprof.goc goc2c
458         ./goc2c --gcc --go-prefix libgo_runtime $< > $@.tmp
459         mv -f $@.tmp $@
460
461 reflect.c: $(srcdir)/runtime/reflect.goc goc2c
462         ./goc2c --gcc --go-prefix libgo_reflect $< > $@.tmp
463         mv -f $@.tmp $@
464
465 sigqueue.c: $(srcdir)/runtime/sigqueue.goc goc2c
466         ./goc2c --gcc --go-prefix libgo_runtime $< > $@.tmp
467         mv -f $@.tmp $@
468
469 %.c: $(srcdir)/runtime/%.goc goc2c
470         ./goc2c --gcc $< > $@.tmp
471         mv -f $@.tmp $@
472
473 go_asn1_files = \
474         go/asn1/asn1.go \
475         go/asn1/common.go \
476         go/asn1/marshal.go
477
478 go_big_files = \
479         go/big/arith.go \
480         go/big/int.go \
481         go/big/nat.go \
482         go/big/rat.go
483
484 go_bufio_files = \
485         go/bufio/bufio.go
486
487 go_bytes_files = \
488         go/bytes/buffer.go \
489         go/bytes/bytes.go \
490         go/bytes/bytes_decl.go
491 go_bytes_c_files = \
492         go/bytes/indexbyte.c
493
494 go_cmath_files = \
495         go/cmath/abs.go \
496         go/cmath/asin.go \
497         go/cmath/conj.go \
498         go/cmath/exp.go \
499         go/cmath/isinf.go \
500         go/cmath/isnan.go \
501         go/cmath/log.go \
502         go/cmath/phase.go \
503         go/cmath/polar.go \
504         go/cmath/pow.go \
505         go/cmath/rect.go \
506         go/cmath/sin.go \
507         go/cmath/sqrt.go \
508         go/cmath/tan.go
509
510 go_crypto_files = \
511         go/crypto/crypto.go
512
513 go_ebnf_files = \
514         go/ebnf/ebnf.go \
515         go/ebnf/parser.go
516
517 go_exec_files = \
518         go/exec/exec.go \
519         go/exec/lp_unix.go
520
521 go_expvar_files = \
522         go/expvar/expvar.go
523
524 go_flag_files = \
525         go/flag/flag.go
526
527 go_fmt_files = \
528         go/fmt/doc.go \
529         go/fmt/format.go \
530         go/fmt/print.go \
531         go/fmt/scan.go
532
533 go_gob_files = \
534         go/gob/decode.go \
535         go/gob/decoder.go \
536         go/gob/doc.go \
537         go/gob/encode.go \
538         go/gob/encoder.go \
539         go/gob/error.go \
540         go/gob/type.go
541
542 go_hash_files = \
543         go/hash/hash.go
544
545 go_html_files = \
546         go/html/doc.go \
547         go/html/entity.go \
548         go/html/escape.go \
549         go/html/parse.go \
550         go/html/token.go
551
552 go_http_files = \
553         go/http/chunked.go \
554         go/http/client.go \
555         go/http/cookie.go \
556         go/http/dump.go \
557         go/http/fs.go \
558         go/http/header.go \
559         go/http/lex.go \
560         go/http/persist.go \
561         go/http/request.go \
562         go/http/response.go \
563         go/http/server.go \
564         go/http/status.go \
565         go/http/transfer.go \
566         go/http/transport.go \
567         go/http/url.go
568
569 go_image_files = \
570         go/image/color.go \
571         go/image/format.go \
572         go/image/geom.go \
573         go/image/image.go \
574         go/image/names.go
575
576 go_io_files = \
577         go/io/multi.go \
578         go/io/io.go \
579         go/io/pipe.go
580
581 go_json_files = \
582         go/json/decode.go \
583         go/json/encode.go \
584         go/json/indent.go \
585         go/json/scanner.go \
586         go/json/stream.go
587
588 go_log_files = \
589         go/log/log.go
590
591 go_math_files = \
592         go/math/acosh.go \
593         go/math/asin.go \
594         go/math/asinh.go \
595         go/math/atan.go \
596         go/math/atanh.go \
597         go/math/atan2.go \
598         go/math/bits.go \
599         go/math/cbrt.go \
600         go/math/const.go \
601         go/math/copysign.go \
602         go/math/erf.go \
603         go/math/exp.go \
604         go/math/exp_port.go \
605         go/math/exp2.go \
606         go/math/expm1.go \
607         go/math/fabs.go \
608         go/math/fdim.go \
609         go/math/floor.go \
610         go/math/fmod.go \
611         go/math/frexp.go \
612         go/math/gamma.go \
613         go/math/hypot.go \
614         go/math/hypot_port.go \
615         go/math/j0.go \
616         go/math/j1.go \
617         go/math/jn.go \
618         go/math/ldexp.go \
619         go/math/lgamma.go \
620         go/math/log.go \
621         go/math/log1p.go \
622         go/math/log10.go \
623         go/math/logb.go \
624         go/math/modf.go \
625         go/math/nextafter.go \
626         go/math/pow.go \
627         go/math/pow10.go \
628         go/math/remainder.go \
629         go/math/signbit.go \
630         go/math/sin.go \
631         go/math/sincos.go \
632         go/math/sinh.go \
633         go/math/sqrt.go \
634         go/math/sqrt_port.go \
635         go/math/tan.go \
636         go/math/tanh.go \
637         go/math/unsafe.go
638
639 go_mime_files = \
640         go/mime/grammar.go \
641         go/mime/mediatype.go \
642         go/mime/type.go
643
644 if LIBGO_IS_RTEMS
645 go_net_fd_os_file = go/net/fd_select.go
646 go_net_newpollserver_file = go/net/newpollserver_rtems.go
647 else # !LIBGO_IS_RTEMS
648 if LIBGO_IS_LINUX
649 go_net_fd_os_file = go/net/fd_linux.go
650 go_net_newpollserver_file = go/net/newpollserver.go
651 else # !LIBGO_IS_LINUX && !LIBGO_IS_RTEMS
652 # By default use select with pipes.  Most systems should have
653 # something better.
654 go_net_fd_os_file = go/net/fd_select.go
655 go_net_newpollserver_file = go/net/newpollserver.go
656 endif # !LIBGO_IS_LINUX
657 endif # !LIBGO_IS_RTEMS
658
659 go_net_files = \
660         go/net/cgo_stub.go \
661         go/net/dial.go \
662         go/net/dnsclient.go \
663         go/net/dnsconfig.go \
664         go/net/dnsmsg.go \
665         $(go_net_newpollserver_file) \
666         go/net/fd.go \
667         $(go_net_fd_os_file) \
668         go/net/file.go \
669         go/net/hosts.go \
670         go/net/ip.go \
671         go/net/iprawsock.go \
672         go/net/ipsock.go \
673         go/net/lookup.go \
674         go/net/net.go \
675         go/net/parse.go \
676         go/net/pipe.go \
677         go/net/port.go \
678         go/net/sock.go \
679         go/net/tcpsock.go \
680         go/net/udpsock.go \
681         go/net/unixsock.go
682
683 go_netchan_files = \
684         go/netchan/common.go \
685         go/netchan/export.go \
686         go/netchan/import.go
687
688 if LIBGO_IS_SOLARIS
689 if LIBGO_IS_386
690 go_os_dir_file = go/os/dir_largefile.go
691 else
692 if LIBGO_IS_SPARC
693 go_os_dir_file = go/os/dir_largefile.go
694 else
695 go_os_dir_file = go/os/dir_regfile.go
696 endif
697 endif
698 else
699 if LIBGO_IS_LINUX
700 go_os_dir_file = go/os/dir_largefile.go
701 else
702 go_os_dir_file = go/os/dir_regfile.go
703 endif
704 endif
705
706 if LIBGO_IS_LINUX
707 go_os_sys_file = go/os/sys_linux.go
708 else
709 if LIBGO_IS_SOLARIS
710 go_os_sys_file = go/os/sys_uname.go
711 else
712 if LIBGO_IS_RTEMS
713 go_os_sys_file = go/os/sys_uname.go
714 else
715 go_os_sys_file = go/os/sys_bsd.go
716 endif
717 endif
718 endif
719
720 go_os_files = \
721         $(go_os_dir_file) \
722         go/os/dir.go \
723         go/os/env.go \
724         go/os/env_unix.go \
725         go/os/error.go \
726         go/os/exec.go \
727         go/os/exec_unix.go \
728         go/os/file.go \
729         go/os/file_unix.go \
730         go/os/getwd.go \
731         go/os/path.go \
732         go/os/proc.go \
733         go/os/stat.go \
734         $(go_os_sys_file) \
735         go/os/time.go \
736         go/os/types.go
737
738 go_patch_files = \
739         go/patch/apply.go \
740         go/patch/git.go \
741         go/patch/patch.go \
742         go/patch/textdiff.go
743
744 go_path_files = \
745         go/path/match.go \
746         go/path/path.go
747
748 go_rand_files = \
749         go/rand/exp.go \
750         go/rand/normal.go \
751         go/rand/rand.go \
752         go/rand/rng.go \
753         go/rand/zipf.go
754
755 go_reflect_files = \
756         go/reflect/deepequal.go \
757         go/reflect/type.go \
758         go/reflect/value.go
759
760 go_regexp_files = \
761         go/regexp/regexp.go
762
763 go_rpc_files = \
764         go/rpc/client.go \
765         go/rpc/debug.go \
766         go/rpc/server.go
767
768 go_runtime_files = \
769         go/runtime/debug.go \
770         go/runtime/error.go \
771         go/runtime/extern.go \
772         go/runtime/mem.go \
773         go/runtime/sig.go \
774         go/runtime/softfloat64.go \
775         go/runtime/type.go \
776         version.go
777
778 version.go: s-version; @true
779 s-version: Makefile
780         rm -f version.go.tmp
781         echo "package runtime" > version.go.tmp
782         echo 'const defaultGoroot = "$(prefix)"' >> version.go.tmp
783         echo 'const theVersion = "'`$(CC) --version | sed 1q`'"' >> version.go.tmp
784         echo 'const theGoarch = "'$(GOARCH)'"' >> version.go.tmp
785         echo 'const theGoos = "'$(GOOS)'"' >> version.go.tmp
786         $(SHELL) $(srcdir)/../move-if-change version.go.tmp version.go
787         $(STAMP) $@
788
789 go_scanner_files = \
790         go/scanner/scanner.go
791
792 go_smtp_files = \
793         go/smtp/auth.go \
794         go/smtp/smtp.go
795
796 go_sort_files = \
797         go/sort/search.go \
798         go/sort/sort.go
799
800 go_strconv_files = \
801         go/strconv/atob.go \
802         go/strconv/atof.go \
803         go/strconv/atoi.go \
804         go/strconv/decimal.go \
805         go/strconv/ftoa.go \
806         go/strconv/itoa.go \
807         go/strconv/quote.go
808
809 go_strings_files = \
810         go/strings/reader.go \
811         go/strings/strings.go
812
813 go_sync_files = \
814         go/sync/cond.go \
815         go/sync/mutex.go \
816         go/sync/once.go \
817         go/sync/rwmutex.go \
818         go/sync/waitgroup.go
819
820 if LIBGO_IS_SOLARIS
821 go_syslog_file = go/syslog/syslog_solaris.go
822 else
823 go_syslog_file = go/syslog/syslog_unix.go
824 endif
825
826 go_syslog_files = \
827         go/syslog/syslog.go \
828         $(go_syslog_file)
829 go_syslog_c_files = \
830         go/syslog/syslog_c.c
831
832 go_tabwriter_files = \
833         go/tabwriter/tabwriter.go
834
835 go_template_files = \
836         go/template/format.go \
837         go/template/template.go
838
839 go_testing_files = \
840         go/testing/benchmark.go \
841         go/testing/testing.go
842
843 go_time_files = \
844         go/time/format.go \
845         go/time/sleep.go \
846         go/time/sys.go \
847         go/time/tick.go \
848         go/time/time.go \
849         go/time/zoneinfo_unix.go
850
851 go_try_files = \
852         go/try/try.go
853
854 go_unicode_files = \
855         go/unicode/casetables.go \
856         go/unicode/digit.go \
857         go/unicode/letter.go \
858         go/unicode/tables.go
859
860 go_utf16_files = \
861         go/utf16/utf16.go
862
863 go_utf8_files = \
864         go/utf8/string.go \
865         go/utf8/utf8.go
866
867 go_websocket_files = \
868         go/websocket/client.go \
869         go/websocket/server.go \
870         go/websocket/websocket.go
871
872 go_xml_files = \
873         go/xml/read.go \
874         go/xml/xml.go
875
876 go_archive_tar_files = \
877         go/archive/tar/common.go \
878         go/archive/tar/reader.go \
879         go/archive/tar/writer.go
880
881 go_archive_zip_files = \
882         go/archive/zip/reader.go \
883         go/archive/zip/struct.go
884
885 go_compress_bzip2_files = \
886         go/compress/bzip2/bit_reader.go \
887         go/compress/bzip2/bzip2.go \
888         go/compress/bzip2/huffman.go \
889         go/compress/bzip2/move_to_front.go
890
891 go_compress_flate_files = \
892         go/compress/flate/deflate.go \
893         go/compress/flate/huffman_bit_writer.go \
894         go/compress/flate/huffman_code.go \
895         go/compress/flate/inflate.go \
896         go/compress/flate/reverse_bits.go \
897         go/compress/flate/token.go \
898         go/compress/flate/util.go
899
900 go_compress_gzip_files = \
901         go/compress/gzip/gzip.go \
902         go/compress/gzip/gunzip.go
903
904 go_compress_lzw_files = \
905         go/compress/lzw/reader.go \
906         go/compress/lzw/writer.go
907
908 go_compress_zlib_files = \
909         go/compress/zlib/reader.go \
910         go/compress/zlib/writer.go
911
912 go_container_heap_files = \
913         go/container/heap/heap.go
914
915 go_container_list_files = \
916         go/container/list/list.go
917
918 go_container_ring_files = \
919         go/container/ring/ring.go
920
921 go_container_vector_files = \
922         go/container/vector/defs.go \
923         go/container/vector/intvector.go \
924         go/container/vector/stringvector.go \
925         go/container/vector/vector.go
926
927 go_crypto_aes_files = \
928         go/crypto/aes/block.go \
929         go/crypto/aes/cipher.go \
930         go/crypto/aes/const.go
931 go_crypto_block_files = \
932         go/crypto/block/cbc.go \
933         go/crypto/block/cfb.go \
934         go/crypto/block/cmac.go \
935         go/crypto/block/cipher.go \
936         go/crypto/block/ctr.go \
937         go/crypto/block/eax.go \
938         go/crypto/block/ecb.go \
939         go/crypto/block/ofb.go \
940         go/crypto/block/xor.go
941 go_crypto_blowfish_files = \
942         go/crypto/blowfish/block.go \
943         go/crypto/blowfish/const.go \
944         go/crypto/blowfish/cipher.go
945 go_crypto_cast5_files = \
946         go/crypto/cast5/cast5.go
947 go_crypto_cipher_files = \
948         go/crypto/cipher/cbc.go \
949         go/crypto/cipher/cfb.go \
950         go/crypto/cipher/cipher.go \
951         go/crypto/cipher/ctr.go \
952         go/crypto/cipher/io.go \
953         go/crypto/cipher/ocfb.go \
954         go/crypto/cipher/ofb.go
955 go_crypto_dsa_files = \
956         go/crypto/dsa/dsa.go
957 go_crypto_ecdsa_files = \
958         go/crypto/ecdsa/ecdsa.go
959 go_crypto_elliptic_files = \
960         go/crypto/elliptic/elliptic.go
961 go_crypto_hmac_files = \
962         go/crypto/hmac/hmac.go
963 go_crypto_md4_files = \
964         go/crypto/md4/md4.go \
965         go/crypto/md4/md4block.go
966 go_crypto_md5_files = \
967         go/crypto/md5/md5.go \
968         go/crypto/md5/md5block.go
969 go_crypto_ocsp_files = \
970         go/crypto/ocsp/ocsp.go
971 go_crypto_openpgp_files = \
972         go/crypto/openpgp/canonical_text.go \
973         go/crypto/openpgp/keys.go \
974         go/crypto/openpgp/read.go \
975         go/crypto/openpgp/write.go
976 go_crypto_rand_files = \
977         go/crypto/rand/rand.go \
978         go/crypto/rand/rand_unix.go
979 go_crypto_rc4_files = \
980         go/crypto/rc4/rc4.go
981 go_crypto_ripemd160_files = \
982         go/crypto/ripemd160/ripemd160.go \
983         go/crypto/ripemd160/ripemd160block.go
984 go_crypto_rsa_files = \
985         go/crypto/rsa/pkcs1v15.go \
986         go/crypto/rsa/rsa.go
987 go_crypto_sha1_files = \
988         go/crypto/sha1/sha1.go \
989         go/crypto/sha1/sha1block.go
990 go_crypto_sha256_files = \
991         go/crypto/sha256/sha256.go \
992         go/crypto/sha256/sha256block.go
993 go_crypto_sha512_files = \
994         go/crypto/sha512/sha512.go \
995         go/crypto/sha512/sha512block.go
996 go_crypto_subtle_files = \
997         go/crypto/subtle/constant_time.go
998 go_crypto_tls_files = \
999         go/crypto/tls/alert.go \
1000         go/crypto/tls/ca_set.go \
1001         go/crypto/tls/cipher_suites.go \
1002         go/crypto/tls/common.go \
1003         go/crypto/tls/conn.go \
1004         go/crypto/tls/handshake_client.go \
1005         go/crypto/tls/handshake_messages.go \
1006         go/crypto/tls/handshake_server.go \
1007         go/crypto/tls/key_agreement.go \
1008         go/crypto/tls/prf.go \
1009         go/crypto/tls/tls.go
1010 go_crypto_twofish_files = \
1011         go/crypto/twofish/twofish.go
1012 go_crypto_x509_files = \
1013         go/crypto/x509/x509.go
1014 go_crypto_xtea_files = \
1015         go/crypto/xtea/block.go \
1016         go/crypto/xtea/cipher.go
1017
1018 go_crypto_openpgp_armor_files = \
1019         go/crypto/openpgp/armor/armor.go \
1020         go/crypto/openpgp/armor/encode.go
1021 go_crypto_openpgp_error_files = \
1022         go/crypto/openpgp/error/error.go
1023 go_crypto_openpgp_packet_files = \
1024         go/crypto/openpgp/packet/compressed.go \
1025         go/crypto/openpgp/packet/encrypted_key.go \
1026         go/crypto/openpgp/packet/literal.go \
1027         go/crypto/openpgp/packet/one_pass_signature.go \
1028         go/crypto/openpgp/packet/packet.go \
1029         go/crypto/openpgp/packet/private_key.go \
1030         go/crypto/openpgp/packet/public_key.go \
1031         go/crypto/openpgp/packet/reader.go \
1032         go/crypto/openpgp/packet/signature.go \
1033         go/crypto/openpgp/packet/symmetric_key_encrypted.go \
1034         go/crypto/openpgp/packet/symmetrically_encrypted.go \
1035         go/crypto/openpgp/packet/userid.go
1036 go_crypto_openpgp_s2k_files = \
1037         go/crypto/openpgp/s2k/s2k.go
1038
1039 go_debug_dwarf_files = \
1040         go/debug/dwarf/buf.go \
1041         go/debug/dwarf/const.go \
1042         go/debug/dwarf/entry.go \
1043         go/debug/dwarf/open.go \
1044         go/debug/dwarf/type.go \
1045         go/debug/dwarf/unit.go
1046 go_debug_elf_files = \
1047         go/debug/elf/elf.go \
1048         go/debug/elf/file.go
1049 go_debug_gosym_files = \
1050         go/debug/gosym/pclntab.go \
1051         go/debug/gosym/symtab.go
1052 go_debug_macho_files = \
1053         go/debug/macho/file.go \
1054         go/debug/macho/macho.go
1055 go_debug_pe_files = \
1056         go/debug/pe/file.go \
1057         go/debug/pe/pe.go
1058
1059 go_debug_proc_files = \
1060         go/debug/proc/proc.go \
1061         go/debug/proc/proc_$(GOOS).go \
1062         $(GO_DEBUG_PROC_REGS_OS_ARCH_FILE)
1063
1064 go_encoding_ascii85_files = \
1065         go/encoding/ascii85/ascii85.go
1066 go_encoding_base32_files = \
1067         go/encoding/base32/base32.go
1068 go_encoding_base64_files = \
1069         go/encoding/base64/base64.go
1070 go_encoding_binary_files = \
1071         go/encoding/binary/binary.go
1072 go_encoding_git85_files = \
1073         go/encoding/git85/git.go
1074 go_encoding_hex_files = \
1075         go/encoding/hex/hex.go
1076 go_encoding_line_files = \
1077         go/encoding/line/line.go
1078 go_encoding_pem_files = \
1079         go/encoding/pem/pem.go
1080
1081 go_exp_datafmt_files = \
1082         go/exp/datafmt/datafmt.go \
1083         go/exp/datafmt/parser.go
1084 go_exp_draw_files = \
1085         go/exp/draw/draw.go \
1086         go/exp/draw/event.go
1087 go_exp_eval_files = \
1088         go/exp/eval/abort.go \
1089         go/exp/eval/bridge.go \
1090         go/exp/eval/compiler.go \
1091         go/exp/eval/expr.go \
1092         go/exp/eval/expr1.go \
1093         go/exp/eval/func.go \
1094         go/exp/eval/scope.go \
1095         go/exp/eval/stmt.go \
1096         go/exp/eval/type.go \
1097         go/exp/eval/typec.go \
1098         go/exp/eval/value.go \
1099         go/exp/eval/world.go
1100
1101 go_go_ast_files = \
1102         go/go/ast/ast.go \
1103         go/go/ast/filter.go \
1104         go/go/ast/print.go \
1105         go/go/ast/resolve.go \
1106         go/go/ast/scope.go \
1107         go/go/ast/walk.go
1108 go_go_doc_files = \
1109         go/go/doc/comment.go \
1110         go/go/doc/doc.go
1111 go_go_parser_files = \
1112         go/go/parser/interface.go \
1113         go/go/parser/parser.go
1114 go_go_printer_files = \
1115         go/go/printer/nodes.go \
1116         go/go/printer/printer.go
1117 go_go_scanner_files = \
1118         go/go/scanner/errors.go \
1119         go/go/scanner/scanner.go
1120 go_go_token_files = \
1121         go/go/token/position.go \
1122         go/go/token/token.go
1123 go_go_typechecker_files = \
1124         go/go/typechecker/scope.go \
1125         go/go/typechecker/type.go \
1126         go/go/typechecker/typechecker.go \
1127         go/go/typechecker/universe.go
1128
1129 go_hash_adler32_files = \
1130         go/hash/adler32/adler32.go
1131 go_hash_crc32_files = \
1132         go/hash/crc32/crc32.go
1133 go_hash_crc64_files = \
1134         go/hash/crc64/crc64.go
1135 go_hash_fnv_files = \
1136         go/hash/fnv/fnv.go
1137
1138 go_http_cgi_files = \
1139         go/http/cgi/child.go \
1140         go/http/cgi/host.go
1141 go_http_httptest_files = \
1142         go/http/httptest/recorder.go \
1143         go/http/httptest/server.go
1144 go_http_pprof_files = \
1145         go/http/pprof/pprof.go
1146
1147 go_image_jpeg_files = \
1148         go/image/jpeg/huffman.go \
1149         go/image/jpeg/idct.go \
1150         go/image/jpeg/reader.go
1151
1152 go_image_png_files = \
1153         go/image/png/reader.go \
1154         go/image/png/writer.go
1155
1156 go_index_suffixarray_files = \
1157         go/index/suffixarray/qsufsort.go \
1158         go/index/suffixarray/suffixarray.go
1159
1160 go_io_ioutil_files = \
1161         go/io/ioutil/ioutil.go \
1162         go/io/ioutil/tempfile.go
1163
1164 go_mime_multipart_files = \
1165         go/mime/multipart/multipart.go
1166
1167 go_net_dict_files = \
1168         go/net/dict/dict.go
1169
1170 go_net_textproto_files = \
1171         go/net/textproto/header.go \
1172         go/net/textproto/pipeline.go \
1173         go/net/textproto/reader.go \
1174         go/net/textproto/textproto.go \
1175         go/net/textproto/writer.go
1176
1177 go_os_inotify_files = \
1178         go/os/inotify/inotify_linux.go
1179
1180 go_os_signal_files = \
1181         go/os/signal/signal.go \
1182         unix.go
1183
1184 go_path_filepath_files = \
1185         go/path/filepath/match.go \
1186         go/path/filepath/path.go \
1187         go/path/filepath/path_unix.go
1188
1189 go_rpc_jsonrpc_files = \
1190         go/rpc/jsonrpc/client.go \
1191         go/rpc/jsonrpc/server.go
1192
1193 go_runtime_debug_files = \
1194         go/runtime/debug/stack.go
1195 go_runtime_pprof_files = \
1196         go/runtime/pprof/pprof.go
1197
1198 go_sync_atomic_files = \
1199         go/sync/atomic/doc.go
1200 go_sync_atomic_c_files = \
1201         go/sync/atomic/atomic.c
1202
1203 go_testing_iotest_files = \
1204         go/testing/iotest/logger.go \
1205         go/testing/iotest/reader.go \
1206         go/testing/iotest/writer.go
1207 go_testing_quick_files = \
1208         go/testing/quick/quick.go
1209 go_testing_script_files = \
1210         go/testing/script/script.go
1211
1212 # Define Syscall and Syscall6.
1213 if LIBGO_IS_RTEMS
1214 syscall_syscall_file = syscalls/syscall_stubs.go
1215 else
1216 syscall_syscall_file = syscalls/syscall.go
1217 endif
1218
1219 # Declare libc functions that vary for largefile systems.
1220 if LIBGO_IS_LINUX
1221 # Always use lseek64 on GNU/Linux.
1222 syscall_filesize_file = syscalls/sysfile_largefile.go
1223 syscall_stat_file = syscalls/sysfile_stat_largefile.go
1224 else # !LIBGO_IS_LINUX
1225 if LIBGO_IS_SOLARIS
1226 if LIBGO_IS_386
1227 # Use lseek64 on 32-bit Solaris/x86.
1228 syscall_filesize_file = syscalls/sysfile_largefile.go
1229 syscall_stat_file = syscalls/sysfile_stat_largefile.go
1230 else # !LIBGO_IS_386
1231 if LIBGO_IS_SPARC
1232 # Use lseek64 on 32-bit Solaris/SPARC.
1233 syscall_filesize_file = syscalls/sysfile_largefile.go
1234 syscall_stat_file = syscalls/sysfile_stat_largefile.go
1235 else # !LIBGO_IS_386 && !LIBGO_IS_SPARC
1236 # Use lseek on 64-bit Solaris.
1237 syscall_filesize_file = syscalls/sysfile_regfile.go
1238 syscall_stat_file = syscalls/sysfile_stat_regfile.go
1239 endif # !LIBGO_IS_386 && !LIBGO_IS_SPARC
1240 endif # !LIBGO_IS_SOLARIS
1241 else # !LIBGO_IS_LINUX && !LIBGO_IS_SOLARIS
1242 # Use lseek by default.
1243 syscall_filesize_file = syscalls/sysfile_regfile.go
1244 syscall_stat_file = syscalls/sysfile_stat_regfile.go
1245 endif # !LIBGO_IS_SOLARIS
1246 endif # !LIBGO_IS_LINUX
1247
1248
1249 # Define ForkExec, PtraceForkExec, Exec, and Wait4.
1250 if LIBGO_IS_RTEMS
1251 syscall_exec_os_file = syscalls/exec_stubs.go
1252 else
1253 syscall_exec_os_file = syscalls/exec.go
1254 endif
1255
1256 # Define Sleep.
1257 if LIBGO_IS_RTEMS
1258 syscall_sleep_file = syscalls/sleep_rtems.go
1259 else
1260 syscall_sleep_file = syscalls/sleep_select.go
1261 endif
1262
1263 # Define Errstr.
1264 if LIBGO_IS_RTEMS
1265 syscall_errstr_file = syscalls/errstr_rtems.go
1266 else
1267 syscall_errstr_file = syscalls/errstr.go
1268 endif
1269
1270 # Declare libc_strerror_r which is the Go name for strerror_r.
1271 if LIBGO_IS_RTEMS
1272 # RTEMS uses newlib in which strerror_r returns char *.
1273 syscall_errstr_decl_file = syscalls/errstr_decl_rtems.go
1274 else
1275 if LIBGO_IS_LINUX
1276 # In Linux the POSIX strerror_r is called __xpg_strerror_r.
1277 syscall_errstr_decl_file = syscalls/errstr_decl_linux.go
1278 else
1279 # On other systems we hope strerror_r is just strerror_r.
1280 syscall_errstr_decl_file = syscalls/errstr_decl.go
1281 endif
1282 endif
1283
1284 # Define socket sizes and types.
1285 if LIBGO_IS_LINUX
1286 syscall_socket_os_file = syscalls/socket_linux.go
1287 else
1288 if LIBGO_IS_SOLARIS
1289 syscall_socket_os_file = syscalls/socket_solaris.go
1290 else
1291 syscall_socket_os_file = syscalls/socket_bsd.go
1292 endif
1293 endif
1294
1295 # Support for epoll.
1296 if LIBGO_IS_LINUX
1297 syscall_socket_epoll_file = syscalls/socket_epoll.go
1298 else
1299 syscall_socket_epoll_file =
1300 endif
1301
1302 # Support for uname.
1303 if LIBGO_IS_SOLARIS
1304 if LIBGO_IS_386
1305 # 32-bit Solaris 2/x86 needs _nuname, handled in syscall_solaris_386.go.
1306 syscall_uname_file =
1307 else # !LIBGO_IS_386 && LIBGO_IS_SOLARIS
1308 syscall_uname_file = syscalls/syscall_uname.go
1309 endif
1310 else # !LIBGO_IS_SOLARIS
1311 syscall_uname_file = syscalls/syscall_uname.go
1312 endif
1313
1314 syscall_arch.go: s-syscall_arch; @true
1315 s-syscall_arch: Makefile
1316         rm -f syscall_arch.go.tmp
1317         echo "package syscall" > syscall_arch.go.tmp
1318         echo 'const ARCH = "'$(GOARCH)'"' >> syscall_arch.go.tmp
1319         echo 'const OS = "'$(GOOS)'"' >> syscall_arch.go.tmp
1320         $(SHELL) $(srcdir)/../move-if-change syscall_arch.go.tmp syscall_arch.go
1321         $(STAMP) $@
1322
1323 go_syscall_files = \
1324         $(syscall_errstr_file) \
1325         $(syscall_errstr_decl_file) \
1326         syscalls/exec_helpers.go \
1327         $(syscall_exec_os_file) \
1328         $(syscall_filesize_file) \
1329         $(syscall_stat_file) \
1330         $(syscall_sleep_file) \
1331         syscalls/socket.go \
1332         $(syscall_socket_os_file) \
1333         $(syscall_socket_epoll_file) \
1334         $(syscall_syscall_file) \
1335         $(syscall_uname_file) \
1336         syscalls/syscall_unix.go \
1337         syscalls/stringbyte.go \
1338         syscalls/syscall_$(GOOS).go \
1339         $(GO_SYSCALLS_SYSCALL_OS_ARCH_FILE) \
1340         syscalls/sysfile_posix.go \
1341         sysinfo.go \
1342         syscall_arch.go
1343 go_syscall_c_files = \
1344         syscalls/errno.c
1345
1346 if LIBGO_IS_LINUX
1347 # os_lib_inotify_lo = os/inotify.lo
1348 os_lib_inotify_lo =
1349 else
1350 os_lib_inotify_lo =
1351 endif
1352
1353 libgo_go_objs = \
1354         asn1/asn1.lo \
1355         big/big.lo \
1356         bufio/bufio.lo \
1357         bytes/bytes.lo \
1358         bytes/index.lo \
1359         cmath/cmath.lo \
1360         crypto/crypto.lo \
1361         ebnf/ebnf.lo \
1362         exec/exec.lo \
1363         expvar/expvar.lo \
1364         flag/flag.lo \
1365         fmt/fmt.lo \
1366         gob/gob.lo \
1367         hash/hash.lo \
1368         html/html.lo \
1369         http/http.lo \
1370         image/image.lo \
1371         io/io.lo \
1372         json/json.lo \
1373         log/log.lo \
1374         math/math.lo \
1375         mime/mime.lo \
1376         net/net.lo \
1377         netchan/netchan.lo \
1378         os/os.lo \
1379         patch/patch.lo \
1380         path/path.lo \
1381         rand/rand.lo \
1382         reflect/reflect.lo \
1383         regexp/regexp.lo \
1384         rpc/rpc.lo \
1385         runtime/runtime.lo \
1386         scanner/scanner.lo \
1387         smtp/smtp.lo \
1388         sort/sort.lo \
1389         strconv/strconv.lo \
1390         strings/strings.lo \
1391         sync/sync.lo \
1392         syslog/syslog.lo \
1393         syslog/syslog_c.lo \
1394         tabwriter/tabwriter.lo \
1395         template/template.lo \
1396         time/time.lo \
1397         try/try.lo \
1398         unicode/unicode.lo \
1399         utf16/utf16.lo \
1400         utf8/utf8.lo \
1401         websocket/websocket.lo \
1402         xml/xml.lo \
1403         archive/tar.lo \
1404         archive/zip.lo \
1405         compress/bzip2.lo \
1406         compress/flate.lo \
1407         compress/gzip.lo \
1408         compress/lzw.lo \
1409         compress/zlib.lo \
1410         container/heap.lo \
1411         container/list.lo \
1412         container/ring.lo \
1413         container/vector.lo \
1414         crypto/aes.lo \
1415         crypto/block.lo \
1416         crypto/blowfish.lo \
1417         crypto/cast5.lo \
1418         crypto/cipher.lo \
1419         crypto/dsa.lo \
1420         crypto/ecdsa.lo \
1421         crypto/elliptic.lo \
1422         crypto/hmac.lo \
1423         crypto/md4.lo \
1424         crypto/md5.lo \
1425         crypto/ocsp.lo \
1426         crypto/openpgp.lo \
1427         crypto/rand.lo \
1428         crypto/rc4.lo \
1429         crypto/ripemd160.lo \
1430         crypto/rsa.lo \
1431         crypto/sha1.lo \
1432         crypto/sha256.lo \
1433         crypto/sha512.lo \
1434         crypto/subtle.lo \
1435         crypto/tls.lo \
1436         crypto/twofish.lo \
1437         crypto/x509.lo \
1438         crypto/xtea.lo \
1439         crypto/openpgp/armor.lo \
1440         crypto/openpgp/error.lo \
1441         crypto/openpgp/packet.lo \
1442         crypto/openpgp/s2k.lo \
1443         debug/dwarf.lo \
1444         debug/elf.lo \
1445         debug/gosym.lo \
1446         debug/macho.lo \
1447         debug/pe.lo \
1448         debug/proc.lo \
1449         encoding/ascii85.lo \
1450         encoding/base32.lo \
1451         encoding/base64.lo \
1452         encoding/binary.lo \
1453         encoding/git85.lo \
1454         encoding/hex.lo \
1455         encoding/line.lo \
1456         encoding/pem.lo \
1457         exp/datafmt.lo \
1458         exp/draw.lo \
1459         exp/eval.lo \
1460         go/ast.lo \
1461         go/doc.lo \
1462         go/parser.lo \
1463         go/printer.lo \
1464         go/scanner.lo \
1465         go/token.lo \
1466         go/typechecker.lo \
1467         hash/adler32.lo \
1468         hash/crc32.lo \
1469         hash/crc64.lo \
1470         hash/fnv.lo \
1471         http/cgi.lo \
1472         http/httptest.lo \
1473         http/pprof.lo \
1474         image/jpeg.lo \
1475         image/png.lo \
1476         index/suffixarray.lo \
1477         io/ioutil.lo \
1478         mime/multipart.lo \
1479         net/dict.lo \
1480         net/textproto.lo \
1481         $(os_lib_inotify_lo) \
1482         os/signal.lo \
1483         path/filepath.lo \
1484         rpc/jsonrpc.lo \
1485         runtime/debug.lo \
1486         runtime/pprof.lo \
1487         sync/atomic.lo \
1488         sync/atomic_c.lo \
1489         syscalls/syscall.lo \
1490         syscalls/errno.lo \
1491         testing/testing.lo \
1492         testing/iotest.lo \
1493         testing/quick.lo \
1494         testing/script.lo
1495
1496 libgo_la_SOURCES = $(runtime_files)
1497
1498 libgo_la_LIBADD = \
1499         $(libgo_go_objs) $(LIBFFI) $(PTHREAD_LIBS) $(MATH_LIBS) $(NET_LIBS)
1500
1501 libgobegin_a_SOURCES = \
1502         runtime/go-main.c
1503
1504 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
1505
1506 GOCFLAGS = $(CFLAGS)
1507 AM_GOCFLAGS = $(STRINGOPS_FLAG)
1508 GOCOMPILE = $(GOC) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_GOCFLAGS) $(GOCFLAGS)
1509
1510 LTGOCOMPILE = $(LIBTOOL) --tag GO --mode=compile $(GOC) $(INCLUDES) \
1511         $(AM_GOCFLAGS) $(GOCFLAGS)
1512
1513 GOLINK = $(LIBTOOL) --tag GO --mode-link $(GOC) \
1514         $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_GOCFLAGS) $(LTLDFLAGS) -o $@
1515
1516 # Build the .go files for a package, generating a .lo file.
1517 BUILDPACKAGE = \
1518         $(MKDIR_P) $(@D); \
1519         files=`echo $^ | sed -e 's/[^ ]*\.gox//g'`; \
1520         $(LTGOCOMPILE) -I . -c -fgo-prefix="libgo_$(@D)" -o $@ $$files
1521
1522 if LIBGO_IS_RTEMS
1523 use_dejagnu = yes
1524 else
1525 use_dejagnu = no
1526 endif
1527
1528 GOTESTFLAGS =
1529
1530 # Check a package.
1531 CHECK = \
1532         @GC="$(GOC) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs -Wl,-R,`${PWD_COMMAND}`/.libs"; \
1533         export GC; \
1534         RUNTESTFLAGS="$(RUNTESTFLAGS)"; \
1535         export RUNTESTFLAGS; \
1536         MAKE="$(MAKE)"; \
1537         export MAKE; \
1538         rm -f $@-log; \
1539         prefix=`if test "$(@D)" = "regexp"; then echo regexp-test; else dirname $(@D); fi`; \
1540         test "$${prefix}" != "." || prefix="$(@D)"; \
1541         if test "$(use_dejagnu)" = "yes"; then \
1542           $(SHELL) $(srcdir)/testsuite/gotest --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" $(GOTESTFLAGS); \
1543         else \
1544           if $(SHELL) $(srcdir)/testsuite/gotest --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --prefix="libgo_$${prefix}" --pkgfiles="$(go_$(subst /,_,$(@D))_files)" $(GOTESTFLAGS) >>$@-log 2>&1; then \
1545             echo "PASS: $(@D)"; \
1546           else \
1547             echo "FAIL: $(@D)"; \
1548             cat $@-log; \
1549             exit 1; \
1550           fi; \
1551         fi
1552
1553 # Build all packages before checking any.
1554 CHECK_DEPS = libgo.la libgobegin.a \
1555         $(toolexeclib_DATA) \
1556         $(toolexeclibarchive_DATA) \
1557         $(toolexeclibcompress_DATA) \
1558         $(toolexeclibcontainer_DATA) \
1559         $(toolexeclibcrypto_DATA) \
1560         $(toolexeclibdebug_DATA) \
1561         $(toolexeclibencoding_DATA) \
1562         $(toolexeclibexp_DATA) \
1563         $(toolexeclibgo_DATA) \
1564         $(toolexeclibhash_DATA) \
1565         $(toolexeclibhttp_DATA) \
1566         $(toolexeclibimage_DATA) \
1567         $(toolexeclibio_DATA) \
1568         $(toolexeclibos_DATA) \
1569         $(toolexeclibrpc_DATA) \
1570         $(toolexeclibruntime_DATA) \
1571         $(toolexeclibtesting_DATA)
1572
1573 asn1/asn1.lo: $(go_asn1_files) bytes.gox fmt.gox io.gox os.gox reflect.gox \
1574                 strconv.gox strings.gox time.gox
1575         $(BUILDPACKAGE)
1576 asn1/check: $(CHECK_DEPS)
1577         $(CHECK)
1578 .PHONY: asn1/check
1579
1580 big/big.lo: $(go_big_files) fmt.gox rand.gox strings.gox os.gox
1581         $(BUILDPACKAGE)
1582 big/check: $(CHECK_DEPS)
1583         $(CHECK)
1584 .PHONY: big/check
1585
1586 bufio/bufio.lo: $(go_bufio_files) bytes.gox io.gox os.gox strconv.gox utf8.gox
1587         $(BUILDPACKAGE)
1588 bufio/check: $(CHECK_DEPS)
1589         $(CHECK)
1590 .PHONY: bufio/check
1591
1592 bytes/bytes.lo: $(go_bytes_files) io.gox os.gox unicode.gox utf8.gox
1593         $(BUILDPACKAGE)
1594 bytes/index.lo: $(go_bytes_c_files) bytes/bytes.lo
1595         $(LTCOMPILE) -c -o bytes/index.lo $(srcdir)/go/bytes/indexbyte.c
1596 bytes/check: $(CHECK_DEPS)
1597         $(CHECK)
1598 .PHONY: bytes/check
1599
1600 cmath/cmath.lo: $(go_cmath_files) math.gox
1601         $(BUILDPACKAGE)
1602 cmath/check: $(CHECK_DEPS)
1603         $(CHECK)
1604 .PHONY: cmath/check
1605
1606 crypto/crypto.lo: $(go_crypto_files) hash.gox
1607         $(BUILDPACKAGE)
1608 crypto/check: $(CHECK_DEPS)
1609         $(CHECK)
1610 .PHONY: crypto/check
1611
1612 ebnf/ebnf.lo: $(go_ebnf_files) container/vector.gox go/scanner.gox \
1613                 go/token.gox os.gox strconv.gox unicode.gox utf8.gox
1614         $(BUILDPACKAGE)
1615 ebnf/check: $(CHECK_DEPS)
1616         $(CHECK)
1617 .PHONY: ebnf/check
1618
1619 exec/exec.lo: $(go_exec_files) os.gox strconv.gox strings.gox
1620         $(BUILDPACKAGE)
1621 exec/check: $(CHECK_DEPS)
1622         $(CHECK)
1623 .PHONY: exec/check
1624
1625 expvar/expvar.lo: $(go_expvar_files) bytes.gox fmt.gox http.gox json.gox \
1626                 log.gox os.gox runtime.gox strconv.gox sync.gox
1627         $(BUILDPACKAGE)
1628 expvar/check: $(CHECK_DEPS)
1629         $(CHECK)
1630 .PHONY: expvar/check
1631
1632 flag/flag.lo: $(go_flag_files) fmt.gox os.gox strconv.gox
1633         $(BUILDPACKAGE)
1634 flag/check: $(CHECK_DEPS)
1635         $(CHECK)
1636 .PHONY: flag/check
1637
1638 fmt/fmt.lo: $(go_fmt_files) bytes.gox io.gox math.gox os.gox reflect.gox \
1639                 strconv.gox strings.gox unicode.gox utf8.gox
1640         $(BUILDPACKAGE)
1641 fmt/check: $(CHECK_DEPS)
1642         $(CHECK)
1643 .PHONY: fmt/check
1644
1645 gob/gob.lo: $(go_gob_files) bufio.gox bytes.gox fmt.gox io.gox math.gox \
1646                 os.gox reflect.gox runtime.gox strings.gox sync.gox \
1647                 unicode.gox utf8.gox
1648         $(BUILDPACKAGE)
1649 gob/check: $(CHECK_DEPS)
1650         $(CHECK)
1651 .PHONY: gob/check
1652
1653 hash/hash.lo: $(go_hash_files) io.gox
1654         $(BUILDPACKAGE)
1655 hash/check: $(CHECK_DEPS)
1656         $(CHECK)
1657 .PHONY: hash/check
1658
1659 html/html.lo: $(go_html_files) bytes.gox io.gox os.gox strconv.gox strings.gox \
1660                 utf8.gox
1661         $(BUILDPACKAGE)
1662 html/check: $(CHECK_DEPS)
1663         $(CHECK)
1664 .PHONY: html/check
1665
1666 http/http.lo: $(go_http_files) bufio.gox bytes.gox container/vector.gox \
1667                 crypto/rand.gox crypto/tls.gox encoding/base64.gox fmt.gox \
1668                 io.gox io/ioutil.gox log.gox mime.gox mime/multipart.gox \
1669                 net.gox net/textproto.gox os.gox path.gox path/filepath.gox \
1670                 sort.gox strconv.gox strings.gox sync.gox time.gox utf8.gox
1671         $(BUILDPACKAGE)
1672 http/check: $(CHECK_DEPS)
1673         $(CHECK)
1674 .PHONY: http/check
1675
1676 image/image.lo: $(go_image_files) bufio.gox io.gox os.gox strconv.gox
1677         $(BUILDPACKAGE)
1678 image/check: $(CHECK_DEPS)
1679         $(CHECK)
1680 .PHONY: image/check
1681
1682 io/io.lo: $(go_io_files) os.gox sync.gox
1683         $(BUILDPACKAGE)
1684 io/check: $(CHECK_DEPS)
1685         $(CHECK)
1686 .PHONY: io/check
1687
1688 json/json.lo: $(go_json_files) bytes.gox container/vector.gox \
1689                 encoding/base64.gox fmt.gox io.gox math.gox os.gox \
1690                 reflect.gox runtime.gox strconv.gox strings.gox unicode.gox \
1691                 utf16.gox utf8.gox
1692         $(BUILDPACKAGE)
1693 json/check: $(CHECK_DEPS)
1694         $(CHECK)
1695 .PHONY: json/check
1696
1697 log/log.lo: $(go_log_files) bytes.gox fmt.gox io.gox runtime.gox os.gox \
1698                 sync.gox time.gox
1699         $(BUILDPACKAGE)
1700 log/check: $(CHECK_DEPS)
1701         $(CHECK)
1702 .PHONY: log/check
1703
1704 math/math.lo: $(go_math_files)
1705         $(BUILDPACKAGE)
1706 math/check: $(CHECK_DEPS)
1707         $(CHECK)
1708 .PHONY: math/check
1709
1710 mime/mime.lo: $(go_mime_files) bufio.gox bytes.gox os.gox strings.gox \
1711                 sync.gox unicode.gox
1712         $(BUILDPACKAGE)
1713 mime/check: $(CHECK_DEPS)
1714         $(CHECK)
1715 .PHONY: mime/check
1716
1717 net/net.lo: $(go_net_files) bytes.gox fmt.gox io.gox os.gox rand.gox \
1718                 reflect.gox strconv.gox strings.gox sync.gox syscall.gox \
1719                 time.gox
1720         $(BUILDPACKAGE)
1721 net/check: $(CHECK_DEPS)
1722         $(CHECK)
1723 .PHONY: net/check
1724
1725 netchan/netchan.lo: $(go_netchan_files) gob.gox io.gox log.gox net.gox os.gox \
1726                 reflect.gox strconv.gox sync.gox time.gox
1727         $(BUILDPACKAGE)
1728 netchan/check: $(CHECK_DEPS)
1729         $(CHECK)
1730 .PHONY: netchan/check
1731
1732 os/os.lo: $(go_os_files) runtime.gox sync.gox syscall.gox
1733         $(BUILDPACKAGE)
1734 os/check: $(CHECK_DEPS)
1735         $(CHECK)
1736 .PHONY: os/check
1737
1738 patch/patch.lo: $(go_patch_files) bytes.gox compress/zlib.gox \
1739                 crypto/sha1.gox encoding/git85.gox fmt.gox io.gox os.gox \
1740                 path.gox strings.gox
1741         $(BUILDPACKAGE)
1742 patch/check: $(CHECK_DEPS)
1743         $(CHECK)
1744 .PHONY: patch/check
1745
1746 path/path.lo: $(go_path_files) os.gox strings.gox utf8.gox
1747         $(BUILDPACKAGE)
1748 path/check: $(CHECK_DEPS)
1749         $(CHECK)
1750 .PHONY: path/check
1751
1752 rand/rand.lo: $(go_rand_files) math.gox sync.gox
1753         $(BUILDPACKAGE)
1754 rand/check: $(CHECK_DEPS)
1755         $(CHECK)
1756 .PHONY: rand/check
1757
1758 reflect/reflect.lo: $(go_reflect_files) math.gox runtime.gox strconv.gox \
1759                 sync.gox
1760         $(BUILDPACKAGE)
1761 reflect/check: $(CHECK_DEPS)
1762         $(CHECK)
1763 .PHONY: reflect/check
1764
1765 regexp/regexp.lo: $(go_regexp_files) bytes.gox io.gox os.gox strings.gox \
1766                 utf8.gox
1767         $(BUILDPACKAGE)
1768 regexp/check: $(CHECK_DEPS)
1769         $(CHECK)
1770 .PHONY: regexp/check
1771
1772 rpc/rpc.lo: $(go_rpc_files) bufio.gox fmt.gox gob.gox http.gox io.gox log.gox \
1773                 net.gox os.gox reflect.gox sort.gox strings.gox strconv.gox \
1774                 sync.gox template.gox unicode.gox utf8.gox
1775         $(BUILDPACKAGE)
1776 rpc/check: $(CHECK_DEPS)
1777         $(CHECK)
1778 .PHONY: rpc/check
1779
1780 runtime/runtime.lo: $(go_runtime_files)
1781         $(BUILDPACKAGE)
1782 runtime/check: $(CHECK_DEPS)
1783         $(CHECK)
1784 .PHONY: runtime/check
1785
1786 scanner/scanner.lo: $(go_scanner_files) bytes.gox fmt.gox io.gox os.gox \
1787                 unicode.gox utf8.gox
1788         $(BUILDPACKAGE)
1789 scanner/check: $(CHECK_DEPS)
1790         $(CHECK)
1791 .PHONY: scanner/check
1792
1793 smtp/smtp.lo: $(go_smtp_files) crypto/tls.gox encoding/base64.gox io.gox \
1794                 net.gox net/textproto.gox os.gox strings.gox
1795         $(BUILDPACKAGE)
1796 smtp/check: $(CHECK_DEPS)
1797         $(CHECK)
1798 .PHONY: smtp/check
1799
1800 sort/sort.lo: $(go_sort_files)
1801         $(BUILDPACKAGE)
1802 sort/check: $(CHECK_DEPS)
1803         $(CHECK)
1804 .PHONY: sort/check
1805
1806 strconv/strconv.lo: $(go_strconv_files) bytes.gox math.gox os.gox strings.gox \
1807                 unicode.gox utf8.gox
1808         $(BUILDPACKAGE)
1809 strconv/check: $(CHECK_DEPS)
1810         $(CHECK)
1811 .PHONY: strconv/check
1812
1813 strings/strings.lo: $(go_strings_files) os.gox unicode.gox utf8.gox
1814         $(BUILDPACKAGE)
1815 strings/check: $(CHECK_DEPS)
1816         $(CHECK)
1817 .PHONY: strings/check
1818
1819 sync/sync.lo: $(go_sync_files) runtime.gox sync/atomic.gox
1820         $(BUILDPACKAGE)
1821 sync/check: $(CHECK_DEPS)
1822         $(CHECK)
1823 .PHONY: sync/check
1824
1825 syslog/syslog.lo: $(go_syslog_files) fmt.gox log.gox net.gox os.gox syscall.gox
1826         $(BUILDPACKAGE)
1827 syslog/syslog_c.lo: $(go_syslog_c_files) syslog/syslog.lo
1828         $(LTCOMPILE) -c -o $@ $(srcdir)/go/syslog/syslog_c.c
1829 syslog/check: $(CHECK_DEPS)
1830         $(CHECK)
1831 .PHONY: syslog/check
1832
1833 tabwriter/tabwriter.lo: $(go_tabwriter_files) bytes.gox io.gox os.gox utf8.gox
1834         $(BUILDPACKAGE)
1835 tabwriter/check: $(CHECK_DEPS)
1836         $(CHECK)
1837 .PHONY: tabwriter/check
1838
1839 template/template.lo: $(go_template_files) bytes.gox fmt.gox io.gox os.gox \
1840                 reflect.gox runtime.gox strings.gox container/vector.gox
1841         $(BUILDPACKAGE)
1842 template/check: $(CHECK_DEPS)
1843         $(CHECK)
1844 .PHONY: template/check
1845
1846 testing/testing.lo: $(go_testing_files) flag.gox fmt.gox os.gox regexp.gox \
1847                 runtime.gox runtime/pprof.gox time.gox
1848         $(BUILDPACKAGE)
1849 testing/check: $(CHECK_DEPS)
1850         $(CHECK)
1851 .PHONY: testing/check
1852
1853 time/time.lo: $(go_time_files) bytes.gox container/heap.gox io/ioutil.gox \
1854                 os.gox strconv.gox sync.gox syscall.gox
1855         $(BUILDPACKAGE)
1856 time/check: $(CHECK_DEPS)
1857         $(CHECK)
1858 .PHONY: time/check
1859
1860 try/try.lo: $(go_try_files) fmt.gox io.gox os.gox reflect.gox unicode.gox
1861         $(BUILDPACKAGE)
1862 try/check: $(CHECK_DEPS)
1863         $(CHECK)
1864 .PHONY: try/check
1865
1866 unicode/unicode.lo: $(go_unicode_files)
1867         $(BUILDPACKAGE)
1868 unicode/check: $(CHECK_DEPS)
1869         $(CHECK)
1870 .PHONY: unicode/check
1871
1872 utf16/utf16.lo: $(go_utf16_files) unicode.gox
1873         $(BUILDPACKAGE)
1874 utf16/check: $(CHECK_DEPS)
1875         $(CHECK)
1876 .PHONY: utf16/check
1877
1878 utf8/utf8.lo: $(go_utf8_files) unicode.gox
1879         $(BUILDPACKAGE)
1880 utf8/check: $(CHECK_DEPS)
1881         $(CHECK)
1882 .PHONY: utf8/check
1883
1884 websocket/websocket.lo: $(go_websocket_files) bufio.gox bytes.gox \
1885                 container/vector.gox crypto/md5.gox crypto/tls.gox \
1886                 encoding/binary.gox fmt.gox http.gox io.gox net.gox os.gox \
1887                 rand.gox strings.gox
1888         $(BUILDPACKAGE)
1889 websocket/check: $(CHECK_DEPS)
1890         $(CHECK)
1891 .PHONY: websocket/check
1892
1893 xml/xml.lo: $(go_xml_files) bufio.gox bytes.gox fmt.gox io.gox os.gox \
1894                 reflect.gox strconv.gox strings.gox unicode.gox utf8.gox
1895         $(BUILDPACKAGE)
1896 xml/check: $(CHECK_DEPS)
1897         $(CHECK)
1898 .PHONY: xml/check
1899
1900 archive/tar.lo: $(go_archive_tar_files) bytes.gox io.gox os.gox strconv.gox \
1901                 strings.gox
1902         $(BUILDPACKAGE)
1903 archive/tar/check: $(CHECK_DEPS)
1904         @$(MKDIR_P) archive/tar
1905         $(CHECK)
1906 .PHONY: archive/tar/check
1907
1908 archive/zip.lo: $(go_archive_zip_files) bufio.gox bytes.gox \
1909                 compress/flate.gox hash.gox hash/crc32.gox \
1910                 encoding/binary.gox io.gox io/ioutil.gox os.gox
1911         $(BUILDPACKAGE)
1912 archive/zip/check: $(CHECK_DEPS)
1913         @$(MKDIR_P) archive/zip
1914         $(CHECK)
1915 .PHONY: archive/zip/check
1916
1917 compress/bzip2.lo: $(go_compress_bzip2_files) bufio.gox io.gox os.gox sort.gox
1918         $(BUILDPACKAGE)
1919 compress/bzip2/check: $(CHECK_DEPS)
1920         @$(MKDIR_P) compress/bzip2
1921         $(CHECK)
1922 .PHONY: compress/bzip2/check
1923
1924 compress/flate.lo: $(go_compress_flate_files) bufio.gox io.gox math.gox \
1925                 os.gox sort.gox strconv.gox
1926         $(BUILDPACKAGE)
1927 compress/flate/check: $(CHECK_DEPS)
1928         @$(MKDIR_P) compress/flate
1929         $(CHECK)
1930 .PHONY: compress/flate/check
1931
1932 compress/gzip.lo: $(go_compress_gzip_files) bufio.gox compress/flate.gox \
1933                 hash.gox hash/crc32.gox io.gox os.gox
1934         $(BUILDPACKAGE)
1935 compress/gzip/check: $(CHECK_DEPS)
1936         @$(MKDIR_P) compress/gzip
1937         $(CHECK)
1938 .PHONY: compress/gzip/check
1939
1940 compress/lzw.lo: $(go_compress_lzw_files) bufio.gox fmt.gox io.gox os.gox
1941         $(BUILDPACKAGE)
1942 compress/lzw/check: $(CHECK_DEPS)
1943         @$(MKDIR_P) compress/lzw
1944         $(CHECK)
1945 .PHONY: compress/lzw/check
1946
1947 compress/zlib.lo: $(go_compress_zlib_files) bufio.gox compress/flate.gox \
1948                 hash.gox hash/adler32.gox io.gox os.gox
1949         $(BUILDPACKAGE)
1950 compress/zlib/check: $(CHECK_DEPS)
1951         @$(MKDIR_P) compress/zlib
1952         $(CHECK)
1953 .PHONY: compress/zlib/check
1954
1955 container/heap.lo: $(go_container_heap_files) sort.gox
1956         $(BUILDPACKAGE)
1957 container/heap/check: $(CHECK_DEPS)
1958         @$(MKDIR_P) container/heap
1959         $(CHECK)
1960 .PHONY: container/heap/check
1961
1962 container/list.lo: $(go_container_list_files)
1963         $(BUILDPACKAGE)
1964 container/list/check: $(CHECK_DEPS)
1965         @$(MKDIR_P) container/list
1966         $(CHECK)
1967 .PHONY: container/list/check
1968
1969 container/ring.lo: $(go_container_ring_files)
1970         $(BUILDPACKAGE)
1971 container/ring/check: $(CHECK_DEPS)
1972         @$(MKDIR_P) container/ring
1973         $(CHECK)
1974 .PHONY: container/ring/check
1975
1976 container/vector.lo: $(go_container_vector_files)
1977         $(BUILDPACKAGE)
1978 container/vector/check: $(CHECK_DEPS)
1979         @$(MKDIR_P) container/vector
1980         $(CHECK)
1981 .PHONY: container/vector/check
1982
1983 crypto/aes.lo: $(go_crypto_aes_files) os.gox strconv.gox
1984         $(BUILDPACKAGE)
1985 crypto/aes/check: $(CHECK_DEPS)
1986         @$(MKDIR_P) crypto/aes
1987         $(CHECK)
1988 .PHONY: crypto/aes/check
1989
1990 crypto/block.lo: $(go_crypto_block_files) fmt.gox io.gox os.gox strconv.gox
1991         $(BUILDPACKAGE)
1992 crypto/block/check: $(CHECK_DEPS)
1993         @$(MKDIR_P) crypto/block
1994         $(CHECK)
1995 .PHONY: crypto/block/check
1996
1997 crypto/blowfish.lo: $(go_crypto_blowfish_files) os.gox strconv.gox
1998         $(BUILDPACKAGE)
1999 crypto/blowfish/check: $(CHECK_DEPS)
2000         @$(MKDIR_P) crypto/blowfish
2001         $(CHECK)
2002 .PHONY: crypto/blowfish/check
2003
2004 crypto/cast5.lo: $(go_crypto_cast5_files) os.gox
2005         $(BUILDPACKAGE)
2006 crypt/cast5/check: $(CHECK_DEPS)
2007         @$(MKDIR_P) crypto/cast5
2008         $(CHECK)
2009 .PHONY: crypto/cast5/check
2010
2011 crypto/cipher.lo: $(go_crypto_cipher_files) io.gox os.gox
2012         $(BUILDPACKAGE)
2013 crypto/cipher/check: $(CHECK_DEPS)
2014         @$(MKDIR_P) crypto/cipher
2015         $(CHECK)
2016 .PHONY: crypto/cipher/check
2017
2018 crypto/dsa.lo: $(go_crypto_dsa_files) big.gox io.gox os.gox
2019         $(BUILDPACKAGE)
2020 crypto/dsa/check: $(CHECK_DEPS)
2021         @$(MKDIR_P) crypto/dsa
2022         $(CHECK)
2023 .PHONY: crypto/dsa/check
2024
2025 crypto/ecdsa.lo: $(go_crypto_ecdsa_files) big.gox crypto/elliptic.gox io.gox \
2026                 os.gox
2027         $(BUILDPACKAGE)
2028 crypto/ecdsa/check: $(CHECK_DEPS)
2029         @$(MKDIR_P) crypto/ecdsa
2030         $(CHECK)
2031 .PHONY: crypto/ecdsa/check
2032
2033 crypto/elliptic.lo: $(go_crypto_elliptic_files) big.gox io.gox os.gox sync.gox
2034         $(BUILDPACKAGE)
2035 crypto/elliptic/check: $(CHECK_DEPS)
2036         @$(MKDIR_P) crypto/elliptic
2037         $(CHECK)
2038 .PHONY: crypto/elliptic/check
2039
2040 crypto/hmac.lo: $(go_crypto_hmac_files) crypto/md5.gox crypto/sha1.gox \
2041                 crypto/sha256.gox hash.gox os.gox
2042         $(BUILDPACKAGE)
2043 crypto/hmac/check: $(CHECK_DEPS)
2044         @$(MKDIR_P) crypto/hmac
2045         $(CHECK)
2046 .PHONY: crypto/hmac/check
2047
2048 crypto/md4.lo: $(go_crypto_md4_files) crypto.gox hash.gox os.gox
2049         $(BUILDPACKAGE)
2050 crypto/md4/check: $(CHECK_DEPS)
2051         @$(MKDIR_P) crypto/md4
2052         $(CHECK)
2053 .PHONY: crypto/md4/check
2054
2055 crypto/md5.lo: $(go_crypto_md5_files) crypto.gox hash.gox os.gox
2056         $(BUILDPACKAGE)
2057 crypto/md5/check: $(CHECK_DEPS)
2058         @$(MKDIR_P) crypto/md5
2059         $(CHECK)
2060 .PHONY: crypto/md5/check
2061
2062 crypto/ocsp.lo: $(go_crypto_ocsp_files) asn1.gox crypto.gox crypto/rsa.gox \
2063                 crypto/sha1.gox crypto/x509.gox os.gox time.gox
2064         $(BUILDPACKAGE)
2065 crypto/ocsp/check: $(CHECK_DEPS)
2066         @$(MKDIR_P) crypto/ocsp
2067         $(CHECK)
2068 .PHONY: crypto/ocsp/check
2069
2070 crypto/openpgp.lo: $(go_crypto_openpgp_files) crypto.gox crypto/dsa.gox \
2071                 crypto/openpgp/armor.gox crypto/openpgp/error.gox \
2072                 crypto/openpgp/packet.gox crypto/rsa.gox crypto/sha256.gox \
2073                 hash.gox io.gox os.gox strconv.gox time.gox
2074         $(BUILDPACKAGE)
2075 crypto/openpgp/check: $(CHECK_DEPS)
2076         @$(MKDIR_P) crypto/openpgp
2077         $(CHECK)
2078 .PHONY: crypto/openpgp/check
2079
2080 crypto/rand.lo: $(go_crypto_rand_files) bufio.gox crypto/aes.gox io.gox \
2081                 os.gox sync.gox time.gox
2082         $(BUILDPACKAGE)
2083 crypto/rand/check: $(CHECK_DEPS)
2084         @$(MKDIR_P) crypto/rand
2085         $(CHECK)
2086 .PHONY: crypto/rand/check
2087
2088 crypto/rc4.lo: $(go_crypto_rc4_files) os.gox strconv.gox
2089         $(BUILDPACKAGE)
2090 crypto/rc4/check: $(CHECK_DEPS)
2091         @$(MKDIR_P) crypto/rc4
2092         $(CHECK)
2093 .PHONY: crypto/rc4/check
2094
2095 crypto/ripemd160.lo: $(go_crypto_ripemd160_files) crypto.gox hash.gox os.gox
2096         $(BUILDPACKAGE)
2097 crypto/ripemd160/check: $(CHECK_DEPS)
2098         @$(MKDIR_P) crypto/ripemd160
2099         $(CHECK)
2100 .PHONY: crypto/ripemd160/check
2101
2102 crypto/rsa.lo: $(go_crypto_rsa_files) big.gox crypto.gox crypto/sha1.gox \
2103                 crypto/subtle.gox encoding/hex.gox hash.gox io.gox os.gox
2104         $(BUILDPACKAGE)
2105 crypto/rsa/check: $(CHECK_DEPS)
2106         @$(MKDIR_P) crypto/rsa
2107         $(CHECK)
2108 .PHONY: crypto/rsa/check
2109
2110 crypto/sha1.lo: $(go_crypto_sha1_files) crypto.gox hash.gox os.gox
2111         $(BUILDPACKAGE)
2112 crypto/sha1/check: $(CHECK_DEPS)
2113         @$(MKDIR_P) crypto/sha1
2114         $(CHECK)
2115 .PHONY: crypto/sha1/check
2116
2117 crypto/sha256.lo: $(go_crypto_sha256_files) crypto.gox hash.gox os.gox
2118         $(BUILDPACKAGE)
2119 crypto/sha256/check: $(CHECK_DEPS)
2120         @$(MKDIR_P) crypto/sha256
2121         $(CHECK)
2122 .PHONY: crypto/sha256/check
2123
2124 crypto/sha512.lo: $(go_crypto_sha512_files) crypto.gox hash.gox os.gox
2125         $(BUILDPACKAGE)
2126 crypto/sha512/check: $(CHECK_DEPS)
2127         @$(MKDIR_P) crypto/sha512
2128         $(CHECK)
2129 .PHONY: crypto/sha512/check
2130
2131 crypto/subtle.lo: $(go_crypto_subtle_files)
2132         $(BUILDPACKAGE)
2133 crypto/subtle/check: $(CHECK_DEPS)
2134         @$(MKDIR_P) crypto/subtle
2135         $(CHECK)
2136 .PHONY: crypto/subtle/check
2137
2138 crypto/tls.lo: $(go_crypto_tls_files) big.gox bufio.gox bytes.gox \
2139                 container/list.gox crypto.gox crypto/aes.gox crypto/cipher.gox \
2140                 crypto/elliptic.gox crypto/hmac.gox crypto/md5.gox \
2141                 crypto/rc4.gox crypto/rand.gox crypto/rsa.gox crypto/sha1.gox \
2142                 crypto/subtle.gox crypto/rsa.gox crypto/sha1.gox \
2143                 crypto/x509.gox encoding/pem.gox fmt.gox hash.gox io.gox \
2144                 io/ioutil.gox net.gox os.gox strings.gox sync.gox time.gox
2145         $(BUILDPACKAGE)
2146 crypto/tls/check: $(CHECK_DEPS)
2147         @$(MKDIR_P) crypto/tls
2148         $(CHECK)
2149 .PHONY: crypto/tls/check
2150
2151 crypto/twofish.lo: $(go_crypto_twofish_files) os.gox strconv.gox
2152         $(BUILDPACKAGE)
2153 crypto/twofish/check: $(CHECK_DEPS)
2154         @$(MKDIR_P) crypto/twofish
2155         $(CHECK)
2156 .PHONY: crypto/twofish/check
2157
2158 crypto/x509.lo: $(go_crypto_x509_files) asn1.gox big.gox container/vector.gox \
2159                 crypto.gox crypto/rsa.gox crypto/sha1.gox hash.gox os.gox \
2160                 strings.gox time.gox
2161         $(BUILDPACKAGE)
2162 crypto/x509/check: $(CHECK_DEPS)
2163         @$(MKDIR_P) crypto/x509
2164         $(CHECK)
2165 .PHONY: crypto/x509/check
2166
2167 crypto/xtea.lo: $(go_crypto_xtea_files) os.gox strconv.gox
2168         $(BUILDPACKAGE)
2169 crypto/xtea/check: $(CHECK_DEPS)
2170         @$(MKDIR_P) crypto/xtea
2171         $(CHECK)
2172 .PHONY: crypto/xtea/check
2173
2174 crypto/openpgp/armor.lo: $(go_crypto_openpgp_armor_files) bytes.gox \
2175                 crypto/openpgp/error.gox encoding/base64.gox \
2176                 encoding/line.gox io.gox os.gox
2177         $(BUILDPACKAGE)
2178 crypto/openpgp/armor/check: $(CHECK_DEPS)
2179         @$(MKDIR_P) crypto/openpgp/armor
2180         $(CHECK)
2181 .PHONY: crypto/openpgp/armor/check
2182
2183 crypto/openpgp/error.lo: $(go_crypto_openpgp_error_files) strconv.gox
2184         $(BUILDPACKAGE)
2185 crypto/openpgp/error/check: $(CHECK_DEPS)
2186         @$(MKDIR_P) crypto/openpgp/error
2187         $(CHECK)
2188 .PHONY: crypto/openpgp/error/check
2189
2190 crypto/openpgp/packet.lo: $(go_crypto_openpgp_packet_files) big.gox bytes.gox \
2191                 compress/flate.gox compress/zlib.gox crypto.gox \
2192                 crypto/aes.gox crypto/cast5.gox crypto/cipher.gox \
2193                 crypto/dsa.gox crypto/openpgp/error.gox \
2194                 crypto/openpgp/s2k.gox crypto/rand.gox crypto/rsa.gox \
2195                 crypto/sha1.gox crypto/subtle.gox encoding/binary.gox fmt.gox \
2196                 hash.gox io.gox io/ioutil.gox os.gox strconv.gox strings.gox
2197         $(BUILDPACKAGE)
2198 crypto/openpgp/packet/check: $(CHECK_DEPS)
2199         @$(MKDIR_P) crypto/openpgp/packet
2200         $(CHECK)
2201 .PHONY: crypto/openpgp/packet/check
2202
2203 crypto/openpgp/s2k.lo: $(go_crypto_openpgp_s2k_files) crypto.gox \
2204                 crypto/md5.gox crypto/openpgp/error.gox crypto/ripemd160.gox \
2205                 crypto/sha1.gox crypto/sha256.gox crypto/sha512.gox hash.gox \
2206                 io.gox os.gox
2207         $(BUILDPACKAGE)
2208 crypto/openpgp/s2k/check: $(CHECK_DEPS)
2209         @$(MKDIR_P) crypto/openpgp/s2k
2210         $(CHECK)
2211 .PHONY: crypto/openpgp/s2k/check
2212
2213 debug/dwarf.lo: $(go_debug_dwarf_files) encoding/binary.gox os.gox strconv.gox
2214         $(BUILDPACKAGE)
2215 debug/dwarf/check: $(CHECK_DEPS)
2216         @$(MKDIR_P) debug/dwarf
2217         $(CHECK)
2218 .PHONY: debug/dwarf/check
2219
2220 debug/elf.lo: $(go_debug_elf_files) bytes.gox debug/dwarf.gox \
2221                 encoding/binary.gox fmt.gox io.gox os.gox strconv.gox
2222         $(BUILDPACKAGE)
2223 debug/elf/check: $(CHECK_DEPS)
2224         @$(MKDIR_P) debug/elf
2225         $(CHECK)
2226 .PHONY: debug/elf/check
2227
2228 debug/gosym.lo: $(go_debug_gosym_files) encoding/binary.gox fmt.gox os.gox \
2229                 strconv.gox strings.gox
2230         $(BUILDPACKAGE)
2231 debug/gosym/check: $(CHECK_DEPS)
2232         @$(MKDIR_P) debug/gosym
2233         $(CHECK)
2234 .PHONY: debug/gosym/check
2235
2236 debug/macho.lo: $(go_debug_macho_files) bytes.gox debug/dwarf.gox \
2237                 encoding/binary.gox fmt.gox io.gox os.gox strconv.gox
2238         $(BUILDPACKAGE)
2239 debug/macho/check: $(CHECK_DEPS)
2240         @$(MKDIR_P) debug/macho
2241         $(CHECK)
2242 .PHONY: debug/macho/check
2243
2244 debug/pe.lo: $(go_debug_pe_files) debug/dwarf.gox \
2245                 encoding/binary.gox fmt.gox io.gox os.gox strconv.gox
2246         $(BUILDPACKAGE)
2247 debug/pe/check: $(CHECK_DEPS)
2248         @$(MKDIR_P) debug/pe
2249         $(CHECK)
2250 .PHONY: debug/pe/check
2251
2252 debug/proc.lo: $(go_debug_proc_files) container/vector.gox fmt.gox \
2253                 io/ioutil.gox os.gox runtime.gox strconv.gox strings.gox \
2254                 sync.gox syscall.gox
2255         $(BUILDPACKAGE)
2256 debug/proc/check: $(CHECK_DEPS)
2257         @$(MKDIR_P) debug/proc
2258         $(CHECK)
2259 .PHONY: debug/proc/check
2260
2261 encoding/ascii85.lo: $(go_encoding_ascii85_files) io.gox os.gox strconv.gox
2262         $(BUILDPACKAGE)
2263 encoding/ascii85/check: $(CHECK_DEPS)
2264         @$(MKDIR_P) encoding/ascii85
2265         $(CHECK)
2266 .PHONY: encoding/ascii85/check
2267
2268 encoding/base32.lo: $(go_encoding_base32_files) io.gox os.gox strconv.gox
2269         $(BUILDPACKAGE)
2270 encoding/base32/check: $(CHECK_DEPS)
2271         @$(MKDIR_P) encoding/base32
2272         $(CHECK)
2273 .PHONY: encoding/base32/check
2274
2275 encoding/base64.lo: $(go_encoding_base64_files) io.gox os.gox strconv.gox
2276         $(BUILDPACKAGE)
2277 encoding/base64/check: $(CHECK_DEPS)
2278         @$(MKDIR_P) encoding/base64
2279         $(CHECK)
2280 .PHONY: encoding/base64/check
2281
2282 encoding/binary.lo: $(go_encoding_binary_files) io.gox math.gox os.gox \
2283                 reflect.gox
2284         $(BUILDPACKAGE)
2285 encoding/binary/check: $(CHECK_DEPS)
2286         @$(MKDIR_P) encoding/binary
2287         $(CHECK)
2288 .PHONY: encoding/binary/check
2289
2290 encoding/git85.lo: $(go_encoding_git85_files) bytes.gox io.gox os.gox \
2291                 strconv.gox
2292         $(BUILDPACKAGE)
2293 encoding/git85/check: $(CHECK_DEPS)
2294         @$(MKDIR_P) encoding/git85
2295         $(CHECK)
2296 .PHONY: encoding/git85/check
2297
2298 encoding/hex.lo: $(go_encoding_hex_files) os.gox strconv.gox
2299         $(BUILDPACKAGE)
2300 encoding/hex/check: $(CHECK_DEPS)
2301         @$(MKDIR_P) encoding/hex
2302         $(CHECK)
2303 .PHONY: encoding/hex/check
2304
2305 encoding/line.lo: $(go_encoding_line_files) io.gox os.gox
2306         $(BUILDPACKAGE)
2307 encoding/line/check: $(CHECK_DEPS)
2308         @$(MKDIR_P) encoding/line
2309         $(CHECK)
2310 .PHONY: encoding/line/check
2311
2312 encoding/pem.lo: $(go_encoding_pem_files) bytes.gox encoding/base64.gox
2313         $(BUILDPACKAGE)
2314 encoding/pem/check: $(CHECK_DEPS)
2315         @$(MKDIR_P) encoding/pem
2316         $(CHECK)
2317 .PHONY: encoding/pem/check
2318
2319 exp/datafmt.lo: $(go_exp_datafmt_files) bytes.gox container/vector.gox \
2320                 fmt.gox go/scanner.gox go/token.gox io.gox os.gox reflect.gox \
2321                 runtime.gox strconv.gox strings.gox
2322         $(BUILDPACKAGE)
2323 exp/datafmt/check: $(CHECK_DEPS)
2324         @$(MKDIR_P) exp/datafmt
2325         $(CHECK)
2326 .PHONY: exp/datafmt/check
2327
2328 exp/draw.lo: $(go_exp_draw_files) image.gox os.gox
2329         $(BUILDPACKAGE)
2330 exp/draw/check: $(CHECK_DEPS)
2331         @$(MKDIR_P) exp/draw
2332         $(CHECK)
2333 .PHONY: exp/draw/check
2334
2335 exp/eval.lo: $(go_exp_eval_files) big.gox go/ast.gox go/parser.gox \
2336                 go/scanner.gox go/token.gox fmt.gox log.gox strconv.gox \
2337                 strings.gox os.gox reflect.gox runtime.gox sort.gox template.gox
2338         $(BUILDPACKAGE)
2339 exp/eval/check: $(CHECK_DEPS)
2340         @$(MKDIR_P) exp/eval
2341         $(CHECK)
2342 .PHONY: exp/eval/check
2343
2344 go/ast.lo: $(go_go_ast_files) bytes.gox fmt.gox go/scanner.gox go/token.gox \
2345                 io.gox os.gox reflect.gox unicode.gox utf8.gox
2346         $(BUILDPACKAGE)
2347 go/ast/check: $(CHECK_DEPS)
2348         @$(MKDIR_P) go/ast
2349         $(CHECK)
2350 .PHONY: go/ast/check
2351
2352 go/doc.lo: $(go_go_doc_files) go/ast.gox go/token.gox io.gox regexp.gox \
2353                 sort.gox strings.gox template.gox
2354         $(BUILDPACKAGE)
2355 go/doc/check: $(CHECK_DEPS)
2356         @$(MKDIR_P) go/doc
2357         $(CHECK)
2358 .PHONY: go/doc/check
2359
2360 go/parser.lo: $(go_go_parser_files) bytes.gox fmt.gox go/ast.gox \
2361                 go/scanner.gox go/token.gox io.gox io/ioutil.gox os.gox \
2362                 path/filepath.gox strings.gox
2363         $(BUILDPACKAGE)
2364 go/parser/check: $(CHECK_DEPS)
2365         @$(MKDIR_P) go/parser
2366         $(CHECK)
2367 .PHONY: go/parser/check
2368
2369 go/printer.lo: $(go_go_printer_files) bytes.gox fmt.gox go/ast.gox \
2370                 go/token.gox io.gox os.gox path/filepath.gox reflect.gox \
2371                 runtime.gox strings.gox tabwriter.gox
2372         $(BUILDPACKAGE)
2373 go/printer/check: $(CHECK_DEPS)
2374         @$(MKDIR_P) go/printer
2375         $(CHECK)
2376 .PHONY: go/printer/check
2377
2378 go/scanner.lo: $(go_go_scanner_files) bytes.gox container/vector.gox fmt.gox \
2379                 go/token.gox io.gox os.gox path/filepath.gox sort.gox \
2380                 strconv.gox unicode.gox utf8.gox
2381         $(BUILDPACKAGE)
2382 go/scanner/check: $(CHECK_DEPS)
2383         @$(MKDIR_P) go/scanner
2384         $(CHECK)
2385 .PHONY: go/scanner/check
2386
2387 go/token.lo: $(go_go_token_files) fmt.gox strconv.gox
2388         $(BUILDPACKAGE)
2389 go/token/check: $(CHECK_DEPS)
2390         @$(MKDIR_P) go/token
2391         $(CHECK)
2392 .PHONY: go/token/check
2393
2394 go/typechecker.lo: $(go_go_typechecker_files) fmt.gox go/ast.gox go/token.gox \
2395                 go/scanner.gox os.gox
2396         $(BUILDPACKAGE)
2397 go/typechecker/check: $(CHECK_DEPS)
2398         @$(MKDIR_P) go/typechecker
2399         $(CHECK)
2400 .PHONY: go/typechecker/check
2401
2402 hash/adler32.lo: $(go_hash_adler32_files) hash.gox os.gox
2403         $(BUILDPACKAGE)
2404 hash/adler32/check: $(CHECK_DEPS)
2405         @$(MKDIR_P) hash/adler32
2406         $(CHECK)
2407 .PHONY: hash/adler32/check
2408
2409 hash/crc32.lo: $(go_hash_crc32_files) hash.gox os.gox
2410         $(BUILDPACKAGE)
2411 hash/crc32/check: $(CHECK_DEPS)
2412         @$(MKDIR_P) hash/crc32
2413         $(CHECK)
2414 .PHONY: hash/crc32/check
2415
2416 hash/crc64.lo: $(go_hash_crc64_files) hash.gox os.gox
2417         $(BUILDPACKAGE)
2418 hash/crc64/check: $(CHECK_DEPS)
2419         @$(MKDIR_P) hash/crc64
2420         $(CHECK)
2421 .PHONY: hash/crc64/check
2422
2423 hash/fnv.lo: $(go_hash_fnv_files) encoding/binary.gox hash.gox os.gox
2424         $(BUILDPACKAGE)
2425 hash/fnv/check: $(CHECK_DEPS)
2426         @$(MKDIR_P) hash/fnv
2427         $(CHECK)
2428 .PHONY: hash/fnv/check
2429
2430 http/cgi.lo: $(go_http_cgi_files) bufio.gox bytes.gox encoding/line.gox \
2431                 exec.gox fmt.gox http.gox io.gox io/ioutil.gox log.gox \
2432                 os.gox path/filepath.gox regexp.gox strconv.gox strings.gox
2433         $(BUILDPACKAGE)
2434 http/cgi/check: $(CHECK_DEPS)
2435         @$(MKDIR_P) http/cgi
2436         $(CHECK)
2437 .PHONY: http/cgi/check
2438
2439 http/httptest.lo: $(go_http_httptest_files) bytes.gox fmt.gox http.gox \
2440                 net.gox os.gox
2441         $(BUILDPACKAGE)
2442 http/httptest/check: $(CHECK_DEPS)
2443         @$(MKDIR_P) http/httptest
2444         $(CHECK)
2445 .PHONY: http/httptest/check
2446
2447 http/pprof.lo: $(go_http_pprof_files) bufio.gox fmt.gox http.gox os.gox \
2448                 runtime.gox runtime/pprof.gox strconv.gox strings.gox
2449         $(BUILDPACKAGE)
2450 http/pprof/check: $(CHECK_DEPS)
2451         @$(MKDIR_P) http/pprof
2452         $(CHECK)
2453 .PHONY: http/pprof/check
2454
2455 image/jpeg.lo: $(go_image_jpeg_files) bufio.gox image.gox io.gox os.gox
2456         $(BUILDPACKAGE)
2457 image/jpeg/check: $(CHECK_DEPS)
2458         @$(MKDIR_P) image/jpeg
2459         $(CHECK)
2460 .PHONY: image/jpeg/check
2461
2462 image/png.lo: $(go_image_png_files) bufio.gox compress/zlib.gox fmt.gox \
2463                 hash.gox hash/crc32.gox image.gox io.gox os.gox strconv.gox
2464         $(BUILDPACKAGE)
2465 image/png/check: $(CHECK_DEPS)
2466         @$(MKDIR_P) image/png
2467         $(CHECK)
2468 .PHONY: image/png/check
2469
2470 index/suffixarray.lo: $(go_index_suffixarray_files) bytes.gox regexp.gox \
2471                 sort.gox
2472         $(BUILDPACKAGE)
2473 index/suffixarray/check: $(CHECK_DEPS)
2474         @$(MKDIR_P) index/suffixarray
2475         $(CHECK)
2476 .PHONY: index/suffixarray/check
2477
2478 io/ioutil.lo: $(go_io_ioutil_files) bytes.gox io.gox os.gox path/filepath.gox \
2479                 sort.gox strconv.gox
2480         $(BUILDPACKAGE)
2481 io/ioutil/check: $(CHECK_DEPS)
2482         @$(MKDIR_P) io/ioutil
2483         $(CHECK)
2484 .PHONY: io/ioutil/check
2485
2486 mime/multipart.lo: $(go_mime_multipart_files) bufio.gox bytes.gox io.gox \
2487                 mime.gox net/textproto.gox os.gox regexp.gox strings.gox
2488         $(BUILDPACKAGE)
2489 mime/multipart/check: $(CHECK_DEPS)
2490         @$(MKDIR_P) mime/multipart
2491         $(CHECK)
2492 .PHONY: mime/multipart/check
2493
2494 net/dict.lo: $(go_net_dict_files) container/vector.gox net/textproto.gox \
2495                 os.gox strconv.gox strings.gox
2496         $(BUILDPACKAGE)
2497
2498 net/textproto.lo: $(go_net_textproto_files) bufio.gox bytes.gox \
2499                 container/vector.gox fmt.gox io.gox io/ioutil.gox net.gox \
2500                 os.gox strconv.gox sync.gox
2501         $(BUILDPACKAGE)
2502 net/textproto/check: $(CHECK_DEPS)
2503         @$(MKDIR_P) net/textproto
2504         $(CHECK)
2505 .PHONY: net/textproto/check
2506
2507 os/inotify.lo: $(go_os_inotify_files) fmt.gox os.gox strings.gox syscall.gox
2508         $(BUILDPACKAGE)
2509 os/inotify/check: $(CHECK_DEPS)
2510         @$(MKDIR_P) os/inotify
2511         $(CHECK)
2512 .PHONY: os/inotify/check
2513
2514 os/signal.lo: $(go_os_signal_files) runtime.gox strconv.gox
2515         $(BUILDPACKAGE)
2516 os/signal/check: $(CHECK_DEPS)
2517         @$(MKDIR_P) os/signal
2518         $(CHECK)
2519 .PHONY: os/signal/check
2520
2521 unix.go: $(srcdir)/go/os/signal/mkunix.sh sysinfo.go
2522         $(SHELL) $(srcdir)/go/os/signal/mkunix.sh sysinfo.go > $@.tmp
2523         mv -f $@.tmp $@
2524
2525 path/filepath.lo: $(go_path_filepath_files) bytes.gox os.gox sort.gox \
2526                 strings.gox utf8.gox
2527         $(BUILDPACKAGE)
2528 path/filepath/check: $(CHECK_DEPS)
2529         @$(MKDIR_P) path/filepath
2530         $(CHECK)
2531 .PHONY: path/filepath/check
2532
2533 rpc/jsonrpc.lo: $(go_rpc_jsonrpc_files) fmt.gox io.gox json.gox net.gox \
2534                 os.gox rpc.gox sync.gox
2535         $(BUILDPACKAGE)
2536 rpc/jsonrpc/check: $(CHECK_DEPS)
2537         @$(MKDIR_P) rpc/jsonrpc
2538         $(CHECK)
2539 .PHONY: rpc/jsonrpc/check
2540
2541 runtime/debug.lo: $(go_runtime_debug_files) bytes.gox fmt.gox io/ioutil.gox \
2542                 os.gox runtime.gox
2543         $(BUILDPACKAGE)
2544 runtime/debug/check: $(CHECK_DEPS)
2545         @$(MKDIR_P) runtime/debug
2546         $(CHECK)
2547 .PHONY: runtime/debug/check
2548
2549 runtime/pprof.lo: $(go_runtime_pprof_files) bufio.gox fmt.gox io.gox os.gox \
2550                 runtime.gox sync.gox
2551         $(BUILDPACKAGE)
2552 runtime/pprof/check: $(CHECK_DEPS)
2553         @$(MKDIR_P) runtime/pprof
2554         $(CHECK)
2555 .PHONY: runtime/pprof/check
2556
2557 sync/atomic.lo: $(go_sync_atomic_files)
2558         $(BUILDPACKAGE)
2559 sync/atomic_c.lo: $(go_sync_atomic_c_files) sync/atomic.lo
2560         $(LTCOMPILE) -c -o $@ $(srcdir)/go/sync/atomic/atomic.c
2561 sync/atomic/check: $(CHECK_DEPS)
2562         @$(MKDIR_P) sync/atomic
2563         $(CHECK)
2564 .PHONY: sync/atomic/check
2565
2566 testing/iotest.lo: $(go_testing_iotest_files) io.gox log.gox os.gox
2567         $(BUILDPACKAGE)
2568 testing/iotest/check: $(CHECK_DEPS)
2569         @$(MKDIR_P) testing/iotest
2570         $(CHECK)
2571 .PHONY: testing/iotest/check
2572
2573 testing/quick.lo: $(go_testing_quick_files) flag.gox fmt.gox math.gox os.gox \
2574                 rand.gox reflect.gox strings.gox
2575         $(BUILDPACKAGE)
2576 testing/quick/check: $(CHECK_DEPS)
2577         @$(MKDIR_P) testing/quick
2578         $(CHECK)
2579 .PHONY: testing/quick/check
2580
2581 testing/script.lo: $(go_testing_script_files) fmt.gox os.gox rand.gox \
2582                 reflect.gox strings.gox
2583         $(BUILDPACKAGE)
2584 testing/script/check: $(CHECK_DEPS)
2585         @$(MKDIR_P) testing/script
2586         $(CHECK)
2587 .PHONY: testing/script/check
2588
2589 sysinfo.go: s-sysinfo; @true
2590 s-sysinfo: $(srcdir)/mksysinfo.sh config.h
2591         CC="$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)" $(SHELL) $(srcdir)/mksysinfo.sh
2592         $(SHELL) $(srcdir)/../move-if-change tmp-sysinfo.go sysinfo.go
2593         $(STAMP) $@
2594
2595 syscalls/syscall.lo: $(go_syscall_files) sync.gox
2596         $(BUILDPACKAGE)
2597 syscalls/errno.lo: $(go_syscall_c_files) syscalls/syscall.lo
2598         $(LTCOMPILE) -c -o $@ $(srcdir)/syscalls/errno.c
2599
2600 # How to build a .gox file from a .lo file.
2601 BUILDGOX = \
2602         f=`echo $< | sed -e 's/.lo$$/.o/'`; \
2603         $(OBJCOPY) -j .go_export $$f $@.tmp && mv -f $@.tmp $@
2604
2605 asn1.gox: asn1/asn1.lo
2606         $(BUILDGOX)
2607 big.gox: big/big.lo
2608         $(BUILDGOX)
2609 bufio.gox: bufio/bufio.lo
2610         $(BUILDGOX)
2611 bytes.gox: bytes/bytes.lo
2612         $(BUILDGOX)
2613 cmath.gox: cmath/cmath.lo
2614         $(BUILDGOX)
2615 crypto.gox: crypto/crypto.lo
2616         $(BUILDGOX)
2617 ebnf.gox: ebnf/ebnf.lo
2618         $(BUILDGOX)
2619 exec.gox: exec/exec.lo
2620         $(BUILDGOX)
2621 expvar.gox: expvar/expvar.lo
2622         $(BUILDGOX)
2623 flag.gox: flag/flag.lo
2624         $(BUILDGOX)
2625 fmt.gox: fmt/fmt.lo
2626         $(BUILDGOX)
2627 gob.gox: gob/gob.lo
2628         $(BUILDGOX)
2629 hash.gox: hash/hash.lo
2630         $(BUILDGOX)
2631 html.gox: html/html.lo
2632         $(BUILDGOX)
2633 http.gox: http/http.lo
2634         $(BUILDGOX)
2635 image.gox: image/image.lo
2636         $(BUILDGOX)
2637 io.gox: io/io.lo
2638         $(BUILDGOX)
2639 json.gox: json/json.lo
2640         $(BUILDGOX)
2641 log.gox: log/log.lo
2642         $(BUILDGOX)
2643 math.gox: math/math.lo
2644         $(BUILDGOX)
2645 mime.gox: mime/mime.lo
2646         $(BUILDGOX)
2647 net.gox: net/net.lo
2648         $(BUILDGOX)
2649 netchan.gox: netchan/netchan.lo
2650         $(BUILDGOX)
2651 os.gox: os/os.lo
2652         $(BUILDGOX)
2653 patch.gox: patch/patch.lo
2654         $(BUILDGOX)
2655 path.gox: path/path.lo
2656         $(BUILDGOX)
2657 rand.gox: rand/rand.lo
2658         $(BUILDGOX)
2659 reflect.gox: reflect/reflect.lo
2660         $(BUILDGOX)
2661 regexp.gox: regexp/regexp.lo
2662         $(BUILDGOX)
2663 rpc.gox: rpc/rpc.lo
2664         $(BUILDGOX)
2665 runtime.gox: runtime/runtime.lo
2666         $(BUILDGOX)
2667 scanner.gox: scanner/scanner.lo
2668         $(BUILDGOX)
2669 smtp.gox: smtp/smtp.lo
2670         $(BUILDGOX)
2671 sort.gox: sort/sort.lo
2672         $(BUILDGOX)
2673 strconv.gox: strconv/strconv.lo
2674         $(BUILDGOX)
2675 strings.gox: strings/strings.lo
2676         $(BUILDGOX)
2677 sync.gox: sync/sync.lo
2678         $(BUILDGOX)
2679 syslog.gox: syslog/syslog.lo
2680         $(BUILDGOX)
2681 syscall.gox: syscalls/syscall.lo
2682         $(BUILDGOX)
2683 tabwriter.gox: tabwriter/tabwriter.lo
2684         $(BUILDGOX)
2685 template.gox: template/template.lo
2686         $(BUILDGOX)
2687 testing.gox: testing/testing.lo
2688         $(BUILDGOX)
2689 time.gox: time/time.lo
2690         $(BUILDGOX)
2691 try.gox: try/try.lo
2692         $(BUILDGOX)
2693 unicode.gox: unicode/unicode.lo
2694         $(BUILDGOX)
2695 utf16.gox: utf16/utf16.lo
2696         $(BUILDGOX)
2697 utf8.gox: utf8/utf8.lo
2698         $(BUILDGOX)
2699 websocket.gox: websocket/websocket.lo
2700         $(BUILDGOX)
2701 xml.gox: xml/xml.lo
2702         $(BUILDGOX)
2703
2704 archive/tar.gox: archive/tar.lo
2705         $(BUILDGOX)
2706 archive/zip.gox: archive/zip.lo
2707         $(BUILDGOX)
2708
2709 compress/bzip2.gox: compress/bzip2.lo
2710         $(BUILDGOX)
2711 compress/flate.gox: compress/flate.lo
2712         $(BUILDGOX)
2713 compress/gzip.gox: compress/gzip.lo
2714         $(BUILDGOX)
2715 compress/lzw.gox: compress/lzw.lo
2716         $(BUILDGOX)
2717 compress/zlib.gox: compress/zlib.lo
2718         $(BUILDGOX)
2719
2720 container/heap.gox: container/heap.lo
2721         $(BUILDGOX)
2722 container/list.gox: container/list.lo
2723         $(BUILDGOX)
2724 container/ring.gox: container/ring.lo
2725         $(BUILDGOX)
2726 container/vector.gox: container/vector.lo
2727         $(BUILDGOX)
2728
2729 crypto/aes.gox: crypto/aes.lo
2730         $(BUILDGOX)
2731 crypto/block.gox: crypto/block.lo
2732         $(BUILDGOX)
2733 crypto/blowfish.gox: crypto/blowfish.lo
2734         $(BUILDGOX)
2735 crypto/cast5.gox: crypto/cast5.lo
2736         $(BUILDGOX)
2737 crypto/cipher.gox: crypto/cipher.lo
2738         $(BUILDGOX)
2739 crypto/dsa.gox: crypto/dsa.lo
2740         $(BUILDGOX)
2741 crypto/ecdsa.gox: crypto/ecdsa.lo       
2742         $(BUILDGOX)
2743 crypto/elliptic.gox: crypto/elliptic.lo
2744         $(BUILDGOX)
2745 crypto/hmac.gox: crypto/hmac.lo
2746         $(BUILDGOX)
2747 crypto/md4.gox: crypto/md4.lo
2748         $(BUILDGOX)
2749 crypto/md5.gox: crypto/md5.lo
2750         $(BUILDGOX)
2751 crypto/ocsp.gox: crypto/ocsp.lo
2752         $(BUILDGOX)
2753 crypto/openpgp.gox: crypto/openpgp.lo
2754         $(BUILDGOX)
2755 crypto/rand.gox: crypto/rand.lo
2756         $(BUILDGOX)
2757 crypto/rc4.gox: crypto/rc4.lo
2758         $(BUILDGOX)
2759 crypto/ripemd160.gox: crypto/ripemd160.lo
2760         $(BUILDGOX)
2761 crypto/rsa.gox: crypto/rsa.lo
2762         $(BUILDGOX)
2763 crypto/sha1.gox: crypto/sha1.lo
2764         $(BUILDGOX)
2765 crypto/sha256.gox: crypto/sha256.lo
2766         $(BUILDGOX)
2767 crypto/sha512.gox: crypto/sha512.lo
2768         $(BUILDGOX)
2769 crypto/subtle.gox: crypto/subtle.lo
2770         $(BUILDGOX)
2771 crypto/tls.gox: crypto/tls.lo
2772         $(BUILDGOX)
2773 crypto/twofish.gox: crypto/twofish.lo
2774         $(BUILDGOX)
2775 crypto/x509.gox: crypto/x509.lo
2776         $(BUILDGOX)
2777 crypto/xtea.gox: crypto/xtea.lo
2778         $(BUILDGOX)
2779
2780 crypto/openpgp/armor.gox: crypto/openpgp/armor.lo
2781         $(BUILDGOX)
2782 crypto/openpgp/error.gox: crypto/openpgp/error.lo
2783         $(BUILDGOX)
2784 crypto/openpgp/packet.gox: crypto/openpgp/packet.lo
2785         $(BUILDGOX)
2786 crypto/openpgp/s2k.gox: crypto/openpgp/s2k.lo
2787         $(BUILDGOX)
2788
2789 debug/dwarf.gox: debug/dwarf.lo
2790         $(BUILDGOX)
2791 debug/elf.gox: debug/elf.lo
2792         $(BUILDGOX)
2793 debug/gosym.gox: debug/gosym.lo
2794         $(BUILDGOX)
2795 debug/macho.gox: debug/macho.lo
2796         $(BUILDGOX)
2797 debug/pe.gox: debug/pe.lo
2798         $(BUILDGOX)
2799 debug/proc.gox: debug/proc.lo
2800         $(BUILDGOX)
2801
2802 encoding/ascii85.gox: encoding/ascii85.lo
2803         $(BUILDGOX)
2804 encoding/base32.gox: encoding/base32.lo
2805         $(BUILDGOX)
2806 encoding/base64.gox: encoding/base64.lo
2807         $(BUILDGOX)
2808 encoding/binary.gox: encoding/binary.lo
2809         $(BUILDGOX)
2810 encoding/git85.gox: encoding/git85.lo
2811         $(BUILDGOX)
2812 encoding/hex.gox: encoding/hex.lo
2813         $(BUILDGOX)
2814 encoding/line.gox: encoding/line.lo
2815         $(BUILDGOX)
2816 encoding/pem.gox: encoding/pem.lo
2817         $(BUILDGOX)
2818
2819 exp/datafmt.gox: exp/datafmt.lo
2820         $(BUILDGOX)
2821 exp/draw.gox: exp/draw.lo
2822         $(BUILDGOX)
2823 exp/eval.gox: exp/eval.lo
2824         $(BUILDGOX)
2825
2826 go/ast.gox: go/ast.lo
2827         $(BUILDGOX)
2828 go/doc.gox: go/doc.lo
2829         $(BUILDGOX)
2830 go/parser.gox: go/parser.lo
2831         $(BUILDGOX)
2832 go/printer.gox: go/printer.lo
2833         $(BUILDGOX)
2834 go/scanner.gox: go/scanner.lo
2835         $(BUILDGOX)
2836 go/token.gox: go/token.lo
2837         $(BUILDGOX)
2838 go/typechecker.gox: go/typechecker.lo
2839         $(BUILDGOX)
2840
2841 hash/adler32.gox: hash/adler32.lo
2842         $(BUILDGOX)
2843 hash/crc32.gox: hash/crc32.lo
2844         $(BUILDGOX)
2845 hash/crc64.gox: hash/crc64.lo
2846         $(BUILDGOX)
2847 hash/fnv.gox: hash/fnv.lo
2848         $(BUILDGOX)
2849
2850 http/cgi.gox: http/cgi.lo
2851         $(BUILDGOX)
2852 http/httptest.gox: http/httptest.lo
2853         $(BUILDGOX)
2854 http/pprof.gox: http/pprof.lo
2855         $(BUILDGOX)
2856
2857 image/jpeg.gox: image/jpeg.lo
2858         $(BUILDGOX)
2859 image/png.gox: image/png.lo
2860         $(BUILDGOX)
2861
2862 index/suffixarray.gox: index/suffixarray.lo
2863         $(BUILDGOX)
2864
2865 io/ioutil.gox: io/ioutil.lo
2866         $(BUILDGOX)
2867
2868 mime/multipart.gox: mime/multipart.lo
2869         $(BUILDGOX)
2870
2871 net/dict.gox: net/dict.lo
2872         $(BUILDGOX)
2873 net/textproto.gox: net/textproto.lo
2874         $(BUILDGOX)
2875
2876 os/inotify.gox: os/inotify.lo
2877         $(BUILDGOX)
2878 os/signal.gox: os/signal.lo
2879         $(BUILDGOX)
2880
2881 path/filepath.gox: path/filepath.lo
2882         $(BUILDGOX)
2883
2884 rpc/jsonrpc.gox: rpc/jsonrpc.lo
2885         $(BUILDGOX)
2886
2887 runtime/debug.gox: runtime/debug.lo
2888         $(BUILDGOX)
2889 runtime/pprof.gox: runtime/pprof.lo
2890         $(BUILDGOX)
2891
2892 sync/atomic.gox: sync/atomic.lo
2893         $(BUILDGOX)
2894
2895 testing/iotest.gox: testing/iotest.lo
2896         $(BUILDGOX)
2897 testing/quick.gox: testing/quick.lo
2898         $(BUILDGOX)
2899 testing/script.gox: testing/script.lo
2900         $(BUILDGOX)
2901
2902 if LIBGO_IS_LINUX
2903 # os_inotify_check = os/inotify/check
2904 os_inotify_check =
2905 else
2906 os_inotify_check =
2907 endif
2908
2909 TEST_PACKAGES = \
2910         asn1/check \
2911         big/check \
2912         bufio/check \
2913         bytes/check \
2914         cmath/check \
2915         ebnf/check \
2916         exec/check \
2917         expvar/check \
2918         flag/check \
2919         fmt/check \
2920         gob/check \
2921         html/check \
2922         http/check \
2923         io/check \
2924         json/check \
2925         log/check \
2926         math/check \
2927         mime/check \
2928         $(if $(GCCGO_RUN_ALL_TESTS),net/check) \
2929         netchan/check \
2930         os/check \
2931         patch/check \
2932         path/check \
2933         rand/check \
2934         reflect/check \
2935         regexp/check \
2936         rpc/check \
2937         runtime/check \
2938         scanner/check \
2939         smtp/check \
2940         sort/check \
2941         strconv/check \
2942         strings/check \
2943         sync/check \
2944         $(if $(GCCGO_RUN_ALL_TESTS),syslog/check) \
2945         tabwriter/check \
2946         template/check \
2947         time/check \
2948         try/check \
2949         unicode/check \
2950         utf16/check \
2951         utf8/check \
2952         websocket/check \
2953         xml/check \
2954         archive/tar/check \
2955         archive/zip/check \
2956         compress/bzip2/check \
2957         compress/flate/check \
2958         compress/gzip/check \
2959         compress/lzw/check \
2960         compress/zlib/check \
2961         container/heap/check \
2962         container/list/check \
2963         container/ring/check \
2964         container/vector/check \
2965         crypto/aes/check \
2966         crypto/block/check \
2967         crypto/blowfish/check \
2968         crypto/cast5/check \
2969         crypto/cipher/check \
2970         crypto/dsa/check \
2971         crypto/ecdsa/check \
2972         crypto/elliptic/check \
2973         crypto/hmac/check \
2974         crypto/md4/check \
2975         crypto/md5/check \
2976         crypto/ocsp/check \
2977         crypto/openpgp/check \
2978         crypto/rand/check \
2979         crypto/rc4/check \
2980         crypto/ripemd160/check \
2981         crypto/rsa/check \
2982         crypto/sha1/check \
2983         crypto/sha256/check \
2984         crypto/sha512/check \
2985         crypto/subtle/check \
2986         crypto/tls/check \
2987         crypto/twofish/check \
2988         crypto/x509/check \
2989         crypto/xtea/check \
2990         crypto/openpgp/armor/check \
2991         crypto/openpgp/packet/check \
2992         crypto/openpgp/s2k/check \
2993         debug/dwarf/check \
2994         debug/elf/check \
2995         debug/macho/check \
2996         debug/pe/check \
2997         encoding/ascii85/check \
2998         encoding/base32/check \
2999         encoding/base64/check \
3000         encoding/binary/check \
3001         encoding/git85/check \
3002         encoding/hex/check \
3003         encoding/line/check \
3004         encoding/pem/check \
3005         exp/datafmt/check \
3006         exp/draw/check \
3007         exp/eval/check \
3008         go/parser/check \
3009         go/printer/check \
3010         go/scanner/check \
3011         go/token/check \
3012         go/typechecker/check \
3013         hash/adler32/check \
3014         hash/crc32/check \
3015         hash/crc64/check \
3016         hash/fnv/check \
3017         http/cgi/check \
3018         image/png/check \
3019         index/suffixarray/check \
3020         io/ioutil/check \
3021         mime/multipart/check \
3022         net/textproto/check \
3023         $(os_inotify_check) \
3024         os/signal/check \
3025         path/filepath/check \
3026         rpc/jsonrpc/check \
3027         sync/atomic/check \
3028         testing/quick/check \
3029         testing/script/check
3030
3031 check-recursive: $(TEST_PACKAGES)
3032
3033 mostlyclean-local:
3034         find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
3035         find . -name '*.$(OBJEXT)' -print | xargs rm -f
3036
3037 clean-local:
3038         find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f
3039         find . -name '*.a' -print | xargs rm -f
3040
3041 CLEANFILES = *.go *.gox goc2c *.c s-version