1 # Makefile.am -- Go library Makefile.
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.
7 # Process this file with autoreconf to produce Makefile.in.
10 SUFFIXES = .c .go .gox .o .obj .lo .a
18 gcc_version := $(shell $(GOC) -dumpversion)
20 MAINT_CHARSET = latin1
22 mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
23 PWD_COMMAND = $${PWDCMD-pwd}
24 STAMP = echo timestamp >
26 toolexecdir = $(glibgo_toolexecdir)
27 toolexeclibdir = $(glibgo_toolexeclibdir)
28 toolexeclibgodir = $(nover_glibgo_toolexeclibdir)/go/$(gcc_version)/$(target_alias)
29 libexecsubdir = $(libexecdir)/gcc/$(target_alias)/$(gcc_version)
32 LIBFFIINCS = @LIBFFIINCS@
34 LIBATOMIC = @LIBATOMIC@
36 WARN_CFLAGS = $(WARN_FLAGS) $(WERROR)
38 # -I/-D flags to pass when compiling.
39 AM_CPPFLAGS = -I $(srcdir)/runtime $(LIBFFIINCS) $(PTHREAD_CFLAGS)
41 ACLOCAL_AMFLAGS = -I ./config -I ../config
43 AM_CFLAGS = -fexceptions -fnon-call-exceptions -fplan9-extensions \
44 $(SPLIT_STACK) $(WARN_CFLAGS) \
45 $(STRINGOPS_FLAG) $(HWCAP_CFLAGS) $(OSCFLAGS) \
46 -I $(srcdir)/../libgcc -I $(srcdir)/../libbacktrace \
47 -I $(MULTIBUILDTOP)../../gcc/include
52 AM_LDFLAGS += -XCClinker $(SPLIT_STACK)
56 # Using an import file for libgo avoid requiring to use the -brtl flag
57 # when builing a go program
58 AM_LDFLAGS += -Wl,-bbigtoc -Wl,-bI:$(srcdir)/libgo.imp
59 EXTRA_libgo_la_DEPENDENCIES = libgo.imp
65 # Work around what appears to be a GNU make handling MAKEFLAGS
66 # values defined in terms of make variables, as is the case for CC and
67 # friends when we are called from the top level Makefile.
69 "AR_FLAGS=$(AR_FLAGS)" \
70 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
71 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
73 "CXXFLAGS=$(CXXFLAGS)" \
74 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
75 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
76 "GOC_FOR_TARGET=$(GOC_FOR_TARGET)" \
78 "GOCFLAGS=$(GOCFLAGS)" \
79 "INSTALL=$(INSTALL)" \
80 "INSTALL_DATA=$(INSTALL_DATA)" \
81 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
82 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
83 "LDFLAGS=$(LDFLAGS)" \
84 "LIBCFLAGS=$(LIBCFLAGS)" \
85 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
87 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
88 "PICFLAG=$(PICFLAG)" \
89 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
91 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
92 "exec_prefix=$(exec_prefix)" \
93 "infodir=$(infodir)" \
95 "includedir=$(includedir)" \
97 "tooldir=$(tooldir)" \
98 "gxx_include_dir=$(gxx_include_dir)" \
104 "NM_FOR_BUILD=$(NM_FOR_BUILD)" \
105 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
106 "DESTDIR=$(DESTDIR)" \
109 # Subdir rules rely on $(FLAGS_TO_PASS)
110 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
113 toolexeclib_LTLIBRARIES = libgo-llgo.la
114 toolexeclib_LIBRARIES = libgobegin-llgo.a
116 toolexeclib_LTLIBRARIES = libgo.la
117 toolexeclib_LIBRARIES = libgobegin.a libgolibbegin.a
120 noinst_LIBRARIES = libgotool.a
122 toolexeclibgo_DATA = \
154 toolexeclibgoarchivedir = $(toolexeclibgodir)/archive
156 toolexeclibgoarchive_DATA = \
160 toolexeclibgocompressdir = $(toolexeclibgodir)/compress
162 toolexeclibgocompress_DATA = \
169 toolexeclibgocontainerdir = $(toolexeclibgodir)/container
171 toolexeclibgocontainer_DATA = \
176 toolexeclibgocryptodir = $(toolexeclibgodir)/crypto
178 toolexeclibgocrypto_DATA = \
184 crypto/elliptic.gox \
197 toolexeclibgocryptox509dir = $(toolexeclibgocryptodir)/x509
199 toolexeclibgocryptox509_DATA = \
202 toolexeclibgodatabasedir = $(toolexeclibgodir)/database
204 toolexeclibgodatabase_DATA = \
207 toolexeclibgodatabasesqldir = $(toolexeclibgodatabasedir)/sql
209 toolexeclibgodatabasesql_DATA = \
210 database/sql/driver.gox
212 toolexeclibgodebugdir = $(toolexeclibgodir)/debug
214 toolexeclibgodebug_DATA = \
223 toolexeclibgoencodingdir = $(toolexeclibgodir)/encoding
225 toolexeclibgoencoding_DATA = \
226 encoding/ascii85.gox \
228 encoding/base32.gox \
229 encoding/base64.gox \
230 encoding/binary.gox \
238 toolexeclibgoexpdir = $(toolexeclibgodir)/exp
240 toolexeclibgoexp_DATA = \
244 toolexeclibgogodir = $(toolexeclibgodir)/go
246 toolexeclibgogo_DATA = \
259 toolexeclibgohashdir = $(toolexeclibgodir)/hash
261 toolexeclibgohash_DATA = \
267 toolexeclibgohtmldir = $(toolexeclibgodir)/html
269 toolexeclibgohtml_DATA = \
272 toolexeclibgoimagedir = $(toolexeclibgodir)/image
274 toolexeclibgoimage_DATA = \
281 toolexeclibgoimagecolordir = $(toolexeclibgoimagedir)/color
283 toolexeclibgoimagecolor_DATA = \
284 image/color/palette.gox
286 toolexeclibgoindexdir = $(toolexeclibgodir)/index
288 toolexeclibgoindex_DATA = \
289 index/suffixarray.gox
291 toolexeclibgoiodir = $(toolexeclibgodir)/io
293 toolexeclibgoio_DATA = \
296 toolexeclibgologdir = $(toolexeclibgodir)/log
298 toolexeclibgolog_DATA = \
301 toolexeclibgomathdir = $(toolexeclibgodir)/math
303 toolexeclibgomath_DATA = \
309 toolexeclibgomimedir = $(toolexeclibgodir)/mime
311 toolexeclibgomime_DATA = \
313 mime/quotedprintable.gox
315 toolexeclibgonetdir = $(toolexeclibgodir)/net
317 toolexeclibgonet_DATA = \
325 toolexeclibgonethttpdir = $(toolexeclibgonetdir)/http
327 toolexeclibgonethttp_DATA = \
329 net/http/cookiejar.gox \
331 net/http/httptest.gox \
332 net/http/httptrace.gox \
333 net/http/httputil.gox \
336 toolexeclibgonetrpcdir = $(toolexeclibgonetdir)/rpc
338 toolexeclibgonetrpc_DATA = \
341 toolexeclibgoosdir = $(toolexeclibgodir)/os
343 toolexeclibgoos_DATA = \
348 toolexeclibgopathdir = $(toolexeclibgodir)/path
350 toolexeclibgopath_DATA = \
353 toolexeclibgoregexpdir = $(toolexeclibgodir)/regexp
355 toolexeclibgoregexp_DATA = \
358 toolexeclibgoruntimedir = $(toolexeclibgodir)/runtime
360 toolexeclibgoruntime_DATA = \
365 toolexeclibgosyncdir = $(toolexeclibgodir)/sync
367 toolexeclibgosync_DATA = \
370 toolexeclibgotestingdir = $(toolexeclibgodir)/testing
372 toolexeclibgotesting_DATA = \
376 toolexeclibgotestinginternaldir = $(toolexeclibgotestingdir)/internal
378 toolexeclibgotestinginternal_DATA = \
379 testing/internal/testdeps.gox
381 toolexeclibgotextdir = $(toolexeclibgodir)/text
383 toolexeclibgotext_DATA = \
388 toolexeclibgotexttemplatedir = $(toolexeclibgotextdir)/template
390 toolexeclibgotexttemplate_DATA = \
391 text/template/parse.gox
393 toolexeclibgounicodedir = $(toolexeclibgodir)/unicode
395 toolexeclibgounicode_DATA = \
399 # Some packages are only needed for tests, so unlike the other
400 # internal packages nothing will explicitly depend on them.
401 # Force them to be built.
403 internal/testenv.gox \
404 net/internal/socktest.gox
407 rtems_task_variable_add_file = runtime/rtems-task-variable-add.c
409 rtems_task_variable_add_file =
413 runtime_getncpu_file = runtime/getncpu-linux.c
416 runtime_getncpu_file = runtime/getncpu-bsd.c
419 runtime_getncpu_file = runtime/getncpu-irix.c
422 runtime_getncpu_file = runtime/getncpu-solaris.c
425 runtime_getncpu_file = runtime/getncpu-bsd.c
428 runtime_getncpu_file = runtime/getncpu-bsd.c
431 runtime_getncpu_file = runtime/getncpu-aix.c
433 runtime_getncpu_file = runtime/getncpu-none.c
444 runtime/go-assert.c \
445 runtime/go-caller.c \
446 runtime/go-callers.c \
449 runtime/go-construct-map.c \
451 runtime/go-fieldtrack.c \
452 runtime/go-matherr.c \
453 runtime/go-memclr.c \
454 runtime/go-memcmp.c \
455 runtime/go-memequal.c \
456 runtime/go-memmove.c \
457 runtime/go-nanotime.c \
460 runtime/go-reflect-call.c \
461 runtime/go-runtime-error.c \
462 runtime/go-setenv.c \
463 runtime/go-signal.c \
464 runtime/go-strslice.c \
465 runtime/go-typedesc-equal.c \
466 runtime/go-unsafe-pointer.c \
467 runtime/go-unsetenv.c \
468 runtime/go-unwind.c \
469 runtime/go-varargs.c \
470 runtime/env_posix.c \
474 runtime/runtime_c.c \
478 $(rtems_task_variable_add_file) \
479 $(runtime_getncpu_file)
481 version.go: s-version; @true
484 echo "package sys" > version.go.tmp
485 echo 'const DefaultGoroot = "$(prefix)"' >> version.go.tmp
486 echo 'const TheVersion = "'`cat $(srcdir)/VERSION | sed 1q`' '`$(GOC) --version | sed 1q`'"' >> version.go.tmp
487 echo 'const Goexperiment = ``' >> version.go.tmp
488 echo 'const GOARCH = "'$(GOARCH)'"' >> version.go.tmp
489 echo 'const GOOS = "'$(GOOS)'"' >> version.go.tmp
490 echo 'const GccgoToolDir = "$(libexecsubdir)"' >> version.go.tmp
491 echo >> version.go.tmp
492 echo "type ArchFamilyType int" >> version.go.tmp
493 echo >> version.go.tmp
494 echo "const (" >> version.go.tmp
495 echo " UNKNOWN ArchFamilyType = iota" >> version.go.tmp
496 for a in $(ALLGOARCHFAMILY); do \
497 echo " $${a}" >> version.go.tmp; \
499 echo ")" >> version.go.tmp
500 echo >> version.go.tmp
501 for a in $(ALLGOARCH); do \
502 f=`echo $${a} | sed -e 's/\(.\).*/\1/' -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`; \
503 n="$${f}`echo $${a} | sed -e 's/.//'`"; \
504 if test "$${a}" = "$(GOARCH)"; then \
505 echo "const Goarch$${n} = 1" >> version.go.tmp; \
507 echo "const Goarch$${n} = 0" >> version.go.tmp; \
510 echo >> version.go.tmp
511 echo "const (" >> version.go.tmp
512 echo " ArchFamily = $(GOARCH_FAMILY)" >> version.go.tmp
513 echo " BigEndian = $(GOARCH_BIGENDIAN)" >> version.go.tmp
514 echo " CacheLineSize = $(GOARCH_CACHELINESIZE)" >> version.go.tmp
515 echo " PhysPageSize = $(GOARCH_PHYSPAGESIZE)" >> version.go.tmp
516 echo " PCQuantum = $(GOARCH_PCQUANTUM)" >> version.go.tmp
517 echo " Int64Align = $(GOARCH_INT64ALIGN)" >> version.go.tmp
518 echo " HugePageSize = $(GOARCH_HUGEPAGESIZE)" >> version.go.tmp
519 echo " MinFrameSize = $(GOARCH_MINFRAMESIZE)" >> version.go.tmp
520 echo ")" >> version.go.tmp
521 echo >> version.go.tmp
522 for a in $(ALLGOOS); do \
523 f=`echo $${a} | sed -e 's/\(.\).*/\1/' -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`; \
524 n="$${f}`echo $${a} | sed -e 's/.//'`"; \
525 if test "$${a}" = "$(GOOS)"; then \
526 echo "const Goos$${n} = 1" >> version.go.tmp; \
528 echo "const Goos$${n} = 0" >> version.go.tmp; \
531 echo >> version.go.tmp
532 echo "type Uintreg uintptr" >> version.go.tmp
533 $(SHELL) $(srcdir)/mvifdiff.sh version.go.tmp version.go
536 runtime_sysinfo.go: s-runtime_sysinfo; @true
537 s-runtime_sysinfo: $(srcdir)/mkrsysinfo.sh gen-sysinfo.go
538 GOARCH=$(GOARCH) GOOS=$(GOOS) $(SHELL) $(srcdir)/mkrsysinfo.sh
539 $(SHELL) $(srcdir)/mvifdiff.sh tmp-runtime_sysinfo.go runtime_sysinfo.go
542 sigtab.go: s-sigtab; @true
543 s-sigtab: $(srcdir)/mksigtab.sh gen-sysinfo.go
544 GOOS=$(GOOS) $(SHELL) $(srcdir)/mksigtab.sh > tmp-sigtab.go
545 $(SHELL) $(srcdir)/mvifdiff.sh tmp-sigtab.go sigtab.go
548 GCCGO_INSTALL_NAME := $(shell echo gccgo|sed '$(program_transform_name)')
549 GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
550 GXX_INSTALL_NAME := $(shell echo g++|sed '$(program_transform_name)')
552 zdefaultcc.go: s-zdefaultcc; @true
553 s-zdefaultcc: Makefile
554 echo 'package cfg' > zdefaultcc.go.tmp
555 echo >> zdefaultcc.go.tmp
556 echo 'const DefaultGCCGO = "$(bindir)/$(GCCGO_INSTALL_NAME)"' >> zdefaultcc.go.tmp
557 echo 'const DefaultCC = "$(GCC_INSTALL_NAME)"' >> zdefaultcc.go.tmp
558 echo 'const DefaultCXX = "$(GXX_INSTALL_NAME)"' >> zdefaultcc.go.tmp
559 echo 'const DefaultPkgConfig = "pkg-config"' >> zdefaultcc.go.tmp
560 $(SHELL) $(srcdir)/../move-if-change zdefaultcc.go.tmp zdefaultcc.go
563 # _Complex_lock and _Reader_lock are Go translations of some AIX system
564 # types and should not be exported back to C
565 # semt is a Go translation of the C type sem_t; it fails to convert on
566 # some systems and need not be exported back to C.
567 # sigset conflicts with system type sigset on AIX, so we need to rename it
568 runtime.inc: s-runtime-inc; @true
569 s-runtime-inc: runtime.lo Makefile
570 rm -f runtime.inc.tmp2 runtime.inc.tmp3
571 grep -v "#define _" runtime.inc.tmp | grep -v "#define [cm][01234] " | grep -v "#define empty " > runtime.inc.tmp2
572 for pattern in '_[GP][a-z]' _Max _Lock _Sig _Trace _MHeap _Num; do \
573 grep "#define $$pattern" runtime.inc.tmp >> runtime.inc.tmp2; \
575 for TYPE in _Complex_lock _Reader_lock semt; do \
576 sed -e '/struct '$${TYPE}' {/,/^}/s/^.*$$//' runtime.inc.tmp2 > runtime.inc.tmp3; \
577 mv runtime.inc.tmp3 runtime.inc.tmp2; \
579 sed -e 's/sigset/sigset_go/' runtime.inc.tmp2 > runtime.inc.tmp3
580 $(SHELL) $(srcdir)/mvifdiff.sh runtime.inc.tmp3 runtime.inc
581 rm -f runtime.inc.tmp2 runtime.inc.tmp3
584 noinst_DATA += zstdpkglist.go zdefaultcc.go
586 # Generate the list of go std packages that were included in libgo
587 zstdpkglist.go: s-zstdpkglist; @true
588 s-zstdpkglist: Makefile
589 rm -f zstdpkglist.go.tmp
590 echo 'package load' > zstdpkglist.go.tmp
591 echo "" >> zstdpkglist.go.tmp
592 echo 'var stdpkg = map[string]bool{' >> zstdpkglist.go.tmp
593 echo $(libgo_go_objs) 'unsafe.lo' 'runtime/cgo.lo' | sed 's|[a-z0-9_/]*_c\.lo||g' | sed 's|\([a-z0-9_/]*\)\.lo|"\1": true,|g' >> zstdpkglist.go.tmp
594 echo '}' >> zstdpkglist.go.tmp
595 $(SHELL) $(srcdir)/mvifdiff.sh zstdpkglist.go.tmp zstdpkglist.go
599 syscall_epoll_file = epoll.go
604 libcalls.go: s-libcalls; @true
605 s-libcalls: libcalls-list go/syscall/mksyscall.awk $(srcdir)/go/syscall/*.go
606 rm -f libcalls.go.tmp
607 $(AWK) -f $(srcdir)/go/syscall/mksyscall.awk `cat libcalls-list` > libcalls.go.tmp
608 $(SHELL) $(srcdir)/mvifdiff.sh libcalls.go.tmp libcalls.go
611 libcalls-list: s-libcalls-list; @true
612 s-libcalls-list: Makefile $(srcdir)/go/syscall/*.go
613 rm -f libcalls-list.tmp
614 $(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/syscall $(matchargs_syscall) > libcalls-list.tmp
615 $(SHELL) $(srcdir)/mvifdiff.sh libcalls-list.tmp libcalls-list
618 syscall_arch.go: s-syscall_arch; @true
619 s-syscall_arch: Makefile
620 rm -f syscall_arch.go.tmp
621 echo "package syscall" > syscall_arch.go.tmp
622 echo 'const ARCH = "'$(GOARCH)'"' >> syscall_arch.go.tmp
623 echo 'const OS = "'$(GOOS)'"' >> syscall_arch.go.tmp
624 $(SHELL) $(srcdir)/mvifdiff.sh syscall_arch.go.tmp syscall_arch.go
628 $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
629 $(CPPFLAGS) $(OSCFLAGS) -O
631 gen-sysinfo.go: s-gen-sysinfo; @true
632 s-gen-sysinfo: $(srcdir)/sysinfo.c config.h
633 $(CC) $(SYSINFO_FLAGS) -fdump-go-spec=tmp-gen-sysinfo.go -std=gnu99 -S -o sysinfo.s $(srcdir)/sysinfo.c
635 $(SHELL) $(srcdir)/mvifdiff.sh tmp-gen-sysinfo.go gen-sysinfo.go
638 errno.i: s-errno; @true
640 echo '#include <errno.h>' | $(CC) $(SYSINFO_FLAGS) -x c - -E -dM > tmp-errno.i
641 $(SHELL) $(srcdir)/mvifdiff.sh tmp-errno.i errno.i
644 sysinfo.go: s-sysinfo; @true
645 s-sysinfo: $(srcdir)/mksysinfo.sh gen-sysinfo.go errno.i
646 GOOS=$(GOOS) $(SHELL) $(srcdir)/mksysinfo.sh
647 $(SHELL) $(srcdir)/mvifdiff.sh tmp-sysinfo.go sysinfo.go
650 # The epoll struct has an embedded union and is packed on x86_64,
651 # which is too complicated for mksysinfo.sh. We find the offset of
652 # the only field we care about in configure.ac, and generate the
654 epoll.go: s-epoll; @true
657 echo 'package syscall' > epoll.go.tmp
658 echo 'type EpollEvent struct {' >> epoll.go.tmp
659 echo ' Events uint32' >> epoll.go.tmp
660 case "$(SIZEOF_STRUCT_EPOLL_EVENT),$(STRUCT_EPOLL_EVENT_FD_OFFSET)" in \
661 0,0) echo 1>&2 "*** struct epoll_event data.fd offset unknown"; \
663 8,4) echo ' Fd int32' >> epoll.go.tmp; ;; \
664 12,4) echo ' Fd int32' >> epoll.go.tmp; \
665 echo ' Pad [4]byte' >> epoll.go.tmp; ;; \
666 12,8) echo ' Pad [4]byte' >> epoll.go.tmp; \
667 echo ' Fd int32' >> epoll.go.tmp; ;; \
668 16,8) echo ' Pad [4]byte' >> epoll.go.tmp; \
669 echo ' Fd int32' >> epoll.go.tmp; \
670 echo ' Pad2 [4]byte' >> epoll.go.tmp; ;; \
671 *) echo 1>&2 "*** struct epoll_event unsupported"; \
674 echo '}' >> epoll.go.tmp
675 $(SHELL) $(srcdir)/mvifdiff.sh epoll.go.tmp epoll.go
679 syscall_lib_clone_lo = syscall/clone_linux.lo
681 syscall_lib_clone_lo =
706 crypto/internal/cipherhw \
719 database/sql/driver \
751 go/internal/gccgoimporter \
752 go/internal/gcimporter \
753 go/internal/srcimporter \
759 golang_org/x/crypto/chacha20poly1305 \
760 golang_org/x/crypto/chacha20poly1305/internal/chacha20 \
761 golang_org/x/crypto/curve25519 \
762 golang_org/x/crypto/poly1305 \
763 golang_org/x/net/http2/hpack \
764 golang_org/x/net/idna \
765 golang_org/x/net/lex/httplex \
766 golang_org/x/net/proxy \
767 golang_org/x/text/secure/bidirule \
768 golang_org/x/text/transform \
769 golang_org/x/text/unicode/bidi \
770 golang_org/x/text/unicode/norm \
771 golang_org/x/text/width \
781 image/color/palette \
784 image/internal/imageutil \
791 internal/singleflight \
792 internal/syscall/unix \
806 mime/quotedprintable \
817 net/internal/socktest \
835 runtime/internal/atomic \
836 runtime/internal/sys \
838 runtime/pprof/internal/profile \
847 testing/internal/testdeps \
853 text/template/parse \
860 $(addsuffix .lo,$(PACKAGES)) \
862 reflect/makefunc_ffi_c.lo \
864 $(syscall_lib_clone_lo) \
868 $(golang_org_x_net_lif_lo) \
869 $(golang_org_x_net_route_lo) \
870 log/syslog/syslog_c.lo \
871 $(os_lib_inotify_lo) \
872 runtime/internal/atomic_c.lo \
876 -version-info $(libtool_VERSION) $(PTHREAD_CFLAGS) $(AM_LDFLAGS)
879 $(libgo_go_objs) ../libbacktrace/libbacktrace.la \
880 $(LIBATOMIC) $(LIBFFI) $(PTHREAD_LIBS) $(MATH_LIBS) $(NET_LIBS)
882 libgo_la_SOURCES = $(runtime_files)
883 libgo_la_LDFLAGS = $(libgo_ldflags)
884 libgo_la_LIBADD = $(libgo_libadd)
886 libgo_llgo_la_SOURCES = $(runtime_files)
887 libgo_llgo_la_LDFLAGS = $(libgo_ldflags)
888 libgo_llgo_la_LIBADD = $(libgo_libadd)
890 libgobegin_a_SOURCES = \
893 libgobegin_llgo_a_SOURCES = \
896 # Use -fPIC for libgobegin so that it can be put in a PIE.
897 libgobegin_a_CFLAGS = $(AM_CFLAGS) -fPIC
898 libgobegin_llgo_a_CFLAGS = $(AM_CFLAGS) -fPIC
900 libgolibbegin_a_SOURCES = \
903 libgolibbegin_a_CFLAGS = $(AM_CFLAGS) -fPIC
906 cmd/go/internal/base \
907 cmd/go/internal/bug \
908 cmd/go/internal/buildid \
909 cmd/go/internal/cfg \
910 cmd/go/internal/clean \
911 cmd/go/internal/cmdflag \
912 cmd/go/internal/doc \
913 cmd/go/internal/envcmd \
914 cmd/go/internal/fix \
915 cmd/go/internal/fmtcmd \
916 cmd/go/internal/generate \
917 cmd/go/internal/get \
918 cmd/go/internal/help \
919 cmd/go/internal/list \
920 cmd/go/internal/load \
921 cmd/go/internal/run \
922 cmd/go/internal/str \
923 cmd/go/internal/test \
924 cmd/go/internal/tool \
925 cmd/go/internal/version \
926 cmd/go/internal/vet \
927 cmd/go/internal/web \
928 cmd/go/internal/work \
929 cmd/internal/browser \
932 libgotool_a_SOURCES =
933 libgotool_a_DEPENDENCIES = $(addsuffix .lo,$(GOTOOL_PACKAGES))
934 libgotool_a_LIBADD = $(addsuffix .o,$(GOTOOL_PACKAGES))
936 define STATIC_template
937 $(subst -,_,$(subst .,_,$(subst /,_,$(1))))_GOCFLAGS = -static
940 $(foreach package,$(GOTOOL_PACKAGES),$(eval $(call STATIC_template,$(package).lo)))
942 # Make sure runtime.inc is built before compiling any .c file.
943 $(libgo_la_OBJECTS): runtime.inc
944 $(libgo_llgo_la_OBJECTS): runtime.inc
945 $(libgobegin_a_OBJECTS): runtime.inc
946 $(libgobegin_llgo_a_OBJECTS): runtime.inc
947 $(libgolibbegin_a_OBJECTS): runtime.inc
949 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
952 AM_GOCFLAGS = $(STRINGOPS_FLAG) $(GO_SPLIT_STACK)
953 GOCOMPILE = $(GOC) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_GOCFLAGS) $(GOCFLAGS)
955 LTGOCOMPILE = $(LIBTOOL) --tag GO --mode=compile $(GOC) $(INCLUDES) \
956 $(AM_GOCFLAGS) $(GOCFLAGS)
958 GOLINK = $(LIBTOOL) --tag GO --mode-link $(GOC) \
959 $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_GOCFLAGS) $(LTLDFLAGS) -o $@
961 # Build the dependencies for a Go package.
964 dir=`echo $@ | sed -e 's/.lo.dep$$//'`; \
965 files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$$dir --extrafiles="$(extra_go_files_$(subst /,_,$(subst .lo.dep,,$@)))" $(matchargs_$(subst /,_,$(subst .lo.dep,,$@)))`; \
966 $(SHELL) $(srcdir)/godeps.sh `echo $@ | sed -e 's/.dep$$//'` $$files > $@.tmp; \
967 if ! cmp $@.tmp $@ >/dev/null 2>/dev/null; then \
968 rm -f `echo $@ | sed -e 's/\.dep$$//'`; \
972 # Build the .go files for a package, generating a .lo file.
975 files=`echo $^ | sed -e 's/[^ ]*\.gox//g' -e 's/[^ ]*\.dep//'`; \
976 $(LTGOCOMPILE) -I . -c -fgo-pkgpath=`echo $@ | sed -e 's/.lo$$//' -e 's|golang_org|vendor/golang_org|'` $($(subst -,_,$(subst .,_,$(subst /,_,$@)))_GOCFLAGS) -o $@ $$files
978 # How to build a .gox file from a .lo file.
979 # Matching .o file can either be in the same directory as the .lo (non-PIC
980 # object) or in the .libs directory (PIC object).
982 f="$(basename $<).o"; \
983 if test ! -f $$f; then \
984 f="$(basename $(<D)/.libs/$(<F)).o"; \
986 $(OBJCOPY) -j .go_export $$f $@.tmp; \
987 $(SHELL) $(srcdir)/mvifdiff.sh $@.tmp `echo $@ | sed -e 's/s-gox/gox/'`
994 GC="$(GOC) $(GOCFLAGS) $($(subst /,_,$@)_GOCFLAGS) -L `${PWD_COMMAND}` -L `${PWD_COMMAND}`/.libs"; \
996 GOLIBS="$(extra_check_libs_$(subst /,_,$(@D))) $(MATH_LIBS) $(NET_LIBS) $(LIBS)"; \
998 RUNTESTFLAGS="$(RUNTESTFLAGS)"; \
999 export RUNTESTFLAGS; \
1004 libgccdir=`${GOC} -print-libgcc-file-name | sed -e 's|/[^/]*$$||'`; \
1005 LD_LIBRARY_PATH="`${PWD_COMMAND}`/.libs:$${libgccdir}:${LD_LIBRARY_PATH}"; \
1006 LD_LIBRARY_PATH=`echo $${LD_LIBRARY_PATH} | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; \
1007 export LD_LIBRARY_PATH; \
1009 rm -f $@-testsum $@-testlog; \
1010 files=`$(SHELL) $(srcdir)/match.sh --goarch=$(GOARCH) --goos=$(GOOS) --srcdir=$(srcdir)/go/$(@D) --extrafiles="$(extra_go_files_$(subst /,_,$(@D)))" $(matchargs_$(subst /,_,$(@D)))`; \
1011 if test "$(USE_DEJAGNU)" = "yes"; then \
1012 $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --dejagnu=yes --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" --testname="$(@D)" $(GOTESTFLAGS); \
1013 elif test "$(GOBENCH)" != ""; then \
1014 $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" --bench="$(GOBENCH)" $(GOTESTFLAGS); \
1016 if $(SHELL) $(srcdir)/testsuite/gotest --goarch=$(GOARCH) --goos=$(GOOS) --basedir=$(srcdir) --srcdir=$(srcdir)/go/$(@D) --pkgpath="$(@D)" --pkgfiles="$$files" $(GOTESTFLAGS) >>$@-testlog 2>&1; then \
1017 echo "PASS: $(@D)" >> $@-testlog; \
1018 echo "PASS: $(@D)"; \
1019 echo "PASS: $(@D)" > $@-testsum; \
1021 echo "FAIL: $(@D)" >> $@-testlog; \
1023 echo "FAIL: $(@D)" > $@-testsum; \
1028 # Build all packages before checking any.
1030 $(toolexeclibgo_DATA) \
1031 $(toolexeclibgoarchive_DATA) \
1032 $(toolexeclibgocompress_DATA) \
1033 $(toolexeclibgocontainer_DATA) \
1034 $(toolexeclibgocrypto_DATA) \
1035 $(toolexeclibgodebug_DATA) \
1036 $(toolexeclibgoencoding_DATA) \
1037 $(toolexeclibgoexp_DATA) \
1038 $(toolexeclibgogo_DATA) \
1039 $(toolexeclibgohash_DATA) \
1040 $(toolexeclibgoimage_DATA) \
1041 $(toolexeclibgoindex_DATA) \
1042 $(toolexeclibgoio_DATA) \
1043 $(toolexeclibgolog_DATA) \
1044 $(toolexeclibgomath_DATA) \
1045 $(toolexeclibgomime_DATA) \
1046 $(toolexeclibgonet_DATA) \
1047 $(toolexeclibgonethttp_DATA) \
1048 $(toolexeclibgoos_DATA) \
1049 $(toolexeclibgopath_DATA) \
1050 $(toolexeclibgorpc_DATA) \
1051 $(toolexeclibgoruntime_DATA) \
1052 $(toolexeclibgosync_DATA) \
1053 $(toolexeclibgotesting_DATA) \
1054 $(toolexeclibgotext_DATA) \
1055 $(toolexeclibgotexttemplate_DATA) \
1056 $(toolexeclibgounicode_DATA) \
1060 CHECK_DEPS += libgo-llgo.la libgobegin-llgo.a
1062 CHECK_DEPS += libgo.la libgobegin.a
1065 # PACKAGE_template defines the rules for each package.
1066 # For example, for the package bufio, it produces:
1068 # @go_include@ bufio.lo.dep
1069 # bufio.lo.dep: $(srcdir)/go/bufio/*.go
1073 # bufio/check: $(CHECK_DEPS)
1075 # .PHONY: bufio/check
1077 # This is invoked with $(1) set to a package, which is a directory name,
1078 # such as "bufio" or "archive/tar".
1079 define PACKAGE_template
1080 @go_include@ $(1).lo.dep
1081 $(1).lo.dep: $(srcdir)/go/$(1)/*.go
1085 $(1)/check: $$(CHECK_DEPS)
1088 $(1).gox: $(1).s-gox; @true
1094 # This line expands PACKAGE_template once for each package name listed
1096 $(foreach package,$(PACKAGES),$(eval $(call PACKAGE_template,$(package))))
1097 $(foreach package,$(GOTOOL_PACKAGES),$(eval $(call PACKAGE_template,$(package))))
1099 # Pass -ffp-contract=off, or 386-specific options, when building the
1100 # math package. MATH_FLAG is defined in configure.ac.
1101 math_lo_GOCFLAGS = $(MATH_FLAG)
1103 # Add the generated file runtime_sysinfo.go to the runtime package.
1104 extra_go_files_runtime = runtime_sysinfo.go sigtab.go
1105 runtime.lo.dep: $(extra_go_files_runtime)
1107 # Add generated files to the syscall package.
1108 extra_go_files_syscall = \
1112 $(syscall_epoll_file)
1113 syscall.lo.dep: $(extra_go_files_syscall)
1115 # Pass -fgo-compiling-runtime when compiling the runtime package.
1116 runtime_lo_GOCFLAGS = -fgo-c-header=runtime.inc.tmp -fgo-compiling-runtime
1117 runtime_check_GOCFLAGS = -fgo-compiling-runtime
1118 runtime_internal_atomic_lo_GOCFLAGS = -fgo-compiling-runtime
1119 runtime_internal_atomic_lo_check_GOCFLAGS = -fgo-compiling-runtime
1120 runtime_internal_sys_lo_GOCFLAGS = -fgo-compiling-runtime
1121 runtime_internal_sys_lo_check_GOCFLAGS = -fgo-compiling-runtime
1123 # If libffi is supported (the normal case) use the ffi build tag for
1124 # the runtime package.
1126 matchargs_runtime = --tag=libffi
1131 # At least for now, we need -static-libgo for this test, because
1132 # otherwise we can't get the line numbers.
1133 # Also use -fno-inline to get better results from the memory profiler.
1134 runtime_pprof_check_GOCFLAGS = -static-libgo -fno-inline
1136 extra_go_files_runtime_internal_sys = version.go
1137 runtime/internal/sys.lo.dep: $(extra_go_files_runtime_internal_sys)
1139 extra_go_files_cmd_go_internal_cfg = zdefaultcc.go
1140 cmd/go/internal/cfg.lo.dep: $(extra_go_files_cmd_go_internal_cfg)
1142 extra_go_files_cmd_go_internal_load = zstdpkglist.go
1143 cmd/go/internal/load.lo.dep: $(extra_go_files_cmd_go_internal_load)
1145 extra_check_libs_cmd_go_internal_generate = $(abs_builddir)/libgotool.a
1146 extra_check_libs_cmd_go_internal_get = $(abs_builddir)/libgotool.a
1147 extra_check_libs_cmd_go_internal_load = $(abs_builddir)/libgotool.a
1148 extra_check_libs_cmd_go_internal_work = $(abs_builddir)/libgotool.a
1150 # FIXME: The following C files may as well move to the runtime
1151 # directory and be treated like other C files.
1153 # Use C code to speed up {bytes,strings}.IndexByte and friends.
1154 bytes/index.lo: go/bytes/indexbyte.c runtime.inc
1156 $(LTCOMPILE) -c -o $@ $(srcdir)/go/bytes/indexbyte.c
1157 strings/index.lo: go/strings/indexbyte.c runtime.inc
1159 $(LTCOMPILE) -c -o $@ $(srcdir)/go/strings/indexbyte.c
1161 # Use a C function with a fixed number of arguments to call a C
1163 log/syslog/syslog_c.lo: go/log/syslog/syslog_c.c runtime.inc
1164 @$(MKDIR_P) log/syslog
1165 $(LTCOMPILE) -c -o $@ $(srcdir)/go/log/syslog/syslog_c.c
1167 # The interface to libffi from the reflect package is written in C.
1168 reflect/makefunc_ffi_c.lo: go/reflect/makefunc_ffi_c.c runtime.inc
1170 $(LTCOMPILE) -c -o $@ $(srcdir)/go/reflect/makefunc_ffi_c.c
1172 # The atomic functions are written in C.
1173 runtime/internal/atomic_c.lo: go/runtime/internal/atomic/atomic.c runtime.inc
1174 @$(MKDIR_P) runtime/internal
1175 $(LTCOMPILE) -c -o $@ $(srcdir)/go/runtime/internal/atomic/atomic.c
1176 sync/atomic_c.lo: go/sync/atomic/atomic.c runtime.inc
1178 $(LTCOMPILE) -c -o $@ $(srcdir)/go/sync/atomic/atomic.c
1180 # A few syscall functions are written in C.
1181 syscall/clone_linux.lo: go/syscall/clone_linux.c runtime.inc
1183 $(LTCOMPILE) -c -o $@ $(srcdir)/go/syscall/clone_linux.c
1184 syscall/errno.lo: go/syscall/errno.c runtime.inc
1186 $(LTCOMPILE) -c -o $@ $(srcdir)/go/syscall/errno.c
1187 syscall/signame.lo: go/syscall/signame.c runtime.inc
1189 $(LTCOMPILE) -c -o $@ $(srcdir)/go/syscall/signame.c
1190 syscall/wait.lo: go/syscall/wait.c runtime.inc
1192 $(LTCOMPILE) -c -o $@ $(srcdir)/go/syscall/wait.c
1194 # Solaris 12 changed the type of fields in struct stat.
1195 # Use a build tag, based on a configure check, to cope.
1197 if HAVE_STAT_TIMESPEC
1198 matchargs_os = --tag=solaristag
1208 # Build golang_org/x/net/route only on BSD systems.
1210 $(eval $(call PACKAGE_template,golang_org/x/net/route))
1212 golang_org_x_net_route_lo = \
1213 golang_org/x/net/route.lo
1214 golang_org_x_net_route_check = \
1215 golang_org/x/net/route/check
1221 # Build golang_org/x/net/lif only on Solaris systems.
1223 $(eval $(call PACKAGE_template,golang_org/x/net/lif))
1225 golang_org_x_net_lif_lo = \
1226 golang_org/x/net/lif.lo
1227 golang_org_x_net_lif_check = \
1228 golang_org/x/net/lif/check
1261 cmd/go/internal/generate/check \
1262 cmd/go/internal/get/check \
1263 cmd/go/internal/load/check \
1264 cmd/go/internal/work/check \
1265 cmd/internal/objabi/check \
1266 compress/bzip2/check \
1267 compress/flate/check \
1268 compress/gzip/check \
1269 compress/lzw/check \
1270 compress/zlib/check \
1271 container/heap/check \
1272 container/list/check \
1273 container/ring/check \
1275 crypto/cipher/check \
1278 crypto/ecdsa/check \
1279 crypto/elliptic/check \
1286 crypto/sha256/check \
1287 crypto/sha512/check \
1288 crypto/subtle/check \
1291 database/sql/check \
1292 database/sql/driver/check \
1297 debug/plan9obj/check \
1299 encoding/ascii85/check \
1300 encoding/asn1/check \
1301 encoding/base32/check \
1302 encoding/base64/check \
1303 encoding/binary/check \
1304 encoding/csv/check \
1305 encoding/gob/check \
1306 encoding/hex/check \
1307 encoding/json/check \
1308 encoding/pem/check \
1309 encoding/xml/check \
1311 exp/terminal/check \
1312 html/template/check \
1318 go/internal/gcimporter/check \
1319 go/internal/gccgoimporter/check \
1320 go/internal/srcimporter/check \
1326 golang_org/x/crypto/chacha20poly1305/check \
1327 golang_org/x/crypto/chacha20poly1305/internal/chacha20/check \
1328 golang_org/x/crypto/curve25519/check \
1329 golang_org/x/crypto/poly1305/check \
1330 golang_org/x/net/http2/hpack/check \
1331 golang_org/x/net/idna/check \
1332 golang_org/x/net/lex/httplex/check \
1333 $(golang_org_x_net_lif_check) \
1334 golang_org/x/net/proxy/check \
1335 $(golang_org_x_net_route_check) \
1336 hash/adler32/check \
1344 index/suffixarray/check \
1345 internal/poll/check \
1346 internal/singleflight/check \
1347 internal/trace/check \
1354 mime/multipart/check \
1355 mime/quotedprintable/check \
1357 net/http/cgi/check \
1358 net/http/cookiejar/check \
1359 net/http/fcgi/check \
1360 net/http/httptest/check \
1361 net/http/httptrace/check \
1362 net/http/httputil/check \
1363 net/http/internal/check \
1364 net/internal/socktest/check \
1368 net/textproto/check \
1370 net/rpc/jsonrpc/check \
1374 path/filepath/check \
1375 regexp/syntax/check \
1376 runtime/debug/check \
1377 runtime/internal/atomic/check \
1378 runtime/internal/sys/check \
1379 runtime/pprof/check \
1380 runtime/pprof/internal/profile/check \
1381 runtime/trace/check \
1383 text/scanner/check \
1384 text/tabwriter/check \
1385 text/template/check \
1386 text/template/parse/check \
1387 testing/quick/check \
1388 unicode/utf16/check \
1392 check-recursive: check-head
1395 @echo "Test Run By $${USER} on `date`" > libgo.head
1396 @echo "Native configuration is $(host_triplet)" >> libgo.head
1398 @echo " === libgo tests ===" >> libgo.head
1401 check-tail: check-recursive check-multi
1402 @if test "$(USE_DEJAGNU)" = "yes"; then \
1405 lib=`${PWD_COMMAND} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
1406 for dir in . $(MULTIDIRS); do \
1407 mv ../$${dir}/$${lib}/libgo.sum ../$${dir}/$${lib}/libgo.sum.sep; \
1408 mv ../$${dir}/$${lib}/libgo.log ../$${dir}/$${lib}/libgo.log.sep; \
1410 mv libgo.head libgo.sum; \
1411 cp libgo.sum libgo.log; \
1412 echo "Schedule of variations:" >> libgo.sum; \
1413 for dir in . $(MULTIDIRS); do \
1414 multidir=../$${dir}/$${lib}; \
1415 multivar=`cat $${multidir}/libgo.var`; \
1416 echo " $${multivar}" >> libgo.sum; \
1418 echo >> libgo.sum; \
1419 pass=0; fail=0; untested=0; \
1420 for dir in . $(MULTIDIRS); do \
1421 multidir=../$${dir}/$${lib}; \
1422 multivar=`cat $${multidir}/libgo.var`; \
1423 echo "Running target $${multivar}" >> libgo.sum; \
1424 echo "Running $(srcdir)/libgo.exp ..." >> libgo.sum; \
1425 cat $${multidir}/libgo.sum.sep >> libgo.sum; \
1426 cat $${multidir}/libgo.log.sep >> libgo.log; \
1427 if test -n "${MULTIDIRS}"; then \
1428 echo " === libgo Summary for $${multivar} ===" >> libgo.sum; \
1429 echo >> libgo.sum; \
1431 p=`grep -c PASS $${multidir}/libgo.sum.sep`; \
1432 pass=`expr $$pass + $$p`; \
1433 if test "$$p" -ne "0" && test -n "${MULTIDIRS}"; then \
1434 echo "# of expected passes $$p" >> libgo.sum; \
1436 p=`grep -c FAIL $${multidir}/libgo.sum.sep`; \
1437 fail=`expr $$fail + $$p`; \
1438 if test "$$p" -ne "0" && test -n "${MULTIDIRS}"; then \
1439 echo "# of unexpected failures $$p" >> libgo.sum; \
1441 p=`grep -c UNTESTED $${multidir}/libgo.sum.sep`; \
1442 untested=`expr $$untested + $$p`; \
1443 if test "$$p" -ne "0" && test -n "${MULTIDIRS}"; then \
1444 echo "# of untested testcases $$p" >> libgo.sum; \
1447 echo >> libgo.sum; \
1448 echo " === libgo Summary ===" >> libgo.sum; \
1449 echo >> libgo.sum; \
1450 if test "$$pass" -ne "0"; then \
1451 echo "# of expected passes $$pass" >> libgo.sum; \
1453 if test "$$fail" -ne "0"; then \
1454 echo "# of unexpected failures $$fail" >> libgo.sum; \
1456 if test "$$untested" -ne "0"; then \
1457 echo "# of untested testcases $$untested" >> libgo.sum; \
1459 echo `echo $(GOC) | sed -e 's/ .*//'` `$(GOC) -v 2>&1 | grep " version" | sed -n -e 's/.* \(version.*$$\)/\1/p'` >> libgo.sum; \
1460 echo >> libgo.log; \
1461 echo "runtest completed at `date`" >> libgo.log; \
1462 if test "$$fail" -ne "0"; then \
1470 @rm -f libgo.sum libgo.log libgo.tail
1472 [ -z "$(MULTIFLAGS)" ] || multivar="$${multivar}/$(MULTIFLAGS)"; \
1473 echo "$${multivar}" > libgo.var
1474 @for f in $(TEST_PACKAGES); do \
1475 rm -f $$f-testsum $$f-testlog; \
1477 -@$(MAKE) -k $(TEST_PACKAGES)
1478 @for f in $(TEST_PACKAGES); do \
1479 if test -f $$f-testsum; then \
1480 cat $$f-testsum >> libgo.sum; \
1482 if test -f $$f-testlog; then \
1483 cat $$f-testlog >> libgo.log; \
1488 $(MULTIDO) $(AM_MAKEFLAGS) DO=check-am multi-do # $(MAKE)
1491 -@$(MAKE) -k $(TEST_PACKAGES) GOBENCH=.
1493 MOSTLYCLEANFILES = \
1494 s-runtime_sysinfo s-sigtab s-runtime-inc s-zstdpkglist \
1495 s-libcalls s-libcalls-list s-syscall_arch s-gen-sysinfo s-sysinfo \
1497 libgo.head libgo.sum.sep libgo.log.sep libgo.var \
1498 libcalls-list runtime.inc runtime.inc.tmp2 runtime.inc.tmp3
1501 find . -name '*.lo' -print | xargs $(LIBTOOL) --mode=clean rm -f
1502 find . -name '*.$(OBJEXT)' -print | xargs rm -f
1503 find . -name '*-testsum' -print | xargs rm -f
1504 find . -name '*-testlog' -print | xargs rm -f
1506 CLEANFILES = *.go *.c s-* libgo.sum libgo.log runtime.inc
1509 find . -name '*.la' -print | xargs $(LIBTOOL) --mode=clean rm -f
1510 find . -name '*.a' -print | xargs rm -f
1511 find . -name '*.gox' -print | xargs rm -f
1512 find . -name '*.s-gox' -print | xargs rm -f
1515 find . -name '*.lo.dep' -print | xargs rm -f