forked from emqxarchive/emqx-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (36 loc) · 893 Bytes
/
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
export
OS = $(shell uname -s)
EMQ_VERSION = 2.3authfix3
##
## Support RPM and Debian based linux systems
##
ifeq ($(OS),Linux)
ARCH = $(shell uname -m)
ISRPM = $(shell cat /etc/redhat-release 2> /dev/null)
ISDEB = $(shell cat /etc/debian_version 2> /dev/null)
ISSLES = $(shell cat /etc/SuSE-release 2> /dev/null)
ifneq ($(ISRPM),)
OSNAME = RedHat
PKGERDIR = rpm
BUILDDIR = rpmbuild
else
ifneq ($(ISDEB),)
OSNAME = Debian
PKGERDIR = deb
BUILDDIR = debuild
else
ifneq ($(ISSLES),)
OSNAME = SLES
PKGERDIR = rpm
BUILDDIR = rpmbuild
endif # SLES
endif # deb
endif # rpm
endif # linux
.PHONY: ostype
## Call platform dependent makefile
ostype:
$(if $(PKGERDIR),,$(error "Operating system '$(OS)' not supported by emq_package"))
cd $(PKGERDIR) && $(MAKE)
clean:
rm -rf package