summaryrefslogtreecommitdiff
path: root/src/libcgo/Makefile
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-08-24 17:30:00 -0700
committerRuss Cox <rsc@golang.org>2009-08-24 17:30:00 -0700
commitb5581bb7ceb7984d71d4a1fe845deb77cf8a697b (patch)
treed050621c48935fe92a55747351ede747cb1c210f /src/libcgo/Makefile
parent83b749573cef6ceeac24202b3bc14d2860828490 (diff)
downloadgolang-b5581bb7ceb7984d71d4a1fe845deb77cf8a697b.tar.gz
start of FFI support, and a demo.
R=r DELTA=494 (492 added, 0 deleted, 2 changed) OCL=33784 CL=33810
Diffstat (limited to 'src/libcgo/Makefile')
-rw-r--r--src/libcgo/Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/libcgo/Makefile b/src/libcgo/Makefile
new file mode 100644
index 000000000..6fbfeb067
--- /dev/null
+++ b/src/libcgo/Makefile
@@ -0,0 +1,24 @@
+# Copyright 2009 The Go Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+
+# not linked into build for now
+
+TARG=libcgo.so
+
+all: libcgo.so
+
+cgocall.o: cgocall.c
+ gcc -O2 -fPIC -o cgocall.o -c cgocall.c
+
+libcgo.so: cgocall.o
+ gcc -shared -o libcgo.so cgocall.o -lpthread -lm
+
+install: $(GOROOT)/pkg/$(GOOS)_$(GOARCH)/libcgo.so
+
+$(GOROOT)/pkg/$(GOOS)_$(GOARCH)/libcgo.so: libcgo.so
+ cp libcgo.so $@
+
+clean:
+ rm -f *.o *.so
+