summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/Sources/Services/ogAdmAgent/Makefile12
-rw-r--r--admin/Sources/Services/ogAdmBoot/Makefile12
-rw-r--r--admin/Sources/Services/ogAdmRepo/Makefile12
-rw-r--r--admin/Sources/Services/ogAdmServer/Makefile12
4 files changed, 16 insertions, 32 deletions
diff --git a/admin/Sources/Services/ogAdmAgent/Makefile b/admin/Sources/Services/ogAdmAgent/Makefile
index 6f0c81f5..ab95f3d3 100644
--- a/admin/Sources/Services/ogAdmAgent/Makefile
+++ b/admin/Sources/Services/ogAdmAgent/Makefile
@@ -7,17 +7,13 @@ PROYECTO := ogAdmAgent
INSTALL_DIR := /opt/opengnsys
# Opciones de compilacion
-CFLAGS := -O0 -g -Wall -I../../Includes # Depuracion
-#CFLAGS := -O3 -Wall # Optimizacion
+CFLAGS := $(shell mysql_config --cflags)
+CFLAGS += -O0 -g -Wall -I../../Includes # Depuracion
+#CFLAGS += -O3 -Wall # Optimizacion
CPPFLAGS := $(CFLAGS)
# Opciones de linkado
-LBIT=$(shell getconf LONG_BIT)
-ifeq ($(LBIT), 64)
- LDFLAGS := -L/usr/lib64 -L/usr/lib64/mysql -lpthread -lmysqlclient
-else
- LDFLAGS := -L/usr/lib -L/usr/lib/mysql -lpthread -lmysqlclient
-endif
+LDFLAGS := -Wl,--no-as-needed $(shell mysql_config --libs) -lpthread
# Ficheros objetos
OBJS := ../../Includes/Database.o sources/ogAdmAgent.o
diff --git a/admin/Sources/Services/ogAdmBoot/Makefile b/admin/Sources/Services/ogAdmBoot/Makefile
index 14cfe5db..b8ed496c 100644
--- a/admin/Sources/Services/ogAdmBoot/Makefile
+++ b/admin/Sources/Services/ogAdmBoot/Makefile
@@ -7,17 +7,13 @@ PROYECTO := ogAdmBoot
INSTALL_DIR := /opt/opengnsys
# Opciones de compilacion
-CFLAGS := -O0 -g -Wall -I../includes # Depuracion
-#CFLAGS := -O3 -Wall # Optimizacion
+CFLAGS := $(shell mysql_config --cflags)
+CFLAGS += -O0 -g -Wall -I../includes # Depuracion
+#CFLAGS += -O3 -Wall # Optimizacion
CPPFLAGS := $(CFLAGS)
# Opciones de linkado
-LBIT=$(shell getconf LONG_BIT)
-ifeq ($(LBIT), 64)
- LDFLAGS := -L/usr/lib64 -L/usr/lib64/mysql -lpthread -lmysqlclient
-else
- LDFLAGS := -L/usr/lib -L/usr/lib/mysql -lpthread -lmysqlclient
-endif
+LDFLAGS := -Wl,--no-as-needed $(shell mysql_config --libs) -lpthread
# Ficheros objetos
OBJS := ../includes/Database.o sources/ogAdmBoot.o
diff --git a/admin/Sources/Services/ogAdmRepo/Makefile b/admin/Sources/Services/ogAdmRepo/Makefile
index 268daa18..d83092b5 100644
--- a/admin/Sources/Services/ogAdmRepo/Makefile
+++ b/admin/Sources/Services/ogAdmRepo/Makefile
@@ -7,17 +7,13 @@ PROYECTO := ogAdmRepo
INSTALL_DIR := /opt/opengnsys
# Opciones de compilacion
-CFLAGS := -O0 -g -Wall -I../../Includes # Depuracion
-#CFLAGS := -O3 -Wall # Optimizacion
+CFLAGS := $(shell mysql_config --cflags)
+CFLAGS += -O0 -g -Wall -I../../Includes # Depuracion
+#CFLAGS += -O3 -Wall # Optimizacion
CPPFLAGS := $(CFLAGS)
# Opciones de linkado
-LBIT := $(shell getconf LONG_BIT)
-ifeq ($(LBIT), 64)
- LDFLAGS := -L/usr/lib64 -L/usr/lib64/mysql -lpthread -lmysqlclient
-else
- LDFLAGS := -L/usr/lib -L/usr/lib/mysql -lpthread -lmysqlclient
-endif
+LDFLAGS := -Wl,--no-as-needed $(shell mysql_config --libs) -lpthread
# Ficheros objetos
OBJS := ../../Includes/Database.o sources/ogAdmRepo.o
diff --git a/admin/Sources/Services/ogAdmServer/Makefile b/admin/Sources/Services/ogAdmServer/Makefile
index 36da5ec3..8f9a613c 100644
--- a/admin/Sources/Services/ogAdmServer/Makefile
+++ b/admin/Sources/Services/ogAdmServer/Makefile
@@ -7,17 +7,13 @@ PROYECTO := ogAdmServer
INSTALL_DIR := /opt/opengnsys
# Opciones de compilacion
-CFLAGS := -O0 -g -Wall -I../../Includes # Depuracion
-#CFLAGS := -O3 -Wall # Optimizacion
+CFLAGS := $(shell mysql_config --cflags)
+CFLAGS += -O0 -g -Wall -I../../Includes # Depuracion
+#CFLAGS += -O3 -Wall -I../../Includes # Optimizacion
CPPFLAGS := $(CFLAGS)
# Opciones de linkado
-LBIT := $(shell getconf LONG_BIT)
-ifeq ($(LBIT), 64)
- LDFLAGS := -L/usr/lib64 -L/usr/lib64/mysql -lpthread -lmysqlclient
-else
- LDFLAGS := -L/usr/lib -L/usr/lib/mysql -lpthread -lmysqlclient
-endif
+LDFLAGS := -Wl,--no-as-needed $(shell mysql_config --libs) -lpthread
# Ficheros objetos
OBJS := ../../Includes/Database.o sources/ogAdmServer.o