diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -23,6 +23,9 @@ MANUAL = # automatically included EXTRA_DIST = SMLib.c SMLib.dsp SMLib.dsw SMLib.opt SMLib.plg defines.h +# unit tests and related files here, in the 'unittests' subfolder +UNITTESTS = bp-unittest.pd bp.wav decimator-unittest.pd decimator.wav deltas-unittest.pd deltas.wav hip-unittest.pd hip.wav hist-unittest.pd hist.wav itov-unittest.pd itov.wav lavg-unittest.pd lavg.wav lhist-unittest.pd lhist.wav linspace-unittest.pd linspace.wav lmax-unittest.pd lmax.wav lmin-unittest.pd lmin.wav lrange-unittest.pd lrange.wav lsdt.wav lstd-unittest.pd prevl-unittest.pd prevl.wav threshold-unittest.pd threshold.wav vabs-unittest.pd vabs.wav vclip-unittest.pd vclip.wav vcog-unittest.pd vcog.wav vdbtorms-unittest.pd vdbtorms.wav vdelta-unittest.pd vdelta.wav vfmod-unittest.pd vfmod.wav vftom-unittest.pd vftom.wav vlavg-unittest.pd vlavg.wav vlmax-unittest.pd vlmax.wav vlmin-unittest.pd vlmin.wav vlrange-unittest.pd vlrange.wav vmax-unittest.pd vmax.wav vmin-unittest.pd vmin.wav vmtof-unittest.pd vmtof.wav vpow-unittest.pd vpow.wav vrms-unittest.pd vrms.wav vrmstodb-unittest.pd vrmstodb.wav vstd-unittest.pd vstd.wav vsum-unittest.pd vsum.wav vvconv-unittest.pd vvconv.wav vvminus-unittest.pd vvminus.wav vvplus-unittest.pd vvplus.wav + #------------------------------------------------------------------------------# @@ -236,7 +239,7 @@ SHARED_SOURCE ?= $(shell test ! -e lib$(LIBRARY_NAME).c || \ SHARED_HEADER ?= $(shell test ! -e $(LIBRARY_NAME).h || echo $(LIBRARY_NAME).h) SHARED_LIB = $(SHARED_SOURCE:.c=.$(SHARED_EXTENSION)) -.PHONY = install libdir_install single_install install-doc install-examples install-manual clean distclean dist etags $(LIBRARY_NAME) +.PHONY = install libdir_install single_install install-doc install-examples install-manual install-unittests clean distclean dist etags $(LIBRARY_NAME) all: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB) @@ -259,7 +262,7 @@ install: libdir_install # The meta and help files are explicitly installed to make sure they are # actually there. Those files are not optional, then need to be there. -libdir_install: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB) install-doc install-examples install-manual +libdir_install: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB) install-doc install-examples install-manual install-unittests $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_DATA) $(LIBRARY_NAME)-meta.pd \ $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) @@ -277,7 +280,7 @@ libdir_install: $(SOURCES:.c=.$(EXTENSION)) $(SHARED_LIB) install-doc install-ex $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) # install library linked as single binary -single_install: $(LIBRARY_NAME) install-doc install-examples install-manual +single_install: $(LIBRARY_NAME) install-doc install-examples install-manual install-unittests $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(INSTALL_PROGRAM) $(LIBRARY_NAME).$(EXTENSION) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME) $(STRIP) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/$(LIBRARY_NAME).$(EXTENSION) @@ -304,6 +307,12 @@ install-manual: $(INSTALL_DATA) manual/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/manual; \ done +install-unittests: + test -z "$(strip $(UNITTESTS))" || \ + $(INSTALL_DIR) $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/unittests && \ + for file in $(UNITTESTS); do \ + $(INSTALL_DATA) unittests/$$file $(DESTDIR)$(objectsdir)/$(LIBRARY_NAME)/unittests; \ + done clean: -rm -f -- $(SOURCES:.c=.o) $(SOURCES_LIB:.c=.o) $(SHARED_SOURCE:.c=.o) @@ -367,6 +376,11 @@ dist: $(DISTDIR) for file in $(MANUAL); do \ $(INSTALL_DATA) manual/$$file $(DISTDIR)/manual; \ done + test -z "$(strip $(UNITTESTS))" || \ + $(INSTALL_DIR) $(DISTDIR)/unittests && \ + for file in $(UNITTESTS); do \ + $(INSTALL_DATA) unittests/$$file $(DISTDIR)/unittests; \ + done tar --exclude-vcs -czpf $(DISTDIR).tar.gz $(DISTDIR) # make a Debian source package |