Make uses same source file for different object files
Make chooses the same source file for different object files. Both are a list of files, only with different filenames. Make switches between the object files but not the source files. I've already tried some of the answers on StackOverflow with related problems, though those solutions either seem too complicated for what's needed, some don't work and others need the files to be in one directory. I've also tried compiling the files together in one go (with gcc), but this gives some problems with the linking of the rest of the file. $(OBJFILES): $(SRCFILES) $(CC) $(CCFLAGS) -c $< -o $@ $