Added support for the new #cgo directive, which means it's
now goinstall-able.
diff --git a/Makefile b/Makefile
index 4752710..ff7b1a4 100644
--- a/Makefile
+++ b/Makefile
@@ -22,9 +22,6 @@
 	writer.o\
 	emitter.o\
 
-CGO_LDFLAGS+=-lm -lpthread
-CGO_CFLAGS+=-I. -DHAVE_CONFIG_H=1
-
 GOFMT=gofmt -spaces=true -tabwidth=4 -tabindent=false
 
 BADFMT:=$(shell $(GOFMT) -l $(GOFILES) $(CGOFILES) $(wildcard *_test.go))
diff --git a/decode.go b/decode.go
index e3749ef..e8da5dd 100644
--- a/decode.go
+++ b/decode.go
@@ -1,5 +1,8 @@
 package goyaml
 
+// #cgo LDFLAGS: -lm -lpthread
+// #cgo CFLAGS: -I. -DHAVE_CONFIG_H=1
+//
 // #include "helpers.h"
 import "C"