Harald Welte | 8f18bfb | 2022-07-12 17:55:38 +0200 | [diff] [blame] | 1 | #!/usr/bin/make -f |
| 2 | export DH_VERBOSE=1 |
| 3 | export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 4 | include /usr/share/dpkg/default.mk |
| 5 | export ERL_COMPILER_OPTIONS=deterministic |
| 6 | |
| 7 | BUILD_TARGET=rebar_compile |
| 8 | TEST_TARGET=rebar_eunit |
| 9 | |
| 10 | .PHONY: build clean test install configure |
| 11 | |
| 12 | clean_debhelper: |
| 13 | $(H)$(call empty_trash) |
| 14 | $(H)$(RM) -rf debian/trash |
| 15 | |
| 16 | |
| 17 | build: $(BUILD_TARGET) |
| 18 | |
| 19 | test: $(TEST_TARGET) |
| 20 | |
| 21 | configure: |
| 22 | |
| 23 | clean: 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 | |
| 32 | rebar_compile: |
| 33 | $(H)echo $@ |
| 34 | rebar3 compile skip_deps=true -vv |
| 35 | |
| 36 | binary: |
| 37 | $(H)echo $@ |
| 38 | rebar3 escriptize |
| 39 | |
| 40 | install: |
| 41 | $(H)echo $@ |
| 42 | $(H)$(call trash, $(DEB_INST_PKG)) |
| 43 | $(H)install -d |
| 44 | |