4 # Uncomment this to turn on verbose mode.
7 # These are used for cross-compiling and for saving the configure script
8 # from having to guess our platform (since we know it already)
9 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
10 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
11 DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
12 DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
15 LDFLAGS = -Wl,--as-needed
17 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
23 ifeq ($(DEB_HOST_ARCH_OS),linux)
24 LINUX_CONF_ARGS_STD=--enable-wlan
25 LINUX_CONF_ARGS_ALL=--enable-wlan --enable-ibm
28 ifeq ($(DEB_HOST_ARCH_CPU),i386)
29 ENABLE_NVIDIA=--enable-nvidia
32 ifeq ($(DEB_HOST_ARCH_CPU),amd64)
33 ENABLE_NVIDIA=--enable-nvidia
36 COMMON_CONFIGURE_FLAGS = --host=$(DEB_HOST_GNU_TYPE) \
37 --build=$(DEB_BUILD_GNU_TYPE) \
38 --prefix=/usr --sysconfdir=/etc \
39 --mandir=\$${prefix}/share/man \
40 --infodir=\$${prefix}/share/info \
43 configure: config-stamp
49 AUTOMAKE=automake-1.11 ./autogen.sh
51 ln -sf /usr/share/misc/config.sub .
52 ln -sf /usr/share/misc/config.guess .
54 mkdir build-std build-cli build-all
56 cd build-std && CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
57 ../configure $(COMMON_CONFIGURE_FLAGS) $(LINUX_CONF_ARGS_STD)
59 cd build-cli && CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
60 ../configure $(COMMON_CONFIGURE_FLAGS) \
61 --disable-lua --disable-double-buffer --disable-x11 \
62 --disable-xdamage --disable-own-window --disable-xft \
63 --disable-hddtemp --disable-alsa --disable-portmon \
66 cd build-all && CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
67 ../configure $(COMMON_CONFIGURE_FLAGS) \
68 --enable-imlib2 --enable-rss --enable-weather-xoap \
69 --enable-eve --enable-lua-cairo --enable-lua-imlib2 \
70 --disable-static --enable-argb \
71 $(LINUX_CONF_ARGS_ALL) $(ENABLE_NVIDIA)
77 build-stamp: config-stamp
80 cd build-std && $(MAKE)
81 cd build-cli && $(MAKE)
82 cd build-all && $(MAKE)
90 rm -f build-stamp config-stamp
92 rm -f configure.ac configure config.h.in src/config.h.in \
93 src/defconfig.h compile install-sh missing ltmain.sh depcomp \
94 Makefile.in doc/Makefile.in src/Makefile.in \
95 data/Makefile.in lua/Makefile.in \
96 aclocal.m4 m4/libtool.m4 m4/ltversion.m4 \
97 m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4
99 rm -rf build-std build-cli build-all
100 rm -f config.guess config.sub
109 cd build-std && $(MAKE) install DESTDIR=$(CURDIR)/debian/conky-std
110 cd build-cli && $(MAKE) install DESTDIR=$(CURDIR)/debian/conky-cli
111 cd build-all && $(MAKE) install DESTDIR=$(CURDIR)/debian/conky-all
113 # Clean up cruft left upstream
114 rm -rf debian/conky-std/usr/lib debian/conky-cli/usr/lib \
115 debian/conky-all/usr/lib/conky/*.la \
116 debian/conky-all/usr/lib/conky/*.so.?
118 binary-indep: build install
120 binary-arch: build install
123 dh_installchangelogs ChangeLog
126 dh_installman -a doc/conky.1
138 binary: binary-arch binary-indep
140 .PHONY: configure build clean install binary binary-indep binary-arch