# Makefile for IFStatus
# Gabriel Montenegro 

GCC = g++
LDFLAGS = -lncurses
CFLAGS = -O2 -Wall

BIN = ifstatus
OBJ = BorderDecorator.o\
	Config.o\
	Curses.o\
	Decorator.o\
	Display.o\
	Graph.o\
	GraphDecorator.o\
	IFStatus.o\
	InfoDisplay.o\
	Interface.o\
	Interfaces.o\
	Main.o\
	Util.o\
	Window.o
	

INSTDIR = /bin
INSTALL=/usr/bin/install
INSTALL_PARMS=-o 0 -g 0 -s -m 0755

all : ifstatus printdone

ifstatus : $(OBJ)
	$(GCC) $(CFLAGS) $^ -o $@ $(LDFLAGS)

printdone:
	@if [ -e "./${BIN}" ]; then echo "Compiled!"; else echo "Error compiling!"; fi

clean:
	rm -f ${BIN} *.o core *~ 
install:
	$(INSTALL) $(INSTALL_PARMS) ifstatus $(INSTDIR) 



