I have implemented a binary tree program which includes the tree.c with the functions, the tree.h with the declarations of them and a main.c for testing. Also, I have a mak
Well, I don't really know the syntax for the doxygen command, so I'll make a generic answer:
in your Makefile, each
term: [dep]
action
is a target.
So if you add something like:
doc: $(OBJ)
doxygen with-correct-options
You will be able to generate the documentation using:
make doc
(doc
being here the name of the target)
Now, if you add:
all: tree doc
@echo "Generating program and doc."
you will have the program and the documentation generated with simply invoking
make
In the end, there is an additional statment your Makefile could have use of: .PHONY
. It's "A way to mark one of many targets as not directly producing files, and ensure their execution even if a file having the same name as the target exists". In other terms, it's to make sure doc
, clean
or all
will always be executed even if files named doc
, clean
or all
exist.
Its syntax is the following:
.PHONY: all clean doc
And is usually put at the end of the Makefile.