#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

APPNAME := virtransim
builddir:
	mkdir -p builddir

build: build-stamp

build-stamp: # Add here commands to compile the package.
	ln -s /usr/include/glib-2.0/glib-object.h /usr/include/glib-object.h || true
	gcc -shared -I/usr/include/gtk-2.0 -I/usr/include/glib-2.0 src/libvirtransim.c -I/usr/lib/glib-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0  -I/usr/include/hildon-1 -I/usr/include/gconf/2 -DMAEMO_CHANGES -o debian/$(APPNAME)/usr/lib/hildon-control-panel/libvirtransim.so
	#docbook-to-man debian/$(APPNAME).sgml > $(APPNAME).1

	touch $@

clean:
	# dh_testdir
	# dh_testroot
	rm -f build-stamp

	# Add here commands to clean up after the build process.
	rm -rf builddir
	rm debian/$(APPNAME).substvars || exit 0
	rm debian/$(APPNAME).debhelper.log || exit 0
	rm debian/files || exit 0
	rm debian/$(APPNAME).tarlist || exit 0
	# dh_clean

install: build
	# dh_testdir
	# dh_testroot
	# dh_clean -k
	dh_installdirs

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	# dh_testdir
	# dh_testroot
	dh_installdocs
	dh_installexamples
	dh_installman
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
