libamxrt  0.4.2
Ambiorix Run Time Library
makefile.inc
Go to the documentation of this file.
1 # check pre-requisites
2 EXECUTABLES = install strip ln tar $(firstword $(CC)) $(firstword $(AR)) mkdir git echo cat
3 K := $(foreach exec,$(EXECUTABLES),\
4  $(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH")))
5 
6 # tools used
7 INSTALL = $(shell which install)
8 STRIP = $(shell which strip)
9 LN = $(shell which ln)
10 TAR = $(shell which tar)
11 MKDIR = $(shell which mkdir)
12 GIT = $(shell which git)
13 ECHO = $(shell which echo)
14 CAT = $(shell which cat)
15 
16 # the current version
17 RAW_VERSION ?= $(if $(shell git describe --tags 2> /dev/null),$(shell git describe --tags),$(VERSION_PREFIX)v0.0.0)
18 VERSION = $(if $(findstring .,$(RAW_VERSION)),$(subst $(VERSION_PREFIX)v,,$(strip $(RAW_VERSION))),$(strip $(RAW_VERSION)))
19 VERSION_PARTS = $(if $(findstring .,$(RAW_VERSION)),$(subst ., ,$(VERSION)),0 0 0)
20 VMAJOR = $(word 1,$(VERSION_PARTS))
21 VMINOR = $(word 2,$(VERSION_PARTS))
22 VBUILD_FULL = $(word 3,$(VERSION_PARTS))
23 VBUILD = $(word 1,$(subst -, ,$(VBUILD_FULL)))
24 
25 # the processor architecture
26 MACHINE ?= $(shell $(CC) -dumpmachine)
27 CC_PARTS = $(subst -, ,$(CC))
28 CC_NAME = $(word $(words $(CC_PARTS)),$(CC_PARTS))
29 
30 # Target
31 COMPONENT = libamxrt
32 ifeq ($(CONFIG_GATEWAY)$(CONFIG_ACCESSPOINT),)
33 CONFIG_GATEWAY=y
34 endif
35 
36 # install directories
37 PREFIX ?= /usr/
38 LIBDIR ?= $(PREFIX)lib/$(MACHINE)
39 BINDIR ?= $(PREFIX)bin
40 INCLUDEDIR ?= $(PREFIX)include
41 INITDIR ?= /etc/init.d
42 ACLDIR ?= /etc/acl
43 DOCDIR ?= $(PREFIX)share/doc/libamxrt
44 PROCMONDIR ?= $(PREFIX)lib/processmonitor/scripts
45 
46 # default config options
47 CONFIG_SAH_AMXRT_RWDATAPATH ?= /etc/config
config
Definition: test.odl:54