AM_CPPFLAGS = -I $(top_srcdir)/libsigrok \
-DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
+SUBDIRS = hardware input output
+
lib_LTLIBRARIES = libsigrok.la
libsigrok_la_SOURCES = \
device.c \
session.c \
hwplugin.c \
- filter.c \
- hardware/common/ezusb.c \
- hardware/common/misc.c \
- hardware/common/serial.c \
- hardware/demo/demo.c \
- input/input_binary.c \
- input/input.c \
- output/output_binary.c \
- output/output_text.c \
- output/output_vcd.c \
- output/output_gnuplot.c \
- output/common.c \
- output/output.c
-
-if LA_ASIX_SIGMA
-libsigrok_la_SOURCES += \
- hardware/asix-sigma/asix-sigma.c \
- hardware/asix-sigma/asix-sigma.h
-else
-EXTRA_DIST = \
- hardware/asix-sigma/asix-sigma.c \
- hardware/asix-sigma/asix-sigma.h
-endif
-
-if LA_OLS
-libsigrok_la_SOURCES += hardware/openbench-logic-sniffer/ols.c
-else
-EXTRA_DIST = hardware/openbench-logic-sniffer/ols.c
-endif
-
-if LA_SALEAE_LOGIC
-libsigrok_la_SOURCES += hardware/saleae-logic/saleae-logic.c
-else
-EXTRA_DIST = hardware/saleae-logic/saleae-logic.c
-endif
-
-if LA_ZEROPLUS_LOGIC_CUBE
-libsigrok_la_SOURCES += \
- hardware/zeroplus-logic-cube/analyzer.c \
- hardware/zeroplus-logic-cube/analyzer.h \
- hardware/zeroplus-logic-cube/gl_usb.c \
- hardware/zeroplus-logic-cube/gl_usb.h \
- hardware/zeroplus-logic-cube/zeroplus.c
-else
-EXTRA_DIST = \
- hardware/zeroplus-logic-cube/analyzer.c \
- hardware/zeroplus-logic-cube/analyzer.h \
- hardware/zeroplus-logic-cube/gl_usb.c \
- hardware/zeroplus-logic-cube/gl_usb.h \
- hardware/zeroplus-logic-cube/zeroplus.c
-endif
+ filter.c
-libsigrok_la_LIBADD = $(LIBOBJS)
+libsigrok_la_LIBADD = \
+ $(LIBOBJS) \
+ hardware/libsigrokhardware.la \
+ input/libsigrokinput.la \
+ output/libsigrokoutput.la
include_HEADERS = sigrok.h
--- /dev/null
+##
+## This file is part of the sigrok project.
+##
+## Copyright (C) 2011 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+##
+
+SUBDIRS = \
+ asix-sigma \
+ common \
+ demo \
+ openbench-logic-sniffer \
+ saleae-logic \
+ zeroplus-logic-cube
+
+noinst_LTLIBRARIES = libsigrokhardware.la
+
+libsigrokhardware_la_SOURCES =
+
+libsigrokhardware_la_LIBADD = \
+ common/libsigrokhwcommon.la \
+ demo/libsigrokhwdemo.la
+
+if LA_ASIX_SIGMA
+libsigrokhardware_la_LIBADD += asix-sigma/libsigrokhwasixsigma.la
+endif
+
+if LA_OLS
+libsigrokhardware_la_LIBADD += openbench-logic-sniffer/libsigrokhwols.la
+endif
+
+if LA_SALEAE_LOGIC
+libsigrokhardware_la_LIBADD += saleae-logic/libsigrokhwsaleaelogic.la
+endif
+
+if LA_ZEROPLUS_LOGIC_CUBE
+libsigrokhardware_la_LIBADD += zeroplus-logic-cube/libsigrokhwzeroplus.la
+endif
+
--- /dev/null
+##
+## This file is part of the sigrok project.
+##
+## Copyright (C) 2011 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+##
+
+AM_CPPFLAGS = -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
+
+# Local lib, this is NOT meant to be installed!
+noinst_LTLIBRARIES = libsigrokhwasixsigma.la
+
+libsigrokhwasixsigma_la_SOURCES = \
+ asix-sigma.c \
+ asix-sigma.h
+
+libsigrokhwasixsigma_la_CFLAGS = \
+ -I$(top_srcdir)/libsigrok
+
--- /dev/null
+##
+## This file is part of the sigrok project.
+##
+## Copyright (C) 2011 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+##
+
+# Local lib, this is NOT meant to be installed!
+noinst_LTLIBRARIES = libsigrokhwcommon.la
+
+libsigrokhwcommon_la_SOURCES = \
+ ezusb.c \
+ misc.c \
+ serial.c
+
+libsigrokhwcommon_la_CFLAGS = \
+ -I$(top_srcdir)/libsigrok
+
--- /dev/null
+##
+## This file is part of the sigrok project.
+##
+## Copyright (C) 2011 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+##
+
+# Local lib, this is NOT meant to be installed!
+noinst_LTLIBRARIES = libsigrokhwdemo.la
+
+libsigrokhwdemo_la_SOURCES = \
+ demo.c
+
+libsigrokhwdemo_la_CFLAGS = \
+ -I$(top_srcdir)/libsigrok
+
--- /dev/null
+##
+## This file is part of the sigrok project.
+##
+## Copyright (C) 2011 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+##
+
+# Local lib, this is NOT meant to be installed!
+noinst_LTLIBRARIES = libsigrokhwols.la
+
+libsigrokhwols_la_SOURCES = \
+ ols.c
+
+libsigrokhwols_la_CFLAGS = \
+ -I$(top_srcdir)/libsigrok
+
--- /dev/null
+##
+## This file is part of the sigrok project.
+##
+## Copyright (C) 2011 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+##
+
+AM_CPPFLAGS = -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
+
+# Local lib, this is NOT meant to be installed!
+noinst_LTLIBRARIES = libsigrokhwsaleaelogic.la
+
+libsigrokhwsaleaelogic_la_SOURCES = \
+ saleae-logic.c
+
+libsigrokhwsaleaelogic_la_CFLAGS = \
+ -I$(top_srcdir)/libsigrok
+
--- /dev/null
+##
+## This file is part of the sigrok project.
+##
+## Copyright (C) 2011 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+##
+
+# Local lib, this is NOT meant to be installed!
+noinst_LTLIBRARIES = libsigrokhwzeroplus.la
+
+libsigrokhwzeroplus_la_SOURCES = \
+ analyzer.c \
+ analyzer.h \
+ gl_usb.c \
+ gl_usb.h \
+ zeroplus.c
+
+libsigrokhwzeroplus_la_CFLAGS = \
+ -I$(top_srcdir)/libsigrok
+
--- /dev/null
+##
+## This file is part of the sigrok project.
+##
+## Copyright (C) 2011 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+##
+
+# Local lib, this is NOT meant to be installed!
+noinst_LTLIBRARIES = libsigrokinput.la
+
+libsigrokinput_la_SOURCES = \
+ input_binary.c \
+ input.c
+
+libsigrokinput_la_CFLAGS = \
+ -I$(top_srcdir)/libsigrok
+
--- /dev/null
+##
+## This file is part of the sigrok project.
+##
+## Copyright (C) 2011 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+##
+
+AM_CPPFLAGS = -DFIRMWARE_DIR='"$(FIRMWARE_DIR)"'
+
+# Local lib, this is NOT meant to be installed!
+noinst_LTLIBRARIES = libsigrokoutput.la
+
+libsigrokoutput_la_SOURCES = \
+ output_binary.c \
+ output_text.c \
+ output_vcd.c \
+ output_gnuplot.c \
+ common.c \
+ output.c
+
+libsigrokoutput_la_CFLAGS = \
+ -I$(top_srcdir)/libsigrok
+