diff options
Diffstat (limited to 'ttcommon/Util/Clooper/Makefile')
-rw-r--r-- | ttcommon/Util/Clooper/Makefile | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/ttcommon/Util/Clooper/Makefile b/ttcommon/Util/Clooper/Makefile new file mode 100644 index 0000000..1a5a3c1 --- /dev/null +++ b/ttcommon/Util/Clooper/Makefile @@ -0,0 +1,32 @@ +CC=gcc + + +ARCH_OUT = $(shell arch) + +CSOUND_ARCH = $(shell if [ -z "$(shell arch | grep arm)" ]; then \ + echo $(ARCH_OUT) | grep 64 >/dev/null && echo linux64 || echo linux32; \ + else \ + echo $(ARCH_OUT); \ + fi) + +CSOUND_VERSION = $(shell csound --version 2>&1 | grep -o "Csound version [0-9]\+\.[0-9]\+" | awk '{print $$3}' | sed s/\\.//g) +LIB_NAME = $(CSOUND_ARCH)_$(CSOUND_VERSION) + +CXXFLAGS = $(shell python-config --cflags) \ + -Wall -Werror -fPIC -O2 -finline +LDFLAGS+= $(python-config --libs) \ + -lcsound + +all : aclient.so + rm -rf $(LIB_NAME) + mkdir $(LIB_NAME) + strip aclient.so + mv aclient.so $(LIB_NAME)/ + touch $(LIB_NAME)/__init__.py + +aclient.so : aclient.cpp + g++ $(CXXFLAGS) -shared -o $@ $< $(LDFLAGS) + +clean : + rm aclient*.so + |