mirror of https://github.com/CGAL/cgal
123 lines
3.1 KiB
Makefile
Executable File
123 lines
3.1 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
|
|
.NOTPARALLEL:
|
|
|
|
# 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
|
|
|
|
configure-stamp: patch-stamp
|
|
dh_testdir
|
|
mkdir -p static
|
|
cd static && cmake .. \
|
|
-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_SKIP_RPATH=TRUE -DCGAL_CXX_FLAGS=-D_REENTRANT \
|
|
-DBUILD_SHARED_LIBS=FALSE -DWITH_demo=OFF -DWITH_examples=OFF
|
|
mkdir -p shared
|
|
cd shared && cmake .. \
|
|
-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_SKIP_RPATH=TRUE -DCGAL_CXX_FLAGS=-D_REENTRANT \
|
|
-DBUILD_SHARED_LIBS=TRUE -DWITH_demo=OFF -DWITH_examples=OFF
|
|
touch configure-stamp
|
|
|
|
build: build-stamp
|
|
build-stamp: configure-stamp
|
|
dh_testdir
|
|
dh_clean -k
|
|
$(MAKE) -C static
|
|
$(MAKE) -C shared
|
|
$(MAKE) -C debian/tests rounding_modes1
|
|
LD_LIBRARY_PATH=shared/lib debian/tests/rounding_modes1
|
|
$(MAKE) -C debian/tests rounding_modes2
|
|
LD_LIBRARY_PATH=shared/lib debian/tests/rounding_modes2
|
|
touch build-stamp
|
|
|
|
clean: clean-patched unpatch
|
|
clean-patched: patch
|
|
dh_testdir
|
|
dh_testroot
|
|
$(MAKE) -C debian/tests clean
|
|
rm -fr shared static
|
|
rm -f build-stamp configure-stamp
|
|
dh_clean
|
|
|
|
install: build
|
|
dh_testdir
|
|
dh_testroot
|
|
# dh_clean -k
|
|
dh_installdirs
|
|
|
|
$(MAKE) -C static DESTDIR=$(CURDIR)/debian/tmp install
|
|
$(MAKE) -C shared DESTDIR=$(CURDIR)/debian/tmp install
|
|
|
|
# $(MAKE) -C shared DESTDIR=$(CURDIR)/debian/tmp install_FindCGAL
|
|
mkdir -p debian/tmp/usr/share/cmake-2.4/Modules
|
|
cp cmake/modules/FindCGAL.cmake debian/tmp/usr/share/cmake-2.4/Modules
|
|
|
|
mv debian/tmp/usr/share/doc/CGAL-3.4 debian/tmp/usr/share/doc/cgal
|
|
mv debian/tmp/usr/share/doc/cgal/CHANGES debian/tmp/usr/share/doc/cgal/changelog
|
|
rm debian/tmp/usr/share/doc/cgal/LICENSE*
|
|
rm debian/tmp/usr/share/doc/cgal/AUTHORS
|
|
|
|
tar cf - examples | gzip --best >debian/tmp/usr/share/doc/cgal/examples.tar.gz
|
|
tar cf - demo | gzip --best >debian/tmp/usr/share/doc/cgal/demo.tar.gz
|
|
|
|
rm debian/tmp/usr/bin/cgal_make_macosx_app
|
|
|
|
dh_install --sourcedir=debian/tmp --list-missing
|
|
|
|
ln -s libcgal3 debian/libcgal-demo/usr/share/doc/libcgal-demo
|
|
mkdir -p debian/libcgal-dev/usr/share/doc
|
|
ln -s libcgal3 debian/libcgal-dev/usr/share/doc/libcgal-dev
|
|
|
|
#install -d debian/libcgal3/DEBIAN
|
|
#install -m644 debian/libcgal3.shlibs debian/libcgal3/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 -plibcgal3 debian/copyright
|
|
dh_installchangelogs -plibcgal3
|
|
dh_installman -plibcgal-dev auxiliary/cgal_create_cmake_script.1
|
|
dh_link -a
|
|
dh_strip -a
|
|
dh_compress -a
|
|
dh_fixperms -a
|
|
dh_makeshlibs -a
|
|
dh_installdeb -a
|
|
dh_shlibdeps -a -ldebian/libcgal3/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 configure patch unpatch
|