#!/usr/bin/make -f

PKG_VERSION = 2.32
DEB_TARBALL = zip232.zip
DEB_TAR_SRCDIR = .
DEB_DH_INSTALL_SOURCEDIR = build-tree/$(DEB_TAR_SRCDIR)

CC = gcc
CFLAGS = -s -Wall -I. -DUNIX

include /usr/share/cdbs/1/rules/tarball.mk
include /usr/share/cdbs/1/rules/debhelper.mk

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    MAKEFLAGS += -j$(NUMJOBS)
endif

clean::
	rm -f *.cdbs-config_list debian/stamp-*

configure/zip::
	cd $(DEB_DH_INSTALL_SOURCEDIR) && \
	$(MAKE) -f unix/Makefile flags CC="$(CC)" CFLAGS_NOOPT="$(CFLAGS)"

common-build-arch common-build-indep:: debian/stamp-build
debian/stamp-build:
	cd $(DEB_DH_INSTALL_SOURCEDIR) && \
	$(MAKE) -f unix/Makefile generic

binary-post-install/zip::
	rm -rf debian/zip/usr/share
