make it compile properly

This commit is contained in:
Rebecca Doth 2023-09-16 21:15:54 +02:00
parent 1775ca69d2
commit 8d298d2a49
2 changed files with 12 additions and 6 deletions

View File

@ -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)

4
main.c
View File

@ -1,5 +1,3 @@
#define _DEFAULT_SOURCE
#include <stdio.h>
#include <math.h>
#include <unistd.h>
@ -136,6 +134,6 @@ int main()
end:
curs_set(1);
endwin();
putchar(10);
return 0;
}