diff --git a/Makefile b/Makefile index fef3b57..a2e96ef 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,10 @@ -CC=gcc -NAME=elefantes +NAME = elefantes +CC = gcc +LIBS = -lm +LIBS += $(shell ncursesw5-config --libs 2>/dev/null \ + || ncurses5-config --libs 2>/dev/null \ + || ncursesw6-config --libs 2>/dev/null \ + || ncurses6-config --libs 2>/dev/null ) compile: - $(CC) -o $(NAME) main.c distancia.c screen.c -L/usr/include/ -lm -lncurses + $(CC) -o $(NAME) main.c distancia.c screen.c $(LIBS)