From 7b6207bb9f2e4f2113edce954ae628c0daa56114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Andr=C3=A9n=20Zachrisson?= Date: Fri, 30 Oct 2015 23:11:40 +0100 Subject: [PATCH] Activate DEBUG variable upon debug build --- Makefile | 2 +- cue2pops.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ebbcae3..2a54ec5 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ SRC = cue2pops.c CC = gcc CFLAGS = -Wall -Wextra -CFLAGS_DEBUG = $(CFLAGS) -O0 -g +CFLAGS_DEBUG = $(CFLAGS) -O0 -g -DDEBUG TARGET = cue2pops diff --git a/cue2pops.c b/cue2pops.c index 640a3f9..f9f23c0 100644 --- a/cue2pops.c +++ b/cue2pops.c @@ -10,7 +10,12 @@ #include #include -int debug = 0; // Else than zero, printf some dbg stuff +#ifdef DEBUG + int debug = 1; +#elif + int debug = 0; +#endif + int batch = 0; // Else than zero, user prompt is disabled and CDRWIN image fix is ENABLED. Doesn't halt on anything. Suitable for batch execution. FILE *file, *leech; //file is used for opening the input cue and the output file, leech is used for opening the BIN that's attached to the cue.