#!/usr/bin/make -f

include /usr/share/dpkg/buildflags.mk

ifeq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    NUMJOBS = 1
else
    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif

%:
	dh $@

override_dh_auto_build:
	make -j$(NUMJOBS) -f makefile.gf FFLAGS="$(FFLAGS)" LDFLAGS="$(LDFLAGS)" PROGRAM=x13as

override_dh_auto_clean:
	make -f makefile.gf clean
	rm -f x13as
