Merge branch 'remove_makefiles' into develop
This commit is contained in:
@ -1,132 +0,0 @@
|
||||
# This file is distributed as part of the MariaDB Corporation MaxScale. It is free
|
||||
# software: you can redistribute it and/or modify it under the terms of the
|
||||
# GNU General Public License as published by the Free Software Foundation,
|
||||
# version 2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Copyright MariaDB Corporation Ab 2013
|
||||
#
|
||||
# Revision History
|
||||
# Date Who Description
|
||||
# 13/06/13 Mark Riddoch Addition of -rdynamic to allow libraries
|
||||
# to resolve symbols in the main executable
|
||||
# 17/06/13 Mark Riddoch Addition of dependency generation
|
||||
# 24/06/13 Massimiliano Pinto Addition of libmysqlclient and its
|
||||
# includes do this for launching the
|
||||
# gateway: export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH:/packages/mariadb-5.5.25/libmysql
|
||||
# 27/06/13 Vilho Raatikka Added logmanager-related libs and
|
||||
# headers so that liblog_manager.so can
|
||||
# be linked in.
|
||||
# 28/06/13 Vilho Raatikka Added query classifier-related libs and
|
||||
# commented out mysql client headers and
|
||||
# lib to avoid conflicts. MARIADB_SRC_PATH
|
||||
# is set in build_gateway.inc. Examples
|
||||
# are behind SS_DEBUG macros.
|
||||
# 29/06/13 Vilho Raatikka Reverted Query classifier changes because
|
||||
# gateway needs mysql client lib, not qc.
|
||||
# 24/07/13 Mark Ridoch Addition of encryption routines
|
||||
# 30/05/14 Mark Riddoch Filter API added
|
||||
# 25/07/14 Mark Riddoch Addition of hints
|
||||
# 29/08/14 Mark Riddoch Added housekeeper
|
||||
|
||||
include ../../build_gateway.inc
|
||||
|
||||
LOGPATH := $(ROOT_PATH)/log_manager
|
||||
UTILSPATH := $(ROOT_PATH)/utils
|
||||
|
||||
CC=cc
|
||||
|
||||
CFLAGS=-c -I/usr/include -I../include -I../modules/include -I../inih \
|
||||
$(MYSQL_HEADERS) \
|
||||
-I$(LOGPATH) -I$(UTILSPATH) \
|
||||
-Wall -pedantic -g
|
||||
|
||||
LDFLAGS=-rdynamic -L$(LOGPATH) \
|
||||
-Wl,-rpath,$(DEST)/lib \
|
||||
-Wl,-rpath,$(LOGPATH) -Wl,-rpath,$(UTILSPATH) \
|
||||
-Wl,-rpath,$(EMBEDDED_LIB)
|
||||
|
||||
|
||||
LIBS=-L$(EMBEDDED_LIB) \
|
||||
-lmysqld \
|
||||
-lz -lm -lcrypt -lcrypto -ldl -laio -lrt -pthread -llog_manager \
|
||||
-L../inih/extra -linih -lssl -lstdc++
|
||||
|
||||
include ../../makefile.inc
|
||||
|
||||
SRCS= atomic.c buffer.c spinlock.c gateway.c \
|
||||
gw_utils.c utils.c dcb.c load_utils.c session.c service.c server.c \
|
||||
poll.c config.c users.c hashtable.c dbusers.c thread.c gwbitmask.c \
|
||||
monitor.c adminusers.c secrets.c filter.c modutil.c hint.c \
|
||||
housekeeper.c memlog.c
|
||||
|
||||
HDRS= ../include/atomic.h ../include/buffer.h ../include/dcb.h \
|
||||
../include/gw.h ../modules/include/mysql_client_server_protocol.h \
|
||||
../include/session.h ../include/spinlock.h ../include/thread.h \
|
||||
../include/modules.h ../include/poll.h ../include/config.h \
|
||||
../include/users.h ../include/hashtable.h ../include/gwbitmask.h \
|
||||
../include/adminusers.h ../include/version.h ../include/maxscale.h \
|
||||
../include/filter.h ../include/modutil.h ../hint.h \
|
||||
../include/housekeeper.h ../include/memlog.h
|
||||
|
||||
OBJ=$(SRCS:.c=.o)
|
||||
|
||||
KOBJS=maxkeys.o secrets.o utils.o
|
||||
POBJS=maxpasswd.o secrets.o utils.o
|
||||
|
||||
all: maxscale maxkeys maxpasswd
|
||||
|
||||
cleantests:
|
||||
$(MAKE) -C test cleantests
|
||||
|
||||
buildtests:
|
||||
$(MAKE) -C test buildtests
|
||||
|
||||
runtests:
|
||||
$(MAKE) -C test runtests
|
||||
|
||||
testall:
|
||||
$(MAKE) -C test testall
|
||||
|
||||
maxscale: $(OBJ)
|
||||
$(CC) $(LDFLAGS) $(OBJ) $(UTILSPATH)/skygw_utils.o $(LIBS) -o $@
|
||||
|
||||
maxkeys: $(KOBJS)
|
||||
$(CC) $(LDFLAGS) $(KOBJS) $(UTILSPATH)/skygw_utils.o $(LIBS) -o $@
|
||||
|
||||
maxpasswd: $(POBJS)
|
||||
$(CC) $(LDFLAGS) $(POBJS) $(UTILSPATH)/skygw_utils.o $(LIBS) -o $@
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
|
||||
../include/version.h: ../../VERSION
|
||||
echo '#define MAXSCALE_VERSION "'`cat ../../VERSION`'"' > ../include/version.h
|
||||
|
||||
clean:
|
||||
$(DEL) $(OBJ) maxscale
|
||||
$(DEL) *.so
|
||||
|
||||
tags:
|
||||
ctags $(SRCS) $(HDRS)
|
||||
|
||||
depend: ../include/version.h
|
||||
@$(DEL) depend.mk
|
||||
cc -M $(CFLAGS) $(SRCS) > depend.mk
|
||||
|
||||
install: maxscale maxkeys maxpasswd
|
||||
@mkdir -p $(DEST)/bin
|
||||
install -D maxscale maxkeys maxpasswd $(DEST)/bin
|
||||
install -D $(EMBEDDED_LIB)/$(LIB) $(DEST)/lib
|
||||
install -D $(ERRMSG)/errmsg.sys $(DEST)/mysql
|
||||
|
||||
include depend.mk
|
||||
@ -1,121 +0,0 @@
|
||||
# cleantests - clean local and subdirectories' tests
|
||||
# buildtests - build all local and subdirectories' tests
|
||||
# runtests - run all local tests
|
||||
# testall - clean, build and run local and subdirectories' tests
|
||||
|
||||
include ../../../build_gateway.inc
|
||||
include ../../../makefile.inc
|
||||
include ../../../test.inc
|
||||
|
||||
CC=cc
|
||||
TESTLOG := $(shell pwd)/testcore.log
|
||||
|
||||
LOGPATH := $(ROOT_PATH)/log_manager
|
||||
UTILSPATH := $(ROOT_PATH)/utils
|
||||
|
||||
LDFLAGS=-rdynamic -L$(LOGPATH) -L$(EMBEDDED_LIB) \
|
||||
-Wl,-rpath,$(DEST)/lib \
|
||||
-Wl,-rpath,$(LOGPATH) -Wl,-rpath,$(UTILSPATH) \
|
||||
-Wl,-rpath,$(EMBEDDED_LIB)
|
||||
|
||||
LIBS= -L$(EMBEDDED_LIB) -lmysqld \
|
||||
-lz -lm -lcrypt -lcrypto -ldl -laio -lrt -pthread -llog_manager \
|
||||
-L../../inih/extra -linih -lssl -lstdc++
|
||||
|
||||
TESTS=testhash testspinlock testbuffer testmodutil testpoll testservice testdcb testfilter testadminusers testmemlog
|
||||
|
||||
cleantests:
|
||||
- $(DEL) *.o
|
||||
- $(DEL) testhash
|
||||
- $(DEL) *~
|
||||
|
||||
testall:
|
||||
$(MAKE) cleantests
|
||||
$(MAKE) DEBUG=Y buildtests
|
||||
$(MAKE) runtests
|
||||
|
||||
buildtests : $(TESTS)
|
||||
|
||||
testhash: testhash.c
|
||||
$(CC) $(CFLAGS) \
|
||||
-I$(ROOT_PATH)/server/include \
|
||||
-I$(ROOT_PATH)/utils \
|
||||
testhash.c ../hashtable.o ../atomic.o ../spinlock.o -o testhash
|
||||
|
||||
testmysqlusers: test_mysql_users.c
|
||||
$(CC) $(CFLAGS) \
|
||||
-I$(ROOT_PATH)/server/include \
|
||||
-I$(ROOT_PATH)/utils \
|
||||
test_mysql_users.c ../hashtable.o ../atomic.o ../modutil.o ../spinlock.o -o testmysqlusers
|
||||
|
||||
|
||||
testspinlock: testspinlock.c
|
||||
$(CC) $(CFLAGS) \
|
||||
-I$(ROOT_PATH)/server/include \
|
||||
-I$(ROOT_PATH)/utils \
|
||||
testspinlock.c ../spinlock.o ../atomic.o ../thread.o -o testspinlock
|
||||
|
||||
testmodutil: testmodutil.c
|
||||
$(CC) $(CFLAGS) \
|
||||
-I$(ROOT_PATH)/server/include \
|
||||
-I$(ROOT_PATH)/utils \
|
||||
testmodutil.c ../modutil.o ../buffer.o ../atomic.o -o testmodutil
|
||||
|
||||
testbuffer: testbuffer.c
|
||||
$(CC) $(CFLAGS) \
|
||||
-I$(ROOT_PATH)/server/include \
|
||||
-I$(ROOT_PATH)/utils \
|
||||
testbuffer.c ../buffer.o ../atomic.o -o testbuffer
|
||||
|
||||
testpoll: testpoll.c
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) \
|
||||
-I$(ROOT_PATH)/server/include \
|
||||
-I$(ROOT_PATH)/utils \
|
||||
-I$(ROOT_PATH)/log_manager \
|
||||
testpoll.c libcore.a $(UTILSPATH)/skygw_utils.o $(LIBS) -o testpoll
|
||||
|
||||
testservice: testservice.c
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) \
|
||||
-I$(ROOT_PATH)/server/include \
|
||||
-I$(ROOT_PATH)/utils \
|
||||
-I$(ROOT_PATH)/log_manager \
|
||||
testservice.c libcore.a $(UTILSPATH)/skygw_utils.o $(LIBS) -o testservice
|
||||
|
||||
testdcb: testdcb.c
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) \
|
||||
-I$(ROOT_PATH)/server/include \
|
||||
-I$(ROOT_PATH)/utils \
|
||||
-I$(ROOT_PATH)/log_manager \
|
||||
testdcb.c libcore.a $(UTILSPATH)/skygw_utils.o $(LIBS) -o testdcb
|
||||
|
||||
testfilter: testfilter.c libcore.a
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) \
|
||||
-I$(ROOT_PATH)/server/include \
|
||||
-I$(ROOT_PATH)/utils \
|
||||
testfilter.c libcore.a $(UTILSPATH)/skygw_utils.o $(LIBS) -o testfilter
|
||||
|
||||
testadminusers: testadminusers.c libcore.a
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) \
|
||||
-I$(ROOT_PATH)/server/include \
|
||||
-I$(ROOT_PATH)/utils \
|
||||
testadminusers.c libcore.a $(UTILSPATH)/skygw_utils.o $(LIBS) -o testadminusers
|
||||
|
||||
testmemlog: testmemlog.c libcore.a
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) \
|
||||
-I$(ROOT_PATH)/server/include \
|
||||
-I$(ROOT_PATH)/utils \
|
||||
testmemlog.c libcore.a $(UTILSPATH)/skygw_utils.o $(LIBS) -o testmemlog
|
||||
|
||||
|
||||
libcore.a: ../*.o
|
||||
ar rv libcore.a ../*.o
|
||||
|
||||
runtests: $(TESTS)
|
||||
@echo "" > $(TESTLOG)
|
||||
@echo "-------------------------------" >> $(TESTLOG)
|
||||
@echo $(shell date) >> $(TESTLOG)
|
||||
@echo "Test MaxScale core" >> $(TESTLOG)
|
||||
@echo "-------------------------------" >> $(TESTLOG)
|
||||
$(foreach var,$(TESTS),./runtest.sh $(var) $(TESTLOG);)
|
||||
@echo "" >> $(TESTLOG)
|
||||
@cat $(TESTLOG) >> $(TEST_MAXSCALE_LOG)
|
||||
Reference in New Issue
Block a user