-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
40 lines (31 loc) · 1.09 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
# components
SERVER = moxerver
CONTROL = moxerverctl
# system install root directory
INSTALL_ROOT = /
# user prefix, used in front of /bin and /lib directories
USER_PREFIX = usr
# ==============================================================================
# directories used for local component builds
BUILDDIR = build.dir
# directory configuration for local component builds
DIR_CONFIG = BUILDDIR=$(BUILDDIR) INSTALLDIR=$(abspath $(INSTALL_ROOT)) USER_PREFIX=$(USER_PREFIX)
# ==============================================================================
# supported make options (clean, install...)
.PHONY: default install clean
# default builds components
default:
cd $(SERVER) && make $(DIR_CONFIG)
cd $(CONTROL) && make $(DIR_CONFIG)
# install handles component installation
install: default
mkdir -p $(INSTALL_ROOT)
cd $(SERVER) && make install $(DIR_CONFIG)
cd $(CONTROL) && make install $(DIR_CONFIG)
# clean removes build and install results
clean:
cd $(SERVER) && make clean $(DIR_CONFIG)
cd $(CONTROL) && make clean $(DIR_CONFIG)
ifneq ($(INSTALL_ROOT), /)
-rm -rf $(INSTALL_ROOT)
endif