Merge pull request #17 from imak/master
Changed Makefile test for OS to account for Fedora and RHEL/CentOS more accura…
This commit is contained in:
commit
2c337e61dc
25
Makefile
25
Makefile
@ -16,7 +16,6 @@ CC = gcc
|
||||
CFLAGS = -Wextra -Wall
|
||||
LDLIBS = -lncurses
|
||||
NCURSES_H = /usr/include/ncurses.h
|
||||
UNAME = $(shell uname)
|
||||
|
||||
.PHONY: all install uninstall clean
|
||||
|
||||
@ -39,18 +38,18 @@ $(OBJ):
|
||||
mkdir $(OBJ)
|
||||
|
||||
$(NCURSES_H):
|
||||
ifeq ($(UNAME), Linux)
|
||||
sudo apt-get update
|
||||
sudo apt-get install ncurses-dev
|
||||
endif
|
||||
ifeq ($(UNAME), CentOS)
|
||||
sudo yum update
|
||||
sudo yum install ncurses-dev
|
||||
endif
|
||||
ifeq ($(UNAME), Fedora)
|
||||
sudo dnf update --refresh
|
||||
sudo dnf install ncurses-dev
|
||||
endif
|
||||
if [ -a /etc/fedora-release ] ; \
|
||||
then \
|
||||
sudo dnf update --refresh ; \
|
||||
sudo dnf install ncurses-devel ; \
|
||||
elif [ -a /etc/redhat-release ] ; \
|
||||
then \
|
||||
sudo yum update ; \
|
||||
sudo yum install ncurses-devel ; \
|
||||
else \
|
||||
sudo apt-get update ; \
|
||||
sudo apt-get install ncurses-dev ; \
|
||||
fi
|
||||
|
||||
clean:
|
||||
rm -rf $(BIN)
|
||||
|
Loading…
Reference in New Issue
Block a user