moxanix/Makefile
Igor Socec 83bd22bef9 Change names of config file and control script
Also make top Makefile more tidy.
2017-01-25 01:33:37 +01:00

48 lines
1.3 KiB
Makefile

# components
SERVER = moxerver
TOOLS = tools
# ==============================================================================
# system install root directory
INSTALL_ROOT = ./install.dir
# prefix for /bin directory
BIN_PREFIX = /usr
# ==============================================================================
# directories used for local component builds
BUILDDIR = build.dir
INSTALLDIR = install.dir
# directory configuration for local component builds
DIR_CONFIG = BUILDDIR=$(BUILDDIR) INSTALLDIR=$(INSTALLDIR) BIN_PREFIX=$(BIN_PREFIX)
# ==============================================================================
# supported make options (clean, install...)
.PHONY: all default install clean
# all calls all other options
all: default install
# default builds components
default:
cd $(SERVER) && make $(DIR_CONFIG)
cd $(TOOLS) && make $(DIR_CONFIG)
# install handles component installation
install: default
mkdir -p $(INSTALL_ROOT)
cd $(SERVER) && make install $(DIR_CONFIG)
cp -r $(SERVER)/$(INSTALLDIR)/* $(INSTALL_ROOT)/
cd $(TOOLS) && make install $(DIR_CONFIG)
cp -r $(TOOLS)/$(INSTALLDIR)/* $(INSTALL_ROOT)/
# clean removes build and install results
clean:
cd $(SERVER) && make clean $(DIR_CONFIG)
cd $(TOOLS) && make clean $(DIR_CONFIG)
-rm -rf $(INSTALL_ROOT)