5 ################################################################################
7 ################################################################################
11 all: build-hack copy-hack-files
13 debug: build-hack-debug copy-hack-debug-files
16 find ./bin -mindepth 1 -not -path ./bin/README -delete
19 # First argument is the extension to use.
20 # Second argument is a suffix for the rules name. Optional
22 # The only supported configuration are:
23 # 1=exe 2= (literaly nothing, not even a space)
26 $(eval ext := $(if $(filter $(2),-debug),".bc",""))
31 src/hh_single_type_check.$(1) \
34 src/generate_full_fidelity.$(1) \
35 src/hh_single_compile.$(1)
37 copy-hack$(2)-files: build-hack$(2)
38 mkdir -p "$(HACK_BIN_DIR)"
39 cp "$(DUNE_BUILD_DIR)/default/src/hh_server.$(1)" "$(HACK_BIN_DIR)/hh_server$(ext)"
40 cp "$(DUNE_BUILD_DIR)/default/src/hh_client.$(1)" "$(HACK_BIN_DIR)/hh_client$(ext)"
41 cp "$(DUNE_BUILD_DIR)/default/src/hh_single_type_check.$(1)" "$(HACK_BIN_DIR)/hh_single_type_check$(ext)"
42 cp "$(DUNE_BUILD_DIR)/default/src/hackfmt.$(1)" "$(HACK_BIN_DIR)/hackfmt$(ext)"
43 cp "$(DUNE_BUILD_DIR)/default/src/hh_parse.$(1)" "$(HACK_BIN_DIR)/hh_parse$(ext)"
44 cp "$(DUNE_BUILD_DIR)/default/src/generate_full_fidelity.$(1)" "$(HACK_BIN_DIR)/generate_full_fidelity$(ext)"
45 cp "$(DUNE_BUILD_DIR)/default/src/hh_single_compile.$(1)" "$(HACK_BIN_DIR)/hh_single_compile$(ext)"
48 # Define rules for normal build / debug build
49 # The name of the rules is important as it matches what is expected by cmake
50 $(eval $(call build_hack,exe,))
51 $(eval $(call build_hack,bc,-debug))
55 test: build-hack copy-hack-files
56 $(MAKE) -f Makefile.dune do-test
60 # python3 ./test/integration/runner.py ./bin/hh_server ./bin/hh_client