From 0d589f7abe472be1905fbd2a905104ea62385bbf Mon Sep 17 00:00:00 2001 From: Bryan Matsuo Date: Tue, 2 Aug 2011 22:48:27 -0700 Subject: [PATCH] Replace pkg-config with sdl-config strategically inserted in Makefiles. --- mixer/Makefile | 3 +++ mixer/chunks.go | 1 - ttf/Makefile | 3 +++ ttf/ttf.go | 1 - 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mixer/Makefile b/mixer/Makefile index c19be16..4b2d8ef 100644 --- a/mixer/Makefile +++ b/mixer/Makefile @@ -9,6 +9,9 @@ TARG=sdl/mixer GOFILES:=constants.go CGOFILES:=mixer.go chunks.go +CGO_CFLAGS:=`sdl-config --cflags` +CGO_LDFLAGS:=`sdl-config --libs` + ifeq ($(GOOS),freebsd) CGO_CFLAGS:=-I/usr/local/include CGO_LDFLAGS:=-lSDL_mixer -L/usr/local/lib diff --git a/mixer/chunks.go b/mixer/chunks.go index f27d7a7..b7187be 100644 --- a/mixer/chunks.go +++ b/mixer/chunks.go @@ -7,7 +7,6 @@ functions have been changed to be in a more object-oriented style */ package mixer -// #cgo pkg-config: SDL_mixer // #include "SDL_mixer.h" import "C" import "unsafe" diff --git a/ttf/Makefile b/ttf/Makefile index 37b5931..4703bee 100644 --- a/ttf/Makefile +++ b/ttf/Makefile @@ -9,6 +9,9 @@ TARG=sdl/ttf GOFILES:=constants.go CGOFILES:=ttf.go +CGO_CFLAGS:=`sdl-config --cflags` +CGO_LDFLAGS:=`sdl-config --libs` + ifeq ($(GOOS),freebsd) CGO_CFLAGS:=-I/usr/local/include CGO_LDFLAGS:=-lSDL_ttf -L/usr/local/lib diff --git a/ttf/ttf.go b/ttf/ttf.go index 8494387..045ea81 100644 --- a/ttf/ttf.go +++ b/ttf/ttf.go @@ -7,7 +7,6 @@ that work with loaded fonts are changed to have a more object-oriented feel. */ package ttf -// #cgo pkg-config: SDL_ttf // #cgo LDFLAGS: -lSDL_ttf // #include "SDL_ttf.h" import "C"