mirror of https://github.com/CGAL/cgal
139 lines
3.5 KiB
Makefile
Executable File
139 lines
3.5 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
# export DH_VERBOSE=1
|
|
|
|
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
|
|
CXXFLAGS += -g
|
|
endif
|
|
|
|
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
|
INSTALL_PROGRAM += -s
|
|
endif
|
|
|
|
ifndef CXX
|
|
CXX = g++
|
|
endif
|
|
|
|
ifeq ($(DEB_BUILD_ARCH), arm)
|
|
LAPACK_OPTION=
|
|
else ifeq ($(DEB_BUILD_ARCH), m68k)
|
|
LAPACK_OPTION=
|
|
else
|
|
LAPACK_OPTION="--with-BLASGCCATLAS --with-LAPACK"
|
|
endif
|
|
|
|
build: build-stamp
|
|
build-stamp: patch-stamp
|
|
dh_testdir
|
|
dh_clean -k
|
|
QTDIR=/usr/share/qt3 ./install_cgal -ni --CXX $(CXX) \
|
|
--prefix $(CURDIR)/debian/tmp/usr \
|
|
--without-autofind --with-ZLIB --with-BOOST --with-BOOST_PROGRAM_OPTIONS \
|
|
--with-GMP --with-GMPXX --with-MPFR \
|
|
--with-X11 --with-OPENGL --with-QT3MT \
|
|
--with-BLASGCCATLAS $(LAPACK_OPTION)
|
|
$(MAKE) -C $(CURDIR)/debian/tests rounding_modes
|
|
LD_LIBRARY_PATH=$(CURDIR)/debian/tmp/usr/lib $(CURDIR)/debian/tests/rounding_modes
|
|
$(MAKE) -C $(CURDIR)/debian/tests clean
|
|
touch build-stamp
|
|
|
|
clean: clean-patched unpatch
|
|
clean-patched: patch
|
|
dh_testdir
|
|
dh_testroot
|
|
rm -f build-stamp configure-stamp
|
|
for DIR in src/*; do $(MAKE) -C $$DIR clean; done
|
|
-rm -f compile.log install.log install.completed
|
|
-rm -f config/support/tmp_test*
|
|
-rm -f config/testfiles/a.out
|
|
-for DIR in include/CGAL/config/*; do \
|
|
if test x$$DIR != xinclude/CGAL/config/msvc; then \
|
|
rm -fr $$DIR; \
|
|
fi; \
|
|
done
|
|
-rm -f make/makefile_*
|
|
-rm -fr lib/???????*
|
|
-rm -fr config/install
|
|
if test -d examples.orig; then rm -r examples && mv examples.orig examples; fi
|
|
if test -d demo.orig; then rm -r demo && mv demo.orig demo; fi
|
|
dh_clean
|
|
|
|
install: build
|
|
dh_testdir
|
|
dh_testroot
|
|
# dh_clean -k
|
|
dh_installdirs
|
|
|
|
mkdir -p debian/tmp/usr/share/doc/cgal
|
|
|
|
rm debian/tmp/usr/bin/cgal_make_macosx_app
|
|
|
|
cat make/makefile_* | sed -f debian/misc/adjust-default-makefile.sed >debian/tmp/usr/share/cgal/cgal.mk
|
|
|
|
mv examples examples.orig
|
|
cp -a examples.orig examples
|
|
find examples -iname makefile | xargs -r sed -i -f debian/misc/adjust-demo-examples-makefiles.sed
|
|
tar cf - examples | gzip --best >debian/tmp/usr/share/doc/cgal/examples.tar.gz
|
|
rm -r examples
|
|
mv examples.orig examples
|
|
|
|
mv demo demo.orig
|
|
cp -a demo.orig demo
|
|
find demo -iname makefile | xargs -r sed -i -f debian/misc/adjust-demo-examples-makefiles.sed
|
|
tar cf - demo | gzip --best >debian/tmp/usr/share/doc/cgal/demo.tar.gz
|
|
rm -r demo
|
|
mv demo.orig demo
|
|
|
|
cp -a CHANGES debian/tmp/usr/share/doc/cgal/changelog
|
|
cp -a README debian/tmp/usr/share/doc/cgal
|
|
|
|
dh_install --sourcedir=debian/tmp --list-missing
|
|
|
|
ln -s libcgal2 debian/libcgal-demo/usr/share/doc/libcgal-demo
|
|
ln -s libcgal2 debian/libcgal-dev/usr/share/doc/libcgal-dev
|
|
|
|
install -d debian/libcgal2/DEBIAN
|
|
install -m644 debian/libcgal2.shlibs debian/libcgal2/DEBIAN/shlibs
|
|
|
|
binary-indep: build install
|
|
dh_testdir -i
|
|
dh_testroot -i
|
|
dh_link -i
|
|
dh_compress -i
|
|
dh_fixperms -i
|
|
dh_installdeb -i
|
|
dh_gencontrol -i
|
|
dh_md5sums -i
|
|
dh_builddeb -i
|
|
|
|
binary-arch: build install
|
|
dh_testdir -a
|
|
dh_testroot -a
|
|
dh_installdocs -plibcgal2 debian/copyright
|
|
dh_installchangelogs -plibcgal2
|
|
dh_installman -plibcgal-dev debian/misc/cgal_create_makefile.1
|
|
dh_link -a
|
|
dh_strip -a
|
|
dh_compress -a
|
|
dh_fixperms -a
|
|
dh_makeshlibs -a
|
|
dh_installdeb -a
|
|
dh_shlibdeps -a -ldebian/libcgal2/usr/lib
|
|
dh_gencontrol -a
|
|
dh_md5sums -a
|
|
dh_builddeb -a
|
|
|
|
binary: binary-indep binary-arch
|
|
|
|
patch: patch-stamp
|
|
patch-stamp:
|
|
dpatch apply-all
|
|
touch patch-stamp
|
|
|
|
unpatch:
|
|
dpatch deapply-all
|
|
rm -fr patch-stamp debian/patched
|
|
|
|
.PHONY: build clean binary-indep binary-arch binary install patch unpatch
|