Commit ba4a5757 authored by tlh2000's avatar tlh2000

* moved things around

git-svn-id: http://svn.code.sf.net/p/cunit/code/trunk@123 f00e6729-6848-4c17-8bfb-678c97c00071
parent e48c7ab2
#
# Jamfile to build CUnit - Source root Directory
# (see http://www.freetype.org/jam/index.html)
#
# Copyright (C) 2004-2006 Jerry St.Clair
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#---------------------------------------------------------------------------
SubDir TOP CUnit ;
SubDirHdrs $(CUNIT_HDR_DIR) $(CUNIT_WIN_DIR) ;
# set location for target, source, and temporary files
LOCATE_TARGET = $(BUILD_DIR)$(SLASH)CUnit ;
SEARCH_SOURCE +=
$(TOP)$(SLASH)CUnit
$(TOP)$(SLASH)CUnit$(SLASH)Headers
$(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Framework
;
SOURCES =
CUError.c
MyMem.c
TestDB.c
TestRun.c
Util.c
;
if $(BUILD_AUTOMATED)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Automated ;
SOURCES += Automated.c ;
}
if $(BUILD_BASIC)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Basic ;
SOURCES += Basic.c ;
}
if $(BUILD_CONSOLE)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Console ;
SOURCES += Console.c ;
}
if $(BUILD_CURSES)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Curses ;
SOURCES += Curses.c ;
}
if $(BUILD_WINDOWS)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Win ;
SOURCES += Win.c ;
}
if $(BUILD_SHARED_LIB)
{
if $(NT)
{
# extra symbolic targets for building CUnit library
DEPENDS cunit CUnit libcunit : $(CUNIT_LIB_NAME)$(SUFSHR) ;
SubDirCcFlags -DCU_DLL -DCU_BUILD_DLL ;
Main $(CUNIT_LIB_NAME)$(SUFSHR) : $(SOURCES) ;
MakeLocate $(CUNIT_LIB_NAME)$(SUFSHR) : $(BUILD_DIR) ;
if $(BCCROOT) || ( $(TOOLSET) = BORLANDC )
{
LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR) += -WD -lGi ;
}
else if $(MSVCNT) || ( $(TOOLSET) = VISUALC )
{
LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR) = $(LINKFLAGS) /DLL /IMPLIB:$(BUILD_DIR)$(SLASH)$(CUNIT_LIB_NAME)_dll$(SUFLIB) ;
}
else if $(MINGW) || ( $(TOOLSET) = MINGW )
{
SubDirCcFlags -fPIC ;
LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR) +=
-shared
libcunit_dll.def
-Wl,--out-implib,$(BUILD_DIR)$(SLASH)$(CUNIT_LIB_NAME)_dll$(SUFLIB)
;
}
else
{
EXIT Building of CUnit shared library is not supported for this compiler on Windows. ;
}
MakeImportLibrary $(CUNIT_LIB_NAME)$(SUFSHR) : $(CUNIT_LIB_NAME)_dll$(SUFLIB) ;
# install import library
if $(INSTALL_LIB_DIR)
{
InstallLib $(INSTALL_LIB_DIR) : $(CUNIT_LIB_NAME)_dll$(SUFLIB) ;
}
# install shared library
if $(INSTALL_BIN_DIR)
{
InstallBin $(INSTALL_BIN_DIR) : $(CUNIT_LIB_NAME)$(SUFSHR) ;
}
}
else if $(UNIX) || ( $(OS) = LINUX )
{
# extra symbolic targets for building CUnit library
DEPENDS cunit CUnit libcunit : $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) ;
Main $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) : $(SOURCES) ;
MakeLocate $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) : $(BUILD_DIR) ;
CCFLAGS on $(SOURCES) += -fPIC ;
LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) +=
-shared
-Wl,-soname,$(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION_MAJOR)
;
# install shared library
if $(INSTALL_LIB_DIR)
{
InstallLib $(INSTALL_BIN_DIR) : $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) ;
}
}
}
if $(BUILD_STATIC_LIB)
{
Library $(CUNIT_LIB_NAME) : $(SOURCES) ;
MakeLocate $(CUNIT_LIB_NAME)$(SUFLIB) : $(BUILD_DIR) ;
# install static library
if $(INSTALL_LIB_DIR)
{
InstallLib $(INSTALL_LIB_DIR) : $(CUNIT_LIB_NAME)$(SUFLIB) ;
}
}
SubInclude TOP CUnit Headers ;
SubInclude TOP CUnit Sources Test ;
## Process this file with automake to produce Makefile.in
SUBDIRS = Sources Headers
# #
# Jamfile to build CUnit - Root Directory # Jamfile to build CUnit - Source root Directory
# (see http://www.freetype.org/jam/index.html) # (see http://www.freetype.org/jam/index.html)
# #
# Copyright (C) 2004-2006 Jerry St.Clair # Copyright (C) 2004-2006 Jerry St.Clair
...@@ -19,12 +19,139 @@ ...@@ -19,12 +19,139 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
SubDir TOP ; SubDir TOP CUnit ;
SubInclude TOP CUnit ; SubDirHdrs $(CUNIT_HDR_DIR) $(CUNIT_WIN_DIR) ;
SubInclude TOP Examples ;
SubInclude TOP Man ; # set location for target, source, and temporary files
SubInclude TOP Share ; LOCATE_TARGET = $(BUILD_DIR)$(SLASH)CUnit ;
SubInclude TOP doc ;
SEARCH_SOURCE +=
$(TOP)$(SLASH)CUnit
$(TOP)$(SLASH)CUnit$(SLASH)Headers
$(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Framework
;
SOURCES =
CUError.c
MyMem.c
TestDB.c
TestRun.c
Util.c
;
if $(BUILD_AUTOMATED)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Automated ;
SOURCES += Automated.c ;
}
if $(BUILD_BASIC)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Basic ;
SOURCES += Basic.c ;
}
if $(BUILD_CONSOLE)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Console ;
SOURCES += Console.c ;
}
if $(BUILD_CURSES)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Curses ;
SOURCES += Curses.c ;
}
if $(BUILD_WINDOWS)
{
SEARCH_SOURCE += $(TOP)$(SLASH)CUnit$(SLASH)Sources$(SLASH)Win ;
SOURCES += Win.c ;
}
if $(BUILD_SHARED_LIB)
{
if $(NT)
{
# extra symbolic targets for building CUnit library
DEPENDS cunit CUnit libcunit : $(CUNIT_LIB_NAME)$(SUFSHR) ;
SubDirCcFlags -DCU_DLL -DCU_BUILD_DLL ;
Main $(CUNIT_LIB_NAME)$(SUFSHR) : $(SOURCES) ;
MakeLocate $(CUNIT_LIB_NAME)$(SUFSHR) : $(BUILD_DIR) ;
if $(BCCROOT) || ( $(TOOLSET) = BORLANDC )
{
LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR) += -WD -lGi ;
}
else if $(MSVCNT) || ( $(TOOLSET) = VISUALC )
{
LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR) = $(LINKFLAGS) /DLL /IMPLIB:$(BUILD_DIR)$(SLASH)$(CUNIT_LIB_NAME)_dll$(SUFLIB) ;
}
else if $(MINGW) || ( $(TOOLSET) = MINGW )
{
SubDirCcFlags -fPIC ;
LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR) +=
-shared
libcunit_dll.def
-Wl,--out-implib,$(BUILD_DIR)$(SLASH)$(CUNIT_LIB_NAME)_dll$(SUFLIB)
;
}
else
{
EXIT Building of CUnit shared library is not supported for this compiler on Windows. ;
}
MakeImportLibrary $(CUNIT_LIB_NAME)$(SUFSHR) : $(CUNIT_LIB_NAME)_dll$(SUFLIB) ;
# install import library
if $(INSTALL_LIB_DIR)
{
InstallLib $(INSTALL_LIB_DIR) : $(CUNIT_LIB_NAME)_dll$(SUFLIB) ;
}
# install shared library
if $(INSTALL_BIN_DIR)
{
InstallBin $(INSTALL_BIN_DIR) : $(CUNIT_LIB_NAME)$(SUFSHR) ;
}
}
else if $(UNIX) || ( $(OS) = LINUX )
{
# extra symbolic targets for building CUnit library
DEPENDS cunit CUnit libcunit : $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) ;
Main $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) : $(SOURCES) ;
MakeLocate $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) : $(BUILD_DIR) ;
CCFLAGS on $(SOURCES) += -fPIC ;
LINKFLAGS on $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) +=
-shared
-Wl,-soname,$(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION_MAJOR)
;
# install shared library
if $(INSTALL_LIB_DIR)
{
InstallLib $(INSTALL_BIN_DIR) : $(CUNIT_LIB_NAME)$(SUFSHR).$(VERSION).$(RELEASE) ;
}
}
}
if $(BUILD_STATIC_LIB)
{
Library $(CUNIT_LIB_NAME) : $(SOURCES) ;
MakeLocate $(CUNIT_LIB_NAME)$(SUFLIB) : $(BUILD_DIR) ;
# install static library
if $(INSTALL_LIB_DIR)
{
InstallLib $(INSTALL_LIB_DIR) : $(CUNIT_LIB_NAME)$(SUFLIB) ;
}
}
SubInclude TOP CUnit Headers ;
SubInclude TOP CUnit Sources Test ;
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
COMPILE_DIRS = CUnit doc Man Share SUBDIRS = Sources Headers
if ENABLE_EXAMPLES
EXAMPLE_COMPILE_DIR = Examples
endif
COMPILE_DIRS += $(EXAMPLE_COMPILE_DIR)
SUBDIRS = ${COMPILE_DIRS}
distdir=${PACKAGE}-${VERSION}-${RELEASE}
WD=`pwd`
RPM_BUILD_ROOT=${WD}/BUILD
RPM_SOURCE_DIR=${WD}/SOURCES
#RPM_DEFINES=--define "_topdir ${WD}" --define "_prefix ${RPM_BUILD_ROOT}" --define "_unpackaged_files_terminate_build 0"
RPM_DEFINES=--define "_topdir ${WD}" --define "_unpackaged_files_terminate_build 0" --define "_prefix /usr/local"
RPMFLAGS=--buildroot ${RPM_BUILD_ROOT}
ZIP=zip
RPM=rpmbuild
PACKAGE_TMPSPEC=./SPECS/@PACKAGE@-@VERSION@-@RELEASE@.spec
SPECFILE=@PACKAGE@".spec"
CHANGELOG="ChangeLog"
SOURCE_GZIP_FILE=@PACKAGE@-@VERSION@-@RELEASE@.tar.gz
SOURCE_ZIP_FILE=@PACKAGE@-@VERSION@-@RELEASE@.zip
SOURCE_TAR_FILE=@PACKAGE@-@VERSION@-@RELEASE@.tar
TAR_EXCLUDES=--exclude '*/BUILD/*' --exclude '*/SOURCES/*' --exclude '*/RPMS/*' --exclude '*/SRPMS/*' \
--exclude '*/SPECS/*' --exclude '*.tar' --exclude '*.zip' --exclude '*~' --exclude '*.gz' \
--exclude '*.rpm' --exclude 'autom4te.cache'
ZIP_EXCLUDES=-x "*/BUILD/*" -x "*/SOURCES/*" -x "*/RPMS/*" -x "*/SRPMS/*" -x "*/SPECS/*" \
-x "*.tar" -x "*.zip" -x "*~" -x "*.gz" -x "*.rpm" -x "autom4te.cache"
RPM_ATHLON=./RPMS/athlon/@PACKAGE@-@VERSION@-@RELEASE@.athlon.rpm
RPM_I386=./RPMS/i386/@PACKAGE@-@VERSION@-@RELEASE@.i386.rpm
RPM_I486=./RPMS/i486/@PACKAGE@-@VERSION@-@RELEASE@.i486.rpm
RPM_I586=./RPMS/i586/@PACKAGE@-@VERSION@-@RELEASE@.i586.rpm
RPM_I686=./RPMS/i686/@PACKAGE@-@VERSION@-@RELEASE@.i686.rpm
RPM_K6=./RPMS/athlon/@PACKAGE@-@VERSION@-@RELEASE@.k6.rpm
RPM_SRC=./SRPMS/@PACKAGE@-@VERSION@-@RELEASE@.src.rpm
EXTRA_DIST=cunit.pc.in
EXTRA_REMOVE=CUnit-Memory-Dump.lst ${SOURCE_TAR_FILE} ${SOURCE_ZIP_FILE} ${SOURCE_GZIP_FILE} \
*.rpm *.o *.ncb *.plg *.opt *.clw *.ilk *.exe *.pdb *.lib
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = cunit.pc
RPMDIRS=BUILD SOURCES RPMS RPMS/i386 SRPMS SPECS
clean-all: clean
rm -f ${SOURCE_GZIP_FILE} ${SOURCE_ZIP_FILE} ${SOURCE_TAR_FILE} *.rpm
rm -rf ${RPMDIRS} `find . -name "Temp"` `find . -name "Debug"`
for file in ${EXTRA_REMOVE}; do rm -f `find . -name "${file}"`; done
distclean-all: distclean
rm -f ${SOURCE_GZIP_FILE} ${SOURCE_ZIP_FILE} ${SOURCE_TAR_FILE} *.rpm
rm -rf ${RPMDIRS}
rpm: rpm-package
zip: clean
cd .. && \
rm -f ${SOURCE_ZIP_FILE} && \
${ZIP} -rT ${SOURCE_ZIP_FILE} @PACKAGE@-@VERSION@-@RELEASE@/* ${ZIP_EXCLUDES} && \
cp -f ${SOURCE_ZIP_FILE} ./@PACKAGE@-@VERSION@-@RELEASE@/ && \
cd @PACKAGE@-@VERSION@-@RELEASE@
tarball: clean
set -x
cd .. && \
rm -f ${SOURCE_TAR_FILE} && \
tar cvf ${SOURCE_TAR_FILE} ${TAR_EXCLUDES} @PACKAGE@-@VERSION@-@RELEASE@/* && \
cp -f ${SOURCE_TAR_FILE} ./@PACKAGE@-@VERSION@-@RELEASE@/ && \
rm -f ${SOURCE_TAR_FILE} && \
cd @PACKAGE@-@VERSION@-@RELEASE@
gzip: clean tarball
rm -f ${SOURCE_GZIP_FILE} && \
gzip ${SOURCE_TAR_FILE}
rpm-package: gzip
rm -rf ${RPMDIRS} && \
mkdir -p ${RPMDIRS} && \
cp ${SPECFILE} ${PACKAGE_TMPSPEC} && \
echo "%changelog" >> ${PACKAGE_TMPSPEC} && \
cat ${CHANGELOG} >> ${PACKAGE_TMPSPEC} && \
export RPM_BUILD_ROOT=${RPM_BUILD_ROOT} && \
cp ${SOURCE_GZIP_FILE} ${RPM_SOURCE_DIR}
${RPM} ${RPM_DEFINES} ${RPMFLAGS} -bb ${PACKAGE_TMPSPEC} && \
( (cp -f ${RPM_ATHLON} .) || (cp -f ${RPM_I386} .) || (cp -f ${RPM_I486} .) \
|| (cp -f ${RPM_I586} .) || (cp -f ${RPM_I686} .) \
|| (cp -f ${RPM_K6} .) || (cp -f ${RPM_NOARCH} .) ) && \
rm -rf ${RPMDIRS}
#
# Jamfile to build CUnit - Root Directory
# (see http://www.freetype.org/jam/index.html)
#
# Copyright (C) 2004-2006 Jerry St.Clair
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library 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
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#---------------------------------------------------------------------------
SubDir TOP ;
SubInclude TOP CUnit ;
SubInclude TOP Examples ;
SubInclude TOP Man ;
SubInclude TOP Share ;
SubInclude TOP doc ;
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment