summaryrefslogtreecommitdiff
path: root/src/pkg/net/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/net/Makefile')
-rw-r--r--src/pkg/net/Makefile22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/pkg/net/Makefile b/src/pkg/net/Makefile
index 7ce650279..221871cb1 100644
--- a/src/pkg/net/Makefile
+++ b/src/pkg/net/Makefile
@@ -6,7 +6,6 @@ include ../../Make.inc
TARG=net
GOFILES=\
- cgo_stub.go\
dial.go\
dnsmsg.go\
fd_$(GOOS).go\
@@ -31,6 +30,10 @@ GOFILES_freebsd=\
dnsclient.go\
port.go\
+CGOFILES_freebsd=\
+ cgo_bsd.go\
+ cgo_unix.go\
+
GOFILES_darwin=\
newpollserver.go\
fd.go\
@@ -38,6 +41,10 @@ GOFILES_darwin=\
dnsconfig.go\
dnsclient.go\
port.go\
+
+CGOFILES_darwin=\
+ cgo_bsd.go\
+ cgo_unix.go\
GOFILES_linux=\
newpollserver.go\
@@ -47,10 +54,23 @@ GOFILES_linux=\
dnsclient.go\
port.go\
+ifeq ($(GOARCH),arm)
+# ARM has no cgo, so use the stubs.
+GOFILES_linux+=cgo_stub.go
+else
+CGOFILES_linux=\
+ cgo_linux.go\
+ cgo_unix.go
+endif
+
GOFILES_windows=\
+ cgo_stub.go\
resolv_windows.go\
file_windows.go\
GOFILES+=$(GOFILES_$(GOOS))
+ifneq ($(CGOFILES_$(GOOS)),)
+CGOFILES+=$(CGOFILES_$(GOOS))
+endif
include ../../Make.pkg