Need help modifying Makefile for mysql.h support

I need to compile /code/server/sv_game.c with the mysql.h header file.

I’ve added #include <#mysql.h> to sv_game.c. However, I get the following errors when compiling:

LD build/release-linux-x86_64/ioq3ded.x86_64
build/release-linux-x86_64/ded/sv_game.o: In function `SV_DisplayStats':
sv_game.c:(.text+0x29e8): undefined reference to `mysql_init'
sv_game.c:(.text+0x2a1c): undefined reference to `mysql_real_connect'
sv_game.c:(.text+0x2a2e): undefined reference to `mysql_query'
sv_game.c:(.text+0x2a44): undefined reference to `mysql_error'

Running mysql_config --libs returns:

-L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -lrt -ldl

I need to pass these arguments to the compiler. The syntax is:

gcc  -o output-file $(mysql_config --cflags) input-file $(mysql_config --libs)

So if someone could please point me to which line(s) in the makefile I need to modify, it would be greatly appreciated.

I figured it out myself. To anyone in the future who has the same issue, just add the mysql_config --libs output to the BASE_CFLAGS in the Makefile.