Respect user's CC and CFLAGS
This commit is contained in:
parent
247fae6a72
commit
286532e602
12
Makefile
12
Makefile
|
@ -1,17 +1,19 @@
|
||||||
CCFLAGS=-Wall -Iinclude -std=c99
|
CC?=gcc
|
||||||
LDFLAGS=
|
CFLAGS?=
|
||||||
|
|
||||||
|
CFLAGS_DEBUG=
|
||||||
|
|
||||||
ifeq ($(DEBUG),1)
|
ifeq ($(DEBUG),1)
|
||||||
CCFLAGS+=-ggdb -DDEBUG
|
CFLAGS_DEBUG=-ggdb -DDEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: demo
|
all: demo
|
||||||
|
|
||||||
demo: termkey.o driver-csi.o driver-ti.o demo.c
|
demo: termkey.o driver-csi.o driver-ti.o demo.c
|
||||||
gcc $(CCFLAGS) $(LDFLAGS) -o $@ $^ -lncurses
|
$(CC) $(CFLAGS) $(CFLAGS_DEBUG) -o $@ $^ -lncurses
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
gcc $(CCFLAGS) -o $@ -c $^
|
$(CC) $(CFLAGS) $(CFLAGS_DEBUG) -Wall -std=c99 -o $@ -c $^
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
|
Loading…
Reference in New Issue