CC=gcc
CFLAGS=-Wall -Wextra -Werror -lm -pedantic
# %: ./src/%.c
# $(CC) -o ./bin/$@ $^ $(CFLAGS)
guiao04: ./src/guiao04.o ./src/functions.o
$(CC) -o ./bin/guiao04 ./src/guiao04.o ./src/functions.o $(CFLAGS)
guiao04.o: ./src/guiao04.c ./src/functions.h
$(CC) -c ./src/guiao04.c $(CFLAGS)
functions.o: ./src/functions.c ./src/functions.h
$(CC) -c ./src/functions.c $(CFLAGS)
i have this as my makefile to create the executable guiao04, i cant seem to get whats wrong, i have functions.c and functions.h on my ./src folder and my guiao04.c is also on ./src thanks for all the help given
i’ve tried changing directiories and changing the files from ./src/ to ./bin/ and etc.
New contributor
Hugo Soares is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1