makefile - libs

This commit is contained in:
serxoz 2021-10-25 10:21:27 +02:00
parent 5d4f5aa5ae
commit b42ac4b8a1

View File

@ -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: 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)