blob: 6093c5d0043b8d890f24e004825d48589272fa1b [file] [log] [blame]
Harald Welte8f18bfb2022-07-12 17:55:38 +02001#!/usr/bin/make -f
2export DH_VERBOSE=1
3export DEB_BUILD_MAINT_OPTIONS = hardening=+all
4include /usr/share/dpkg/default.mk
5export ERL_COMPILER_OPTIONS=deterministic
6
7BUILD_TARGET=rebar_compile
8TEST_TARGET=rebar_eunit
9
10.PHONY: build clean test install configure
11
12clean_debhelper:
13 $(H)$(call empty_trash)
14 $(H)$(RM) -rf debian/trash
15
16
17build: $(BUILD_TARGET)
18
19test: $(TEST_TARGET)
20
21configure:
22
23clean: clean_debhelper
24 $(H)echo $@
25 rebar3 clean skip_deps=true -vv
26 $(H)rm -rf ebin/*.beam
27 $(H)rm -rf ebin/*.app
28 $(H)rm -rf c_src/*.o
29 $(H)rm -rf priv/.so
30 $(H)rm -rf .eunit
31
32rebar_compile:
33 $(H)echo $@
34 rebar3 compile skip_deps=true -vv
35
36binary:
37 $(H)echo $@
38 rebar3 escriptize
39
40install:
41 $(H)echo $@
42 $(H)$(call trash, $(DEB_INST_PKG))
43 $(H)install -d
44