-
Notifications
You must be signed in to change notification settings - Fork 29
/
Makefile
74 lines (53 loc) · 2.08 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Ensures all recursive directories get OPENMRNPATH appropriately.
OPENMRNPATH:=$(realpath .)
export OPENMRNPATH
$(shell touch $(OPENMRNPATH)/build_timestamp)
export HAVE_BUILD_TIMESTAMP=$(OPENMRNPATH)/build_timestamp
SUBDIRS = targets doc applications #test
include $(OPENMRNPATH)/etc/recurse.mk
# Makes sure all the targets are compiled before building the test application.
build-test: build-targets
tests-test: build-targets
build-applications: build-targets
tests-applications: build-targets
.PHONY: docs cov
docs:
$(MAKE) -C doc docs || exit 1;
docsw:
cat $(OPENMRNPATH)/doc/warnings
cov:
$(MAKE) -C targets/cov cov
tests:
$(MAKE) -C targets/test tests
llvm-tests:
$(MAKE) -C targets/linux.llvm run-tests
js-tests:
$(MAKE) -C targets/js.emscripten run-tests
alltests: tests llvm-tests
release-clean:
$(MAKE) -C targets/linux.x86 clean
RELNAME=$(shell uname -sm | tr ' A-Z' '.a-z')
RELDIR=$(OPENMRNPATH)/bin/release/staging-$(RELNAME)
JSRELDIR=$(OPENMRNPATH)/bin/release/staging-js
include $(OPENMRNPATH)/etc/release.mk
# These are the applications that are packaged into the binary release.
$(call RELEASE_BIN_template,hub,applications/hub/targets/linux.x86)
$(call RELEASE_BIN_template,memconfig_utils,applications/memconfig_utils/targets/linux.x86)
$(call RELEASE_BIN_template,bootloader_client,applications/bootloader_client/targets/linux.x86)
$(call RELEASE_BIN_template,send_datagram,applications/send_datagram/targets/linux.x86)
$(call RELEASE_JS_template,openmrn-bootloader-client,applications/bootloader_client/targets/js.emscripten)
$(call RELEASE_JS_template,openmrn-hub,applications/js_hub/targets/js.emscripten)
release-bin:
rm -rf $(RELDIR)/*
mkdir -p $(RELDIR)
+$(MAKE) -C . release-bin-all
cp LICENSE.md $(RELDIR)/LICENSE.txt
cd $(RELDIR); zip -9r ../applications.$(RELNAME).zip .
release-js:
rm -rf $(JSRELDIR)/*
mkdir -p $(JSRELDIR)
+$(MAKE) -C . release-js-all
cp LICENSE.md $(JSRELDIR)/win/LICENSE.txt
cp LICENSE.md $(JSRELDIR)/macos/LICENSE.txt
cd $(JSRELDIR)/win; zip -9r ../../applications.win.zip .
cd $(JSRELDIR)/macos; zip -9r ../../applications.macos.zip .