-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmake.vars
116 lines (98 loc) · 3.49 KB
/
make.vars
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# make.vars -*- makefile -*-
# Older (3.81) GNU Make versions don't support .POSIX or .SHELLFLAGS
# Without this, recursive make will not "trickle down" errors.
SHELL = /bin/sh -e
# version string
NAME = e2factory
MAJOR = 2
MINOR = 3
PATCHLEVEL = 18
EXTRAVERSION = p1
ifdef EXTRAVERSION
VERSION = $(MAJOR).$(MINOR).$(PATCHLEVEL)$(EXTRAVERSION)
else
VERSION = $(MAJOR).$(MINOR).$(PATCHLEVEL)
endif
TAG = $(NAME)-$(VERSION)
COMMIT = $(shell GIT_DIR=$(TOPLEVEL)/.git git describe --tags 2>/dev/null)
ifeq ($(COMMIT),)
VERSIONSTRING = $(TAG)
else
VERSIONSTRING = $(COMMIT)
endif
# list the latest one first
SYNTAX = 2_3_6
# Global interface version describes the server side data format
# It is stored in a file named `version` in the server side project location.
# This file is copied to .e2/global-version when checking out a project for
# access by the local tools.
#
# List the latest one first. It will be used when creating new projects.
GLOBAL_INTERFACE_VERSION = 2
# when creating a project a current set of local tools is requested
DEFAULT_LOCAL_BRANCH = master
DEFAULT_LOCAL_TAG = $(TAG)
DETECT_TOOL = $(TOPLEVEL)/scripts/detect_tool
PROJECTDIR ?= $(shell cd $(TOPLEVEL) && $(BINDIR)/e2-locate-project-root 2>/dev/null)
DESTDIR =
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
LIBDIR = $(PREFIX)/lib/e2
LIBEXECDIR = $(PREFIX)/libexec/e2
INCDIR = $(PREFIX)/include/e2
SHAREDIR = $(PREFIX)/share
LOCALSTATEDIR = /var/lib/e2factory
SYSCONFDIR = /etc/e2
MANDIR = $(SHAREDIR)/man
DOCDIR = $(SHAREDIR)/doc/e2
TOOLDIR = $(LIBEXECDIR)/tools
LOCALPREFIX = $(PROJECTDIR)/.e2
LOCALBINDIR = $(LOCALPREFIX)/bin
LOCALLIBDIR = $(LOCALPREFIX)/lib/e2
LOCALMAKDIR = $(LOCALPREFIX)/lib/make
LOCALPLUGINDIR = $(LOCALPREFIX)/plugins
LOCALDOCDIR = $(LOCALPREFIX)/doc
ARCH = $(shell uname -m)
LUA_VERSION = 5.1.3
LUA = $(LIBEXECDIR)/e2-lua-$(LUA_VERSION)
LUAC = $(LIBEXECDIR)/e2-luac-$(LUA_VERSION)
BUILD_LUAC = $(TOPLEVEL)/lua/lua-$(LUA_VERSION)/src/luac
BUILD_LUA_CPPFLAGS = -I $(TOPLEVEL)/lua/lua-$(LUA_VERSION)/src \
-D_FILE_OFFSET_BITS=64
LUA_CPPFLAGS = -I $(INCDIR)/lua-$(LUA_VERSION) \
-D_FILE_OFFSET_BITS=64
LUA_CFLAGS = -fPIC
BINARY_STORE = $(E2DATA)/projects/emlix/e2/files
CC = gcc
CFLAGS = -g -Wall -O2
CPPFLAGS = \
-D_FILE_OFFSET_BITS=64 \
-DBINDIR="\"$(BINDIR)\"" \
-DLIBDIR="\"$(LIBDIR)\"" \
-DLIBEXECDIR="\"$(LIBEXECDIR)\"" \
-DINCDIR="\"$(INCDIR)\"" \
-DMANDIR="\"$(MANDIR)\"" \
-DTOOLDIR="\"$(TOOLDIR)\""
LDFLAGS =
# build-time detection for tools used by the setuid root code
ENV_TOOL = $(shell $(DETECT_TOOL) env)
CHROOT_TOOL = $(shell $(DETECT_TOOL) chroot)
TAR_TOOL = $(shell $(DETECT_TOOL) tar)
CHOWN_TOOL = $(shell $(DETECT_TOOL) chown)
RM_TOOL = $(shell $(DETECT_TOOL) rm)
E2_SU_CFLAGS = -D CHROOT_TOOL="\"$(CHROOT_TOOL)\"" \
-D TAR_TOOL="\"$(TAR_TOOL)\"" \
-D CHOWN_TOOL="\"$(CHOWN_TOOL)\"" \
-D RM_TOOL="\"$(RM_TOOL)\""
E2_GROUP = ebs
GENSCRIPT = env PREFIX=$(PREFIX) BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) \
LIBEXECDIR=$(LIBEXECDIR) LOCALSTATEDIR=$(LOCALSTATEDIR) \
SYSCONFDIR=$(SYSCONFDIR) E2DATA=$(E2DATA) TOOLDIR=$(TOOLDIR) \
LUA_VERSION=$(LUA_VERSION) ARCH=$(ARCH) \
BINARY_STORE=$(BINARY_STORE) E2_GROUP=$(E2_GROUP) \
ENV_TOOL=$(ENV_TOOL) CHROOT_TOOL=$(CHROOT_TOOL) \
TAR_TOOL=$(TAR_TOOL) CHOWN_TOOL=$(CHOWN_TOOL) \
RM_TOOL=$(RM_TOOL) DEFAULT_LOCAL_BRANCH=$(DEFAULT_LOCAL_BRANCH) \
DEFAULT_LOCAL_TAG=$(DEFAULT_LOCAL_TAG) \
$(TOPLEVEL)/scripts/genscript.sh
# vim: ft=make