Improve Makefile for debugging code

- Addopt -ggdb to add debugging information to binary.
- Add cscope target to help navigating the code.
- Add cscope.out to .gitignore.
- Add *.swp to .gitignore.
This commit is contained in:
Michel Machado 2014-08-14 09:31:05 -04:00
parent b1fbd48675
commit 1e6ec3b83e
2 changed files with 9 additions and 3 deletions

3
.gitignore vendored
View File

@ -1,3 +1,6 @@
cscope.out
*.swp
*.d
*.o
*~

View File

@ -1,5 +1,5 @@
CC ?= gcc
CFLAGS += -std=c99 -Wall -Wextra -pedantic -MMD
CFLAGS += -std=c99 -Wall -Wextra -pedantic -MMD -ggdb
TARGETS = f3write f3read
EXPERIMENTAL_TARGETS = f3probe
@ -18,7 +18,10 @@ f3probe: libprobe.o f3probe.o
-include *.d
PHONY: clean
PHONY: cscope clean
cscope:
cscope -b *.c *.h
clean:
rm -f *.o *.d $(TARGETS) $(EXPERIMENTAL_TARGETS)
rm -f *.o *.d cscope.out $(TARGETS) $(EXPERIMENTAL_TARGETS)