]> sigrok.org Git - sigrok-firmware-fx2lafw.git/blobdiff - Makefile
Added basic debugf for sending debug messages over USB
[sigrok-firmware-fx2lafw.git] / Makefile
index 0256737c278bf0e8e49aea044f0b88edc47f1e3f..dee427041a8fc2a73c66b9c74f1063f3a4e673df 100644 (file)
--- a/Makefile
+++ b/Makefile
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 ##
 
-SOURCES = fx2lafw.c
+SOURCES = fx2lafw.c debug.c
 A51_SOURCES = dscr.a51
 BASENAME = fx2lafw
 
 FX2LIBDIR ?= fx2lib
 
+DEBUG ?= 0
+ifeq ($(DEBUG), 1)
+       SDCCFLAGS += -DDEBUG
+else
+       SDCCFLAGS += -DNDEBUG
+endif
+
 include $(FX2LIBDIR)/lib/fx2.mk