makefile

Posted on September 2, 2022
Tags: c
#include "mylib.h"
int main(int argc, char* argv[]){
	char *g;
	g = "hello\n";
	cout(g)
}
void cout(char* str)
#include <stdio.h>
void cout(char* str){
	printf("%s",str);
}
all: compile link
	./a.out
compile: main.c prints.c
	gcc -c main.c
	gcc -c prints.c
link: compile
	gcc main.o prints.o

Notice the only atomic or leaf dependencies are main.c prints.c

Static analysis to find dependencies doesn’t work without also analyzing the Makefile linking the object files.
Doxygen tells you that a function like cout exists somewhere but we dont know how or where it is implemented.