I wrote a simple makefile to compile my latex code.

I have some variables in that makefile and I want to pass them to the latex code, but I don't know how to do that.

Example 1:
----------

in makefile:

```
# set Type to A or B
Type = B

```

in latex code:

```
\ifdefined\B
%%%%%%%%%%%%%%%Some LaTeX Code%%%%%%%%%%%%%%%
\else
\ifdefined\A
%%%%%%%%%%%%%%%Some LaTeX Code%%%%%%%%%%%%%%%
\fi
\fi

```

Example 2:
----------

in makefile:

```
Version = J

```

in LaTeX code:

```
Some random text \Version

```

Here is the line in the makefile that I use for compilation:

```
latexmk -lualatex -output-directory=$(OUTDIR) --jobname=$(REPORT_PDF) $(REPORT)

```

Any help?