From 286532e6021f1a1a90966a8ecf683d9efc5ec55d Mon Sep 17 00:00:00 2001 From: Paul LeoNerd Evans Date: Thu, 9 Oct 2008 23:05:40 +0100 Subject: Respect user's CC and CFLAGS --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 22940e7..9f25d79 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,19 @@ -CCFLAGS=-Wall -Iinclude -std=c99 -LDFLAGS= +CC?=gcc +CFLAGS?= + +CFLAGS_DEBUG= ifeq ($(DEBUG),1) - CCFLAGS+=-ggdb -DDEBUG + CFLAGS_DEBUG=-ggdb -DDEBUG endif all: demo demo: termkey.o driver-csi.o driver-ti.o demo.c - gcc $(CCFLAGS) $(LDFLAGS) -o $@ $^ -lncurses + $(CC) $(CFLAGS) $(CFLAGS_DEBUG) -o $@ $^ -lncurses %.o: %.c - gcc $(CCFLAGS) -o $@ -c $^ + $(CC) $(CFLAGS) $(CFLAGS_DEBUG) -Wall -std=c99 -o $@ -c $^ .PHONY: clean clean: -- cgit v1.2.3-70-g09d2