I'm facing an issue while running a makefile. The issue is after running the makefile I'm getting error
'linker' input unused [-Wunused-command-line-argument]
Screenshot of the error:
Moreover, when I use the make command with the file name, the commands works perfectly fine without any issue and shows message file.o is up to date however error is prompted at venting.o and venting
The code:
#declaring .PHONY rules
.PHONY: clean
#variable defined for -Wall -Wextra
CFLAGS=-Wall -Wextra
#rule to build the executable program venting from object file
venting: venting.o
gcc $(CFLAGS) -o venting venting.o
#list objectable file is created with the following rules.
list.o: list.c list.h
gcc $(CFLAGS) -c list.c
#list-adders objectable file is created with the following rules.
list-adders.o: list-adders.c list.h
gcc $(CFLAGS) -c list-adders.c
#vents objectable file is created with the following rules.
vents.o: vents.c list.h vents.h
gcc $(CFLAGS) -c vents.c
#venting.o objectable file is created with the following rules.
venting.o: list.o list-adders.o vents.o
gcc $(CFLAGS) -c list.o list-adders.o vents.o
#rule to remove all build targets and rebuild project from the beginning.
clean:
rm -f *.o venting
