forked from embeddedartistry/embedded-resources
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (27 loc) · 750 Bytes
/
Makefile
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
34
35
36
# you can set this to 1 to see all commands that are being run
export VERBOSE := 0
ifeq ($(VERBOSE),1)
export Q :=
export VERBOSE := 1
else
export Q := @
export VERBOSE := 0
endif
export BUILDTOP := $(shell pwd)
export BUILDRESULTS := $(shell pwd)/buildresults/
all: examples
.PHONY: groundwork
groundwork:
$(Q)if [ -d "$(BUILDRESULTS)" ]; then mkdir -p $(BUILDRESULTS); fi
$(Q)if [ ! -e "$(BUILDRESULTS)/build.ninja" ]; then meson $(BUILDRESULTS); fi
.PHONY: examples
examples: groundwork
$(Q)cd $(BUILDRESULTS); ninja
.PHONY: clean
clean:
$(Q)echo Cleaning Build Output
$(Q)if [ -d "$(BUILDRESULTS)" ]; then cd $(BUILDRESULTS); ninja -t clean; fi
.PHONY: purify
purify:
$(Q)echo Removing all build output
$(Q)rm -rf $(BUILDRESULTS)