#!/usr/bin/make -f # -*- makefile -*- CFLAGS = -Wall -g SCONS_OPTIONS = CC="ccache gcc" CXX="ccache g++" INSTALL_PREFIX=/usr -j2 SCONS= scons $(SCONS_OPTIONS) ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif # shared library versions, option 1 major=0 INSTALLROOT=$(CURDIR)/debian/tmp DATADIR=$(INSTALLROOT)/usr/share build: build-stamp build-stamp: dh_testdir cd $(CURDIR) && $(SCONS) libascend tcltk pygtk models cd $(CURDIR) && $(SCONS) doc/book.pdf touch build-stamp clean: dh_testdir rm -f build-stamp -cd $(CURDIR) && $(SCONS) -c find $(CURDIR) -name ".scon*" | xargs rm -rf find $(CURDIR) -type f -name "*.pyc" | xargs rm -rf find $(CURDIR) -type f -name "*.pyo" | xargs rm -rf find $(CURDIR) -type f -name "*.o" | xargs rm -rf find $(CURDIR) -type f -name "*.os" | xargs rm -rf find $(CURDIR) -type f -name "*.a" | xargs rm -rf -rm $(CURDIR)/doc/*.tex -rm -rf $(CURDIR)/doc/html # dh_testroot dh_clean install: build dh_testdir # dh_testroot dh_clean -k dh_installdirs mkdir -p $(INSTALLROOT)/usr cd $(CURDIR) && $(SCONS) INSTALL_ROOT=$(INSTALLROOT) install # cd $(CURDIR)/pygtk/gnome && install -m 644 -D ascend.desktop $(INSTALLROOT)$(DATADIR)/applications/ascend.desktop && install -m 644 -D ascend.png $(INSTALLROOT)$(DATADIR)/icons/ascend-app.png && install -m 644 -D ascend.png $(INSTALLROOT)$(DATADIR)/icons/hicolor/64x64/ascend.png && install -m 644 -D ascend.xml $(CURDIR)/debian/ascend.mime # dh_install --autodest dh_desktop dh_installmime dh_installman debian/ascend.man dh_installman debian/ascend4.man dh_installman debian/ascend-config.man # Build architecture-independent files here. binary-indep: dh_testdir dh_testroot -cd $(CUR_DIR) && $(SCONS) doc # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs CHANGELOG.txt dh_installdocs dh_installexamples dh_installman dh_link dh_strip dh_compress dh_fixperms dh_makeshlibs dh_installdeb dh_shlibdeps -L ascend -l debian/ascend/usr/lib dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure