2009-09-17 18:34:24 +02:00
|
|
|
# Copyright (C) 2000-2006 MySQL AB, 2009 Sun Microsystems, Inc.
|
2000-07-31 21:29:14 +02:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
2006-12-23 20:17:15 +01:00
|
|
|
# the Free Software Foundation; version 2 of the License.
|
2000-07-31 21:29:14 +02:00
|
|
|
#
|
|
|
|
# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
|
|
|
MYSQLDATAdir = $(localstatedir)
|
|
|
|
MYSQLSHAREdir = $(pkgdatadir)
|
|
|
|
MYSQLBASEdir= $(prefix)
|
2005-07-06 00:06:11 +02:00
|
|
|
INCLUDES = @ZLIB_INCLUDES@ -I$(top_builddir)/include \
|
2005-07-05 23:24:48 +02:00
|
|
|
-I$(top_srcdir)/include -I$(srcdir)
|
2000-07-31 21:29:14 +02:00
|
|
|
pkglib_LIBRARIES = libmysys.a
|
2006-11-27 22:19:53 +01:00
|
|
|
LDADD = libmysys.a $(top_builddir)/strings/libmystrings.a $(top_builddir)/dbug/libdbug.a
|
2008-03-28 20:11:07 +01:00
|
|
|
noinst_HEADERS = mysys_priv.h my_static.h my_handler_errors.h
|
2004-11-04 22:55:47 +01:00
|
|
|
libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \
|
2004-02-19 18:33:09 +01:00
|
|
|
mf_path.c mf_loadpath.c my_file.c \
|
2001-08-19 13:43:51 +02:00
|
|
|
my_open.c my_create.c my_dup.c my_seek.c my_read.c \
|
2006-11-23 17:23:29 +01:00
|
|
|
my_pread.c my_write.c my_getpagesize.c \
|
2009-09-17 18:34:24 +02:00
|
|
|
mf_keycaches.c my_crc32.c \
|
2000-11-16 02:58:58 +01:00
|
|
|
mf_iocache.c mf_iocache2.c mf_cache.c mf_tempfile.c \
|
2002-10-08 14:39:37 +02:00
|
|
|
mf_tempdir.c my_lock.c mf_brkhant.c my_alarm.c \
|
2000-07-31 21:29:14 +02:00
|
|
|
my_malloc.c my_realloc.c my_once.c mulalloc.c \
|
2001-12-09 23:08:24 +01:00
|
|
|
my_alloc.c safemalloc.c my_new.cc \
|
2010-07-05 14:00:39 +02:00
|
|
|
my_vle.c my_fopen.c my_fstream.c my_getsystime.c \
|
2000-07-31 21:29:14 +02:00
|
|
|
my_error.c errors.c my_div.c my_messnc.c \
|
|
|
|
mf_format.c mf_same.c mf_dirname.c mf_fn_ext.c \
|
2001-06-01 02:53:14 +02:00
|
|
|
my_symlink.c my_symlink2.c \
|
2009-10-06 13:04:51 +02:00
|
|
|
mf_pack.c mf_unixpath.c mf_arr_appstr.c \
|
2004-02-27 20:30:08 +01:00
|
|
|
mf_wcomp.c mf_wfile.c my_gethwaddr.c \
|
2000-07-31 21:29:14 +02:00
|
|
|
mf_qsort.c mf_qsort2.c mf_sort.c \
|
2006-05-31 18:44:09 +02:00
|
|
|
ptr_cmp.c mf_radix.c queues.c my_getncpus.c \
|
2005-06-07 18:17:09 +02:00
|
|
|
tree.c trie.c list.c hash.c array.c string.c typelib.c \
|
2000-07-31 21:29:14 +02:00
|
|
|
my_copy.c my_append.c my_lib.c \
|
2005-07-18 14:33:18 +02:00
|
|
|
my_delete.c my_rename.c my_redel.c \
|
2006-09-15 07:29:44 +02:00
|
|
|
my_chsize.c my_clock.c \
|
2000-07-31 21:29:14 +02:00
|
|
|
my_quick.c my_lockmem.c my_static.c \
|
2003-11-02 14:55:02 +01:00
|
|
|
my_sync.c my_getopt.c my_mkdir.c \
|
2005-05-18 19:10:17 +02:00
|
|
|
default_modify.c default.c \
|
2006-02-24 22:20:51 +01:00
|
|
|
my_compress.c checksum.c \
|
2007-03-12 13:15:11 +01:00
|
|
|
my_net.c my_port.c my_sleep.c \
|
2003-10-06 21:56:34 +02:00
|
|
|
charset.c charset-def.c my_bitmap.c my_bit.c md5.c \
|
2002-08-30 11:40:40 +02:00
|
|
|
my_gethostbyname.c rijndael.c my_aes.c sha1.c \
|
2005-03-25 23:44:54 +01:00
|
|
|
my_handler.c my_netware.c my_largepage.c \
|
2008-06-18 18:17:15 +02:00
|
|
|
my_memmem.c stacktrace.c \
|
2006-06-21 01:23:18 +02:00
|
|
|
my_windac.c my_access.c base64.c my_libwrap.c
|
2009-09-17 18:34:24 +02:00
|
|
|
|
|
|
|
if NEED_THREAD
|
|
|
|
# mf_keycache is used only in the server, so it is safe to leave the file
|
|
|
|
# out of the non-threaded library.
|
|
|
|
# In fact, it will currently not compile without thread support.
|
|
|
|
libmysys_a_SOURCES += mf_keycache.c
|
|
|
|
endif
|
|
|
|
|
2000-07-31 21:29:14 +02:00
|
|
|
EXTRA_DIST = thr_alarm.c thr_lock.c my_pthread.c my_thr_init.c \
|
2006-03-24 22:50:56 +01:00
|
|
|
thr_mutex.c thr_rwlock.c \
|
2006-05-12 10:51:07 +02:00
|
|
|
CMakeLists.txt mf_soundex.c \
|
2007-03-12 14:53:52 +01:00
|
|
|
my_conio.c my_wincond.c my_winthread.c
|
2000-07-31 21:29:14 +02:00
|
|
|
libmysys_a_LIBADD = @THREAD_LOBJECTS@
|
|
|
|
# test_dir_DEPENDENCIES= $(LIBRARIES)
|
2001-04-10 10:32:28 +02:00
|
|
|
# testhash_DEPENDENCIES= $(LIBRARIES)
|
2002-11-01 10:30:19 +01:00
|
|
|
# test_charset_DEPENDENCIES= $(LIBRARIES)
|
2003-01-19 01:24:02 +01:00
|
|
|
# charset2html_DEPENDENCIES= $(LIBRARIES)
|
2000-07-31 21:29:14 +02:00
|
|
|
DEFS = -DDEFAULT_BASEDIR=\"$(prefix)\" \
|
2009-07-31 21:22:02 +02:00
|
|
|
-DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
|
2000-07-31 21:29:14 +02:00
|
|
|
-DDEFAULT_CHARSET_HOME="\"$(MYSQLBASEdir)\"" \
|
|
|
|
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
|
2005-01-04 19:13:47 +01:00
|
|
|
-DDEFAULT_HOME_ENV=MYSQL_HOME \
|
2005-07-18 14:33:18 +02:00
|
|
|
-DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX \
|
2006-04-10 15:11:37 +02:00
|
|
|
-DDEFAULT_SYSCONFDIR="\"$(sysconfdir)\"" \
|
2000-07-31 21:29:14 +02:00
|
|
|
@DEFS@
|
|
|
|
|
2000-11-18 22:13:48 +01:00
|
|
|
libmysys_a_DEPENDENCIES= @THREAD_LOBJECTS@
|
2000-07-31 21:29:14 +02:00
|
|
|
|
|
|
|
# I hope this always does the right thing. Otherwise this is only test programs
|
2001-04-03 03:01:15 +02:00
|
|
|
FLAGS=$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) @NOINST_LDFLAGS@
|
2000-07-31 21:29:14 +02:00
|
|
|
|
2000-11-18 22:13:48 +01:00
|
|
|
#
|
|
|
|
# The CP .. RM stuff is to avoid problems with some compilers (like alpha ccc)
|
|
|
|
# which automaticly removes the object files you use to compile a final program
|
|
|
|
#
|
|
|
|
|
2005-06-02 18:40:25 +02:00
|
|
|
test_bitmap$(EXEEXT): my_bitmap.c $(LIBRARIES)
|
|
|
|
$(LINK) $(FLAGS) -DMAIN ./my_bitmap.c $(LDADD) $(LIBS)
|
|
|
|
|
2005-07-18 13:31:02 +02:00
|
|
|
test_priority_queue$(EXEEXT): queues.c $(LIBRARIES)
|
|
|
|
$(LINK) $(FLAGS) -DMAIN ./queues.c $(LDADD) $(LIBS)
|
|
|
|
|
2003-01-28 07:38:28 +01:00
|
|
|
test_thr_alarm$(EXEEXT): thr_alarm.c $(LIBRARIES)
|
2001-04-10 10:32:28 +02:00
|
|
|
$(CP) $(srcdir)/thr_alarm.c ./test_thr_alarm.c
|
2001-04-03 03:01:15 +02:00
|
|
|
$(LINK) $(FLAGS) -DMAIN ./test_thr_alarm.c $(LDADD) $(LIBS)
|
2003-01-28 07:38:28 +01:00
|
|
|
$(RM) -f ./test_thr_alarm.c
|
2000-07-31 21:29:14 +02:00
|
|
|
|
2003-01-28 07:38:28 +01:00
|
|
|
test_thr_lock$(EXEEXT): thr_lock.c $(LIBRARIES)
|
2001-04-10 10:32:28 +02:00
|
|
|
$(CP) $(srcdir)/thr_lock.c test_thr_lock.c
|
2001-04-03 03:01:15 +02:00
|
|
|
$(LINK) $(FLAGS) -DMAIN ./test_thr_lock.c $(LDADD) $(LIBS)
|
2003-01-28 07:38:28 +01:00
|
|
|
$(RM) -f ./test_thr_lock.c
|
2000-11-18 22:13:48 +01:00
|
|
|
|
2003-01-28 07:38:28 +01:00
|
|
|
test_vsnprintf$(EXEEXT): my_vsnprintf.c $(LIBRARIES)
|
2001-04-10 10:32:28 +02:00
|
|
|
$(CP) $(srcdir)/my_vsnprintf.c test_vsnprintf.c
|
2000-11-18 22:13:48 +01:00
|
|
|
$(LINK) $(FLAGS) -DMAIN ./test_vsnprintf.c $(LDADD) $(LIBS)
|
2003-01-28 07:38:28 +01:00
|
|
|
$(RM) -f test_vsnprintf.c
|
2003-02-04 20:52:14 +01:00
|
|
|
|
2003-01-28 07:38:28 +01:00
|
|
|
test_io_cache$(EXEEXT): mf_iocache.c $(LIBRARIES)
|
2001-11-04 00:54:00 +01:00
|
|
|
$(CP) $(srcdir)/mf_iocache.c test_io_cache.c
|
|
|
|
$(LINK) $(FLAGS) -DMAIN ./test_io_cache.c $(LDADD) $(LIBS)
|
2003-01-28 07:38:28 +01:00
|
|
|
$(RM) -f test_io_cache.c
|
2000-07-31 21:29:14 +02:00
|
|
|
|
2003-01-28 07:38:28 +01:00
|
|
|
test_dir$(EXEEXT): test_dir.c $(LIBRARIES)
|
2000-07-31 21:29:14 +02:00
|
|
|
$(LINK) $(FLAGS) -DMAIN $(srcdir)/test_dir.c $(LDADD) $(LIBS)
|
|
|
|
|
2002-10-01 21:57:10 +02:00
|
|
|
test_charset$(EXEEXT): test_charset.c $(LIBRARIES)
|
2000-07-31 21:29:14 +02:00
|
|
|
$(LINK) $(FLAGS) -DMAIN $(srcdir)/test_charset.c $(LDADD) $(LIBS)
|
|
|
|
|
2003-01-28 07:38:28 +01:00
|
|
|
testhash$(EXEEXT): testhash.c $(LIBRARIES)
|
2001-04-10 10:32:28 +02:00
|
|
|
$(LINK) $(FLAGS) -DMAIN $(srcdir)/testhash.c $(LDADD) $(LIBS)
|
2000-08-18 11:48:00 +02:00
|
|
|
|
2004-02-27 20:30:08 +01:00
|
|
|
test_gethwaddr$(EXEEXT): my_gethwaddr.c $(LIBRARIES)
|
|
|
|
$(CP) $(srcdir)/my_gethwaddr.c ./test_gethwaddr.c
|
|
|
|
$(LINK) $(FLAGS) -DMAIN ./test_gethwaddr.c $(LDADD) $(LIBS)
|
|
|
|
$(RM) -f ./test_gethwaddr.c
|
|
|
|
|
2005-10-14 01:14:23 +02:00
|
|
|
test_base64$(EXEEXT): base64.c $(LIBRARIES)
|
|
|
|
$(CP) $(srcdir)/base64.c ./test_base64.c
|
|
|
|
$(LINK) $(FLAGS) -DMAIN ./test_base64.c $(LDADD) $(LIBS)
|
|
|
|
$(RM) -f ./test_base64.c
|
|
|
|
|
2000-08-18 11:48:00 +02:00
|
|
|
# Don't update the files from bitkeeper
|
|
|
|
%::SCCS/s.%
|