my current makefile looks likes this
all: hello
hello: hello.o
clang -o hello hello.o
hello.o: hello.c
clang -Wall -std=c99 -c -o hello.o hello.c -lpthread
clean:
rm -f *.o *exe hello
How can I modify it to compile with the following:
clang -std=gnu99 -Wall -o hello hello.c -lpthread
Try this – usually best to do the compiling is a few steps.