Changed test for OS to account for Fedora and RHEL/CentOS more accurately. Also updaated the ncurses-dev to ncusrses-devel for same.

This commit is contained in:
Ivan Makfinsky 2016-05-06 11:24:32 -04:00
parent 4c5e2c7f74
commit ba06fa3eac

View File

@ -16,7 +16,6 @@ CC = gcc
CFLAGS = -Wextra -Wall CFLAGS = -Wextra -Wall
LDLIBS = -lncurses LDLIBS = -lncurses
NCURSES_H = /usr/include/ncurses.h NCURSES_H = /usr/include/ncurses.h
UNAME = $(shell uname)
.PHONY: all install uninstall clean .PHONY: all install uninstall clean
@ -39,18 +38,18 @@ $(OBJ):
mkdir $(OBJ) mkdir $(OBJ)
$(NCURSES_H): $(NCURSES_H):
ifeq ($(UNAME), Linux) if [ -a /etc/fedora-release ] ; \
sudo apt-get update then \
sudo apt-get install ncurses-dev sudo dnf update --refresh ; \
endif sudo dnf install ncurses-devel ; \
ifeq ($(UNAME), CentOS) elif [ -a /etc/redhat-release ] ; \
sudo yum update then \
sudo yum install ncurses-dev sudo yum update ; \
endif sudo yum install ncurses-devel ; \
ifeq ($(UNAME), Fedora) else \
sudo dnf update --refresh sudo apt-get update ; \
sudo dnf install ncurses-dev sudo apt-get install ncurses-dev ; \
endif fi
clean: clean:
rm -rf $(BIN) rm -rf $(BIN)