summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 4 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 36da5ec..8f9a613 100644
--- a/Makefile
+++ b/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