summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: 6e6d1e39fbdd38827e4f43a6ec9c897eb0db6fbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/make -f

RULETARGETS := binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep
$(RULETARGETS): %: debian/control
	dh $@

debian/control: debian/bin/gencontrol.sh $(wildcard ptxconfigs/*.ptxconfig)
	debian/bin/gencontrol.sh

ptxdistrc:
	: > $@
	test ! -d /ptx/src || echo 'PTXCONF_SETUP_SRCDIR="/ptx/src"' >> $@

override_dh_auto_build: ptxdistrc
	PTXDIST_PTXRC=$(CURDIR)/ptxdistrc make -f build_all_v2.mk ARG="-j -q go" PTXDIST=/opt/bin/ptxdist-2018.02.0 CROSS_GDB_WITHOUT_PYTHON=n

override_dh_auto_install:
	mkdir -p $(CURDIR)/debian/tmp
	mv inst/opt debian/tmp/opt

override_dh_auto_clean:
	dh_auto_clean
	rm -rf gstate platform-*

# don't strip target stuff
override_dh_strip:
	dh_strip -Xsysroot- $(foreach d,$(wildcard debian/tmp/opt/OSELAS.Toolchain-*/*/*/*/lib),-X$(subst debian/tmp,,$(d)))

# don't use target binaries to generate dependencies
override_dh_shlibdeps:
	dh_shlibdeps -Xsysroot- $(foreach d,$(wildcard debian/tmp/opt/OSELAS.Toolchain-*/*/*/*/lib),-X$(subst debian/tmp,,$(d)))

.PHONY: $(RULETARGETS)