SUBDIRS = lib test bash

all:	local lantronix

local:	.dev $(SUBDIRS)

lantronix: .dev-lx $(patsubst %,%-lx,$(SUBDIRS))

lx:	lantronix

.PHONY:	$(SUBDIRS) clean config

$(SUBDIRS):
	cd $@ && make local

$(patsubst %,%-lx,$(SUBDIRS)):
	cd $(subst -lx,,$@) && make lantronix

clean:
	cd lib && make clean
	cd bash && make clean
	cd test && make clean

cleanall:	clean
	rm -f .dev .dev-lx
	rm -f bash/*cal*

config .dev:
	sh ./config.sh

config-lx .dev-lx:
	sh ./config-lx.sh

install:
	cp bash/capture bash/pulse bash/signal bash/freq /bash/multipulse /bash/multiscope /usr/bin
	cp bash/capture-lx bash/pulse-lx bash/signal-lx bash/freq-lx /usr/bin
