forked from kmarkus/microblx
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (42 loc) · 1.14 KB
/
Makefile
File metadata and controls
52 lines (42 loc) · 1.14 KB
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
include make.conf
INCLUDE_DIR=$(CURDIR)/src/
DIRS=src $(wildcard std_blocks/* std_types/* examples)
SHELL = /bin/sh
INSTALL = /usr/bin/install
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
# include Makefile.conf
BUILDDIRS = $(DIRS:%=build-%)
INSTALLDIRS = $(DIRS:%=install-%)
CLEANDIRS = $(DIRS:%=clean-%)
TESTDIRS = $(DIRS:%=test-%)
all: $(BUILDDIRS)
$(DIRS): $(BUILDDIRS)
$(BUILDDIRS):
$(MAKE) -C $(@:build-%=%)
# # the utils need the libraries in dev built first
# build-utils: build-dev
install: $(INSTALLDIRS) all
$(INSTALLDIRS):
$(MAKE) -C $(@:install-%=%) install
test: $(TESTDIRS) all
$(TESTDIRS):
$(MAKE) -C $(@:test-%=%) test
clean: $(CLEANDIRS)
$(CLEANDIRS):
$(MAKE) -C $(@:clean-%=%) clean
@rm -f core vgcore*
@rm -rf doc/lua doc/manual.html
doc: lua/ubx.lua doc/manual.md
@mkdir -p doc/lua
@echo "generating luadoc in doc/lua"
@luadoc -d doc/lua lua/ubx.lua
@echo "generating doc/manual.html"
@markdown doc/manual.md > doc/manual.html
.PHONY: subdirs $(DIRS)
.PHONY: subdirs $(BUILDDIRS)
.PHONY: subdirs $(INSTALLDIRS)
.PHONY: subdirs $(TESTDIRS)
.PHONY: subdirs $(CLEANDIRS)
.PHONY: all install clean test
.PHONY: doc