initial commit

This commit is contained in:
2020-09-04 19:32:12 +02:00
commit 903f8fe99a
7 changed files with 372 additions and 0 deletions

18
Makefile Normal file
View File

@@ -0,0 +1,18 @@
CFLAGS = -c -O2 -Wall -fPIC
all: ts3_plugin.so
tsgo_export.h: src/go/tsgo_export.go
C_INCLUDE_PATH="ts3client-pluginsdk/include:src/c" go tool cgo -exportheader $@ $^
tsgo_export.a: src/go/tsgo_export.go plugin.o
CGO_CFLAGS="-Its3client-pluginsdk/include -Isrc/c" go build -buildmode=c-archive src/go/tsgo_export.go
plugin.o: src/c/plugin.c tsgo_export.h
gcc src/c/plugin.c -o plugin.o -Its3client-pluginsdk/include -Isrc/c $(CFLAGS)
ts3_plugin.so: plugin.o tsgo_export.a
gcc -o $@ -shared -lpthread $^
clean:
rm -rf plugin.o tsgo_export.a tsgo_export.h _cgo_export.h ts3_plugin.so _obj