diff --git a/Makefile b/Makefile index 9a6646e..40f404a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,13 @@ -FILES = main.c -LINKR = -lm -lncurses +INF := main.c +WRN := -Wall -Wextra +STD := -std=c99 +OPT := -march=native -O2 +LNK := -lm $(shell pkg-config --cflags --libs ncurses) +OUT := agraph default: - gcc -Wall -std=c99 -march=native $(LINKR) $(FILES) -o agraph + $(CC) $(STD) $(WRN) $(OPT) $(INF) $(LNK) -o $(OUT) + +clean: + rm -f ./$(out) + diff --git a/main.c b/main.c index b067ef7..64cd83d 100644 --- a/main.c +++ b/main.c @@ -1,5 +1,3 @@ -#define _DEFAULT_SOURCE - #include #include #include @@ -136,6 +134,6 @@ int main() end: curs_set(1); endwin(); - putchar(10); + return 0; }