12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- BINOUT := .bin
- MAIN_MODULE := embedd/bin
- HAREFLAGS ?=
- RELEASE ?= 0
- ifeq (${RELEASE},1)
- HAREFLAGS += -R
- endif
- LOCAL_HARE := .hare
- LOCAL_BIN := ${LOCAL_HARE}/bin
- # QBE ?= qbe
- # HARE ?= hare
- # HAREC ?= harec
- QBE ?= ${LOCAL_BIN}/qbe
- HARE ?= ${LOCAL_BIN}/hare
- HAREC ?= ${LOCAL_BIN}/harec
- HARE_STDLIB ?= ${LOCAL_HARE}/stdlib
- rwildcard = $(foreach d,$(wildcard $1/*),$(call rwildcard,$d,$2) \
- $(filter $(subst *,%,$2),$d))
- .PHONY: all
- all: ${BINOUT}/embedd
- export QBE
- export HAREC
- export HAREPATH += :${HARE_STDLIB}
- ${BINOUT}/embedd: $(call rwildcard,.,*.ha)
- @mkdir -p $(dir ${@})
- ${HARE} build ${LDFLAGS} ${HAREFLAGS} -o ${@} ${MAIN_MODULE}
- .PHONY: clean
- clean:
- rm -f embedd
|