Makefile.am
上传用户:tsgydb
上传日期:2007-04-14
资源大小:10674k
文件大小:4k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. # Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
  2. # This library is free software; you can redistribute it and/or
  3. # modify it under the terms of the GNU Library General Public
  4. # License as published by the Free Software Foundation; either
  5. # version 2 of the License, or (at your option) any later version.
  6. # This library is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  9. # Library General Public License for more details.
  10. # You should have received a copy of the GNU Library General Public
  11. # License along with this library; if not, write to the Free
  12. # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  13. # MA 02111-1307, USA
  14. # This file is public domain and comes with NO WARRANTY of any kind
  15. target = libmysqlclient.la
  16. target_defs = -DUNDEF_THREADS_HACK
  17. LIBS   = @CLIENT_LIBS@
  18. INCLUDES = -I$(srcdir)/../include -I../include 
  19. -I$(srcdir)/.. -I$(top_srcdir) -I..
  20. include $(srcdir)/Makefile.shared
  21. libmysqlclient_la_SOURCES = $(target_sources)
  22. libmysqlclient_la_LIBADD = $(target_libadd)
  23. libmysqlclient_la_LDFLAGS = $(target_ldflags)
  24. EXTRA_DIST = Makefile.shared
  25. # This is called from the toplevel makefile
  26. link_sources:
  27.   set -x; 
  28.   ss=`echo $(mystringsobjects) | sed "s;.lo;.c;g"`; 
  29.   ds=`echo $(dbugobjects) | sed "s;.lo;.c;g"`; 
  30.   ms=`echo $(mysysobjects) | sed "s;.lo;.c;g"`; 
  31.   for f in $$ss; do 
  32.     rm -f $(srcdir)/$$f; 
  33.     @LN_CP_F@ $(srcdir)/../strings/$$f $(srcdir)/$$f; 
  34.   done; 
  35.   for f in $(mystringsextra); do 
  36.     rm -f $(srcdir)/$$f; 
  37.     @LN_CP_F@ $(srcdir)/../strings/$$f $(srcdir)/$$f; 
  38.   done; 
  39.   for f in $$ds; do 
  40.     rm -f $(srcdir)/$$f; 
  41.     @LN_CP_F@ $(srcdir)/../dbug/$$f $(srcdir)/$$f; 
  42.   done; 
  43.   for f in $$ms $(mysysheaders); do 
  44.     rm -f $(srcdir)/$$f; 
  45.     @LN_CP_F@ $(srcdir)/../mysys/$$f $(srcdir)/$$f; 
  46.   done;
  47. # This part requires GNUmake
  48. #
  49. # This makes a distribution file with only the files needed to compile
  50. # a minimal MySQL client library
  51. #
  52. # For a really minimal distribution (without debugging code) we could
  53. # keep only the stubs for safemalloc.c and debug.c
  54. #
  55. # A list of needed headers collected from the deps information 000213
  56. nh = global.h config-win32.h dbug.h errmsg.h global.h 
  57. m_ctype.h m_string.h 
  58. my_alarm.h my_config.h my_dir.h my_list.h my_net.h my_sys.h 
  59. mysql.h mysql_com.h mysql_version.h mysqld_error.h mysys_err.h 
  60. my_pthread.h thr_alarm.h violite.h hash.h
  61. # Get a list of the needed objects  
  62. lobjs = $(mysysobjects1) $(dbugobjects) $(mystringsobjects)
  63. do-lib-dist:
  64. dir=libmysql-$(MYSQL_NO_DASH_VERSION); 
  65. srcs1=`echo $(lobjs) | sed "s;.lo;.c;g"`; 
  66. srcs2=$(target_sources); 
  67. srcs="$$srcs1 $$srcs2"; 
  68. objs1=`echo $(lobjs) | sed "s;.lo;.o;g"`; 
  69. objs2=`echo $(target_sources) | sed "s;.c;.o;g"`; 
  70. objs="$$objs1 $$objs2"; 
  71. rm -rf $$dir; 
  72. mkdir $$dir; 
  73. $(INSTALL_DATA) $$srcs $(mysysheaders) $$dir; 
  74. for i in $(nh); do $(INSTALL_DATA) ../include/$$i $$dir; done; 
  75. echo "# A very minimal Makefile to compile" > $$dir/Makefile; 
  76. echo "# the minimized libmysql library" >> $$dir/Makefile; 
  77. echo "# This file is autogenerated from Makefile.am" >> $$dir/Makefile; 
  78. echo 'CFLAGS= -I. -DUNDEF_THREADS_HACK' >>$$dir/Makefile; 
  79. echo "obj=$$objs"  >>$$dir/Makefile; 
  80. echo 'all: libmysql.a'  >>$$dir/Makefile; 
  81. echo 'libmysql.a: $$(obj)'  >>$$dir/Makefile; 
  82. echo ' $$(AR) r $$@ $$?'  >>$$dir/Makefile; 
  83. gtar cvzf $$dir.tar.gz $$dir; 
  84. cd $$dir; gmake