1
0
mirror of https://github.com/MatMoul/g810-led.git synced 2024-12-23 09:16:11 +00:00

makefile: Add debug build target

Add phony target to provide debugging symbols in binary.
Usable via 'make debug'.
This commit is contained in:
Alexander Koch 2016-06-16 20:20:28 +02:00
parent 0eb7349cad
commit 31ad202d59

View File

@ -3,15 +3,17 @@ CFLAGS=-Wall -O2 -std=gnu++11
LDFLAGS=-lusb-1.0 LDFLAGS=-lusb-1.0
PROGN=g810-led PROGN=g810-led
.PHONY: all clean .PHONY: all debug clean
all: bin/$(PROGN) all: bin/$(PROGN)
bin/$(PROGN): src/main.cpp src/classes/*.cpp bin/$(PROGN): src/main.cpp src/classes/*.cpp
@mkdir -p bin @mkdir -p bin
$(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS) $(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS)
debug: CFLAGS += -g
debug: bin/$(PROGN)
clean: clean:
rm -rf bin rm -rf bin