goat3d

diff exporters/blendgoat/Makefile @ 36:9a211986a28b

writing the blender plugin
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 06 Oct 2013 15:34:45 +0300
parents
children 60f2037680ee
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/exporters/blendgoat/Makefile	Sun Oct 06 15:34:45 2013 +0300
     1.3 @@ -0,0 +1,33 @@
     1.4 +scriptfile = blendgoat.py
     1.5 +scriptfile_path := $(shell pwd)/src/$(scriptfile)
     1.6 +
     1.7 +ifeq ($(shell uname -s), Darwin)
     1.8 +	cfgpath = $(HOME)/Library/Application\ Support/Blender
     1.9 +else
    1.10 +	cfgpath = $(HOME)/.config/blender/
    1.11 +endif
    1.12 +
    1.13 +.PHONY: all
    1.14 +all:
    1.15 +	@echo Just type \"$(MAKE) install\" to install the blender exporter.
    1.16 +	@echo Also make sure you have installed the main libgoat3d library.
    1.17 +
    1.18 +.PHONY: install
    1.19 +install:
    1.20 +	@cd $(cfgpath) && \
    1.21 +	for i in *; do \
    1.22 +		echo "installing src/$(scriptfile) -> $(cfgpath)/$$i/scripts/addons/$(scriptfile)"; \
    1.23 +		mkdir -p $$i/scripts/addons; \
    1.24 +		rm -f $$i/scripts/addons/$(scriptfile); \
    1.25 +		cp $(scriptfile_path) $$i/scripts/addons/$(scriptfile); \
    1.26 +	done
    1.27 +
    1.28 +.PHONY: link
    1.29 +link:
    1.30 +	cd $(cfgpath) && \
    1.31 +	for i in *; do \
    1.32 +		echo "linking src/$(scriptfile) to $(cfgpath)/$$i/scripts/addons/$(scriptfile)"; \
    1.33 +		mkdir -p $$i/scripts/addons; \
    1.34 +		rm -f $$i/scripts/addons/$(scriptfile); \
    1.35 +		ln -s $(scriptfile_path) $$i/scripts/addons/$(scriptfile); \
    1.36 +	done