############################################################
#  ZMat: A portable C-library and MATLAB/Octave toolbox for inline data compression
#
#  Author: Qianqian Fang <q.fang at neu.edu>
############################################################

PKGNAME=zmat
LIBNAME=lib$(PKGNAME)
MEXNAME=zipmat
VERSION=1.0.0
SOURCE=src
EXAMPLE=example/c

all: mex oct lib dll example

lib:
	-$(MAKE) -C $(SOURCE) lib
dll:
	-$(MAKE) -C $(SOURCE) dll
mex:
	-$(MAKE) -C $(SOURCE) mex
oct:
	-$(MAKE) -C $(SOURCE) oct
python:
	-$(MAKE) -C python
example: lib
	-$(MAKE) -C $(EXAMPLE) all
clean:
	-rm -rf $(LIBNAME).* $(MEXNAME).mex*
	-$(MAKE) -C $(SOURCE) clean
	-$(MAKE) -C $(EXAMPLE) clean

.DEFAULT_GOAL := mex

.PHONY: all lib dll mex oct example clean python
