2021-06-17 14:21:22 +02:00
|
|
|
#
|
|
|
|
# MySQL.make
|
|
|
|
#
|
2023-01-24 02:35:10 -06:00
|
|
|
# Makefile fragment for finding MySQL headers and library
|
2021-06-17 14:21:22 +02:00
|
|
|
#
|
|
|
|
|
2023-01-24 02:35:10 -06:00
|
|
|
ifeq ($(OSNAME),Darwin)
|
|
|
|
POCO_MYSQL_CONFIG = $(shell whereis -bq mysql_config)
|
2022-11-17 11:42:13 +01:00
|
|
|
else
|
2023-01-24 02:35:10 -06:00
|
|
|
ifeq ($(OSNAME),Linux)
|
|
|
|
POCO_MYSQL_CONFIG = $(shell which mysql_config)
|
|
|
|
endif
|
2022-11-17 11:42:13 +01:00
|
|
|
endif
|
2022-08-19 08:03:19 +02:00
|
|
|
|
2023-01-24 02:35:10 -06:00
|
|
|
ifneq (, $(POCO_MYSQL_CONFIG))
|
|
|
|
ifndef POCO_MYSQL_INCLUDE
|
|
|
|
POCO_MYSQL_INCLUDE = $(shell mysql_config --include)
|
|
|
|
endif
|
|
|
|
ifndef POCO_MYSQL_LIB
|
|
|
|
POCO_MYSQL_LIB = $(shell mysql_config --libs)
|
|
|
|
endif
|
2022-11-17 11:42:13 +01:00
|
|
|
else
|
2023-01-24 02:35:10 -06:00
|
|
|
ifndef POCO_MYSQL_INCLUDE
|
|
|
|
ifeq (0, $(shell test -d /usr/local/include/mysql; echo $$?))
|
2023-10-04 06:30:58 +02:00
|
|
|
POCO_MYSQL_INCLUDE = /usr/local/include
|
2023-01-24 02:35:10 -06:00
|
|
|
else
|
|
|
|
ifeq (0, $(shell test -d /usr/local/opt/mysql-client/include/mysql; echo $$?))
|
2023-10-04 06:30:58 +02:00
|
|
|
POCO_MYSQL_INCLUDE = /usr/local/opt/mysql-client/include/mysql
|
2023-01-24 02:35:10 -06:00
|
|
|
else
|
|
|
|
ifeq (0, $(shell test -d /usr/local/opt/mysql-client/include; echo $$?))
|
2023-10-04 06:30:58 +02:00
|
|
|
POCO_MYSQL_INCLUDE = /usr/local/opt/mysql-client/include
|
2023-01-24 02:35:10 -06:00
|
|
|
else
|
|
|
|
ifeq (0, $(shell test -d /opt/homebrew/opt/mysql-client/include; echo $$?))
|
2023-10-04 06:30:58 +02:00
|
|
|
POCO_MYSQL_INCLUDE = /opt/homebrew/opt/mysql-client/include
|
2023-01-24 02:35:10 -06:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef POCO_MYSQL_LIB
|
|
|
|
ifeq (0, $(shell test -d /usr/local/include/mysql; echo $$?))
|
2023-10-04 06:30:58 +02:00
|
|
|
POCO_MYSQL_LIB = /usr/local/lib
|
2023-01-24 02:35:10 -06:00
|
|
|
else
|
|
|
|
ifeq (0, $(shell test -d /usr/local/opt/mysql-client/lib; echo $$?))
|
2023-10-04 06:30:58 +02:00
|
|
|
POCO_MYSQL_LIB = /usr/local/opt/mysql-client/lib
|
2023-01-24 02:35:10 -06:00
|
|
|
else
|
|
|
|
ifeq (0, $(shell test -d /opt/homebrew/opt/mysql-client/lib; echo $$?))
|
2023-10-04 06:30:58 +02:00
|
|
|
POCO_MYSQL_LIB = /opt/homebrew/opt/mysql-client/lib
|
2023-01-24 02:35:10 -06:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
2022-11-17 11:42:13 +01:00
|
|
|
endif
|
2022-08-19 08:03:19 +02:00
|
|
|
|
2021-06-17 14:21:22 +02:00
|
|
|
ifdef POCO_MYSQL_INCLUDE
|
2023-10-04 06:30:58 +02:00
|
|
|
INCLUDE += -I$(POCO_MYSQL_INCLUDE)
|
2021-06-17 14:21:22 +02:00
|
|
|
endif
|
|
|
|
ifdef POCO_MYSQL_LIB
|
2023-10-04 06:30:58 +02:00
|
|
|
SYSLIBS += -L$(POCO_MYSQL_LIB)
|
2021-06-17 14:21:22 +02:00
|
|
|
endif
|