summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2013-05-22 17:07:18 +0200
committerportix <portix@gmx.net>2013-05-22 17:07:18 +0200
commit3eec71ae283fcf04b1fa30aa0cd11c83e426aebd (patch)
treeadf2f195ed3d06eb7eba917d671113c9d4889e16
parent0d3972ed0deb960966a7b29757bcf1623d140c67 (diff)
downloaddwb-3eec71ae283fcf04b1fa30aa0cd11c83e426aebd.zip
Adding debug target for exar.c
-rw-r--r--exar/Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/exar/Makefile b/exar/Makefile
index 3faaf17f..41fb73da 100644
--- a/exar/Makefile
+++ b/exar/Makefile
@@ -1,4 +1,10 @@
-CFLAGS += -Wall -pedantic -Werror -Wextra -std=c99 -g
+ORIG_CFLAGS := $(CFLAGS)
+
+CFLAGS := -Wall -pedantic -Werror -Wextra -std=c99 -Os
+CFLAGS += $(ORIG_CFLAGS)
+
+DCFLAGS += -g -O0 -Wall -pedantic -Werror -Wextra -std=c99
+DCFLAGS += $(ORIG_CFLAGS)
TARGET=exar
OBJ=$(patsubst %.c, %.o, $(wildcard *.c))
@@ -13,6 +19,13 @@ $(TARGET): $(OBJ)
@echo $(CC) $<
@$(CC) -c $< -o $@ $(CFLAGS) $(CPPFLAGS)
+debug:
+ make CFLAGS="$(DCFLAGS)"
+
+cgdb:
+ make CFLAGS="$(DCFLAGS)"
+ cgdb exar
+
clean:
$(RM) -rf $(OBJ) $(TARGET)