Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Added debug target
  • Loading branch information
BetzF committed Feb 1, 2018
commit e65f330f97ebfd51d73be353766e925d58e04d74
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ DOCS = README.md COPYING COPYING.PuTTY
OBJS = $(SRCS:.c=.o)
DEPS = $(OBJS:.o=.d)

.PHONY: clean all install uninstall cscope
.PHONY: clean all debug install uninstall cscope

all: CFLAGS += -O2
all: $(PROGRAM)

debug: CFLAGS += -O0 -DDEBUG -g
debug: $(PROGRAM)

clean:
rm -f cscope.out $(PROGRAM) $(OBJS) $(DEPS)

Expand All @@ -34,7 +38,8 @@ $(PROGRAM): $(OBJS)
$(CC) $(LDFLAGS) $(LOADLIBES) $^ $(LDLIBS) -o $@

CC = gcc
CFLAGS = -O2 -Werror -Wall -Wextra -MMD
CFLAGS = -Werror -Wall -Wextra -MMD


CSCOPE = $(firstword $(shell which cscope mlcscope 2>/dev/null) false)
cscope: cscope.out
Expand Down