#!/usr/bin/make -f
# Makefile to the 'iem_spec2' library for Pure Data.
# Needs Makefile.pdlibbuilder as helper makefile for platform-dependent build
# settings and rules (https://github.com/pure-data/pd-lib-builder).

lib.name = iem_spec2

## iemlib.h lives in include/
cflags  = -Iinclude

# special file that does not provide a class
lib.setup.sources = src/$(lib.name).c

# all other C and C++ files in subdirs are source files per class
# (alternatively, enumerate them by hand)
# class.sources = $(filter-out $(lib.setup.sources),$(wildcard src/*.c))

class.sources = \
	src/spec2_1p1z_freq~.c \
	src/spec2_1p1z_time~.c \
	src/spec2_abs~.c \
	src/spec2_add_scalar~.c \
	src/spec2_add~.c \
	src/spec2_block_delay~.c \
	src/spec2_clip_max~.c \
	src/spec2_clip_min~.c \
	src/spec2_dbtopow~.c \
	src/spec2_dbtorms~.c \
	src/spec2_matrix_bundle_stat~.c \
	src/spec2_mul_scalar~.c \
	src/spec2_mul~.c \
  	src/spec2_powtodb~.c \
	src/spec2_rmstodb~.c \
	src/spec2_shift~.c \
	src/spec2_sqrt~.c \
	src/spec2_stretch~.c \
	src/spec2_sub~.c \
	src/spec2_sum~.c \
	src/spec2_tab_conv~.c \
	src/spec2_tabreceive_enable~.c \
	src/spec2_tabreceive~.c \
	$(empty)

datafiles = \
	$(wildcard *.txt) \
	$(wildcard *.pdf) \
	$(wildcard *.pd) \
	$(wildcard *.gif) \
	$(wildcard *.bat) \
	$(wildcard *.sh) \
	$(wildcard *.wav) \
	$(empty)


#cflags = -DVERSION=$(shell cat VERSION.txt)

## build a multi-object library
make-lib-executable=yes

## suppress "unused" warnings
#suppress-wunused=yes

################################################################################
### pdlibbuilder ###############################################################
################################################################################

# This Makefile is based on the Makefile from pd-lib-builder written by
# Katja Vetter. You can get it from:
# https://github.com/pure-data/pd-lib-builder
PDLIBBUILDER_DIR=pd-lib-builder/
include $(firstword $(wildcard $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder Makefile.pdlibbuilder))
