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

Merge pull request #1 from lynix/master

Improve makefile
This commit is contained in:
matmoul 2016-06-17 20:18:10 +02:00 committed by GitHub
commit 68e45ef826

View File

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