Move src/makefile* under SVN instead of being generated.

This commit is contained in:
Sylvain Pion
2006-04-09 22:07:10 +00:00
parent 94e45ca536
commit e1a632e7cf
4 changed files with 194 additions and 177 deletions
@@ -320,182 +320,6 @@ EOF
}
sub make_src_makefiles(){
chdir "$RELEASEDIR/$VERSION" or die;
chdir 'src' or die;
@source_files = glob("*.C");
@object_files = map {substr($_, 0,-2) . '$(OBJ_EXT)'} @source_files;
$, = " \\\n";
open MFLIB, ">makefile_lib";
print MFLIB <<'EOF';
# Copyright (c) 2003,2004,2005,2006 Utrecht University (The Netherlands),
# ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany),
# INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
# (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria),
# and Tel-Aviv University (Israel). All rights reserved.
#
# This file is part of CGAL (www.cgal.org); you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; version 2.1 of the License.
# See the file LICENSE.LGPL distributed with CGAL.
#
# Licensees holding a valid commercial license may use this file in
# accordance with the commercial license agreement provided with the software.
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# $URL$
# $Id$
#
# Author(s) : Radu Ursu
# Sylvain Pion
# This is the makefile for compiling the CGAL object library libCGAL.a.
#
# N.B. There are different makefiles for creating the object library
# and the shared object library, because the suffix rules (in particular:
# the compiler flags) for these libraries are different.
#---------------------------------------------------------------------#
# include platform specific settings
#---------------------------------------------------------------------#
# Choose the right include file from the <cgalroot>/make directory.
CGAL_MAKEFILE = ENTER_YOUR_INCLUDE_MAKEFILE_HERE
include $(CGAL_MAKEFILE)
#---------------------------------------------------------------------#
# compiler flags
#---------------------------------------------------------------------#
CXXFLAGS = $(CGAL_LIB_CXXFLAGS)
#---------------------------------------------------------------------#
# Object files
#---------------------------------------------------------------------#
CGAL_OBJECTS = \
EOF
print MFLIB @object_files;
print MFLIB "\n";
print MFLIB <<'EOF';
#---------------------------------------------------------------------#
# target entries
#---------------------------------------------------------------------#
lib: lib_no_install
mv $(CGAL_LIB) $(CGAL_LIB_DESTINATION)
lib_no_install: $(CGAL_OBJECTS) $(CGAL_EXTRA_OBJECTS)
$(CGAL_LIB_CREATE)$(CGAL_LIB) \
`ls *$(OBJ_EXT) | awk '{for (i=1; i<=NF;++i){printf "$(CGAL_OBJ_PREFIX)";print $$i}}'`\
$(CGAL_LIB_LDFLAGS)
$(RANLIB) $(CGAL_LIB)
rm $(CGAL_OBJECTS) $(CGAL_EXTRA_OBJECTS)
clean:
rm -f $(CGAL_LIB) $(CGAL_OBJECTS) $(CGAL_EXTRA_OBJECTS)
#---------------------------------------------------------------------#
# suffix rules
#---------------------------------------------------------------------#
.C$(OBJ_EXT):
$(CGAL_CXX) $(CXXFLAGS) -c $<
EOF
close MFLIB;
open MFSHARED, ">makefile_sharedlib";
print MFSHARED <<'EOF';
# Copyright (c) 2004,2005,2006 Utrecht University (The Netherlands),
# ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany),
# INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
# (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria),
# and Tel-Aviv University (Israel). All rights reserved.
#
# This file is part of CGAL (www.cgal.org); you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; version 2.1 of the License.
# See the file LICENSE.LGPL distributed with CGAL.
#
# Licensees holding a valid commercial license may use this file in
# accordance with the commercial license agreement provided with the software.
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# $URL$
# $Id$
#
# Author(s) : Radu Ursu
# Sylvain Pion
# This is the makefile for compiling the CGAL shared object library libCGAL.so.
#
# N.B. There are different makefiles for creating the object library
# and the shared object library, because the suffix rules (in particular:
# the compiler flags) for these libraries are different.
#---------------------------------------------------------------------#
# include platform specific settings
#---------------------------------------------------------------------#
# Choose the right include file from the <cgalroot>/make directory.
CGAL_MAKEFILE = ENTER_YOUR_INCLUDE_MAKEFILE_HERE
include $(CGAL_MAKEFILE)
#---------------------------------------------------------------------#
# compiler flags
#---------------------------------------------------------------------#
CXXFLAGS = $(CGAL_SHARED_LIB_CXXFLAGS)
#---------------------------------------------------------------------#
# object files
#---------------------------------------------------------------------#
CGAL_OBJECTS = \
EOF
print MFSHARED @object_files;
print MFSHARED "\n";
print MFSHARED <<'EOF';
#---------------------------------------------------------------------#
# target entries
#---------------------------------------------------------------------#
lib: $(CGAL_OBJECTS) $(CGAL_EXTRA_OBJECTS)
$(CGAL_SHARED_LIB_CREATE)$(CGAL_SHARED_LIB) \
`ls *$(OBJ_EXT) | awk '{for (i=1; i<=NF;++i){printf "$(CGAL_OBJ_PREFIX)";print $$i}}'`\
$(CGAL_SHARED_LIB_LDFLAGS)
mv $(CGAL_SHARED_LIB) '$(CGAL_LIB_DESTINATION)'
rm $(CGAL_OBJECTS) $(CGAL_EXTRA_OBJECTS)
#---------------------------------------------------------------------#
# suffix rules
#---------------------------------------------------------------------#
.C$(OBJ_EXT):
$(CGAL_CXX) $(CXXFLAGS) -c $<
EOF
}
#---------------------------------------------------------------#
# CreateExampleTestDirs
#---------------------------------------------------------------#
@@ -1024,7 +848,6 @@ create_version_file();
create_version_tex_file();
make_testscripts();
set_file_headers();
make_src_makefiles();
CreateSrcTestDir();
CreateSrcCoreTestDir(); # Must be called after CreateSrcTestDir()
CreateSrcQtTestDir(); # Must be called after CreateSrcTestDir()