Modified makefile for different flavors of *nix

This commit is contained in:
Maxwell Gerber 2016-04-28 17:36:35 -07:00
parent 9f82b10b5c
commit b771aa9663
1 changed files with 11 additions and 0 deletions

View File

@ -6,6 +6,7 @@ CC = gcc
CFLAGS = -Wextra -Wall
LDLIBS = -lncurses
NCURSES_H = /usr/include/ncurses.h
UNAME = $(shell uname)
all: nms sneakers
@ -25,8 +26,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
clean:
rm -rf $(BIN)