#Makefile not working
10 messages · Page 1 of 1 (latest)
all: clashprogram
clashprogram: clash.o plist.o
gcc -std=c11 -pedantic -D_XOPEN_SOURCE=700 -Wall -Werror -o clashprogram clash.o plist.o
clash.o: clash.c plist.h
gcc -std=c11 -pedantic -D_XOPEN_SOURCE=700 -Wall -Werror clash.c
plist.o: plist.c plist.h
gcc -std=c11 -pedantic -D_XOPEN_SOURCE=700 -Wall -Werror plist.c
clean:
rm -f clashprogram```
seems like its not connecting the stuff from the header
Your make file is fine it's your compiling that breaking.
You need to use the -c compiler option to make object files.
And then you can link them all together when you make your final executable by just doing what you're doing however you don't need to pass command link flags like std since they're already object files.