From b771aa9663511fd60d4a01572a0c579e2edbbddc Mon Sep 17 00:00:00 2001 From: Maxwell Gerber Date: Thu, 28 Apr 2016 17:36:35 -0700 Subject: [PATCH] Modified makefile for different flavors of *nix --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index eb76b57..9964447 100644 --- a/Makefile +++ b/Makefile @@ -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)