aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authors-over-42023-07-07 20:56:29 -0400
committers-over-42023-07-07 20:56:29 -0400
commit5b37568baac046ac6b21453bbe037e0eeec16e89 (patch)
tree3a7a3de8c14cea25b4e2cd05cd55fbc7f3239137 /Makefile
parente850a08fa7a763140b9c86308cfdff9bae421c2e (diff)
expectf
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 13 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 0550a72..5d23c0e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,26 +1,31 @@
+NAME := HALK
PREFIX := /usr/local
BINDIR := $(PREFIX)/bin
-BIN := halk
-TMPBIN := halk.out
+BIN := $(shell echo $(NAME) | tr '[:upper:]' '[:lower:]')
+TMPBIN := $(BIN).out
CC := gcc
-FLAGS := -O3
+FLAGS := -O3 -s
DEVFLAGS := -ggdb -fsanitize=leak,address,undefined -fno-omit-frame-pointer
SRCS := $(wildcard src/*.c)
-SRCS := $(filter-out src/parser.c, $(SRCS)) # exclude the incomplete parser for now.
+#SRCS := $(filter-out src/parser.c, $(SRCS)) # exclude the incomplete parser for now.
OBJS := $(SRCS:.c=.o)
all: options HALK
options:
- @echo "HALK build options "
- @echo "================== "
+ @$(eval $@_TITLE := "$(NAME) build options")
+ @$(eval $@_ULINE := $(shell echo "$($@_TITLE)" | tr '[:print:]' '='))
+ @echo "$($@_TITLE)"
+ @echo "$($@_ULINE)"
@echo "cc: $(CC) "
@echo "flags: $(FLAGS) "
@echo " "
devoptions:
- @echo "HALK build options (development) "
- @echo "================================ "
+ @$(eval $@_TITLE := "$(NAME) build options \(development\)")
+ @$(eval $@_ULINE := $(shell echo "$($@_TITLE)" | tr '[:print:]' '='))
+ @echo "$($@_TITLE)"
+ @echo "$($@_ULINE)"
@echo "cc: $(CC) "
@echo "flags: $(DEVFLAGS) "
@echo " "