--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,7 @@
 # Makefile for IFStatus
 # Gabriel Montenegro 
 
-GCC = g++
-LDFLAGS = -lncurses
-CFLAGS = -O2 -Wall
+LDLIBS = $(shell pkg-config --libs ncursesw)
 
 BIN = ifstatus
 OBJ = BorderDecorator.o\
@@ -30,7 +28,7 @@
 all : ifstatus printdone
 
 ifstatus : $(OBJ)
-	$(GCC) $(CFLAGS) $(LDFLAGS) $^ -o $@
+	$(LINK.cc) $^ $(LDLIBS) -o $@
 
 printdone:
 	@if [ -e "./${BIN}" ]; then echo "Compiled.."; else echo "Error compiling!"; fi
