From 2fd32cffc392360e9e9858c8e30e25816bdf78ea Mon Sep 17 00:00:00 2001 From: lns Date: Mon, 23 Dec 2019 02:38:01 +0100 Subject: added Makefile help and DEBUG mode for CFLAGS --- Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c13c337..e6d7cdd 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ CC := gcc INSTALL_DIR := install -d INSTALL_BIN := install -s -CFLAGS := -O2 -g -Wall -ffunction-sections -fdata-sections -ffast-math -fomit-frame-pointer -fexpensive-optimizations -Wl,--gc-sections +CFLAGS := -O2 -Wall -ffunction-sections -fdata-sections -ffast-math -fomit-frame-pointer -fexpensive-optimizations -Wl,--gc-sections +ifneq ($(strip $(DEBUG)),) +CFLAGS += -g +endif LDFLAGS := RM := rm -rf @@ -83,6 +86,13 @@ install: $(TARGETS) $(INSTALL_DIR) -d $(PREFIX)/usr/bin $(INSTALL_BIN) -s $(TARGETS) $(PREFIX)/usr/bin +help: + @echo '======================================' + @echo 'Possible ARGS:' + @echo '--------------' + @echo 'make MAKE_X11=y MAKE_NCURSES=y DEBUG=y' + @echo '======================================' + rebuild: clean all -.PHONY: all clean strip +.PHONY: all clean strip help -- cgit v1.2.3