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

View File

@ -6,6 +6,7 @@ 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)
all: nms sneakers all: nms sneakers
@ -25,8 +26,18 @@ $(OBJ):
mkdir $(OBJ) mkdir $(OBJ)
$(NCURSES_H): $(NCURSES_H):
ifeq ($(UNAME), Linux)
sudo apt-get update sudo apt-get update
sudo apt-get install ncurses-dev 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: clean:
rm -rf $(BIN) rm -rf $(BIN)