-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
74 lines (53 loc) · 2.19 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
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
## If you change this version, make sure you run 'make clean'
VERSION=20240202
RELEASE=1
## Set this to be the name of the Ubunt disto. It's used to tag
## the versions correctly
BUILDNAME=jammy
## This SHOULD be in Makefile.settings but it's the most
## common thing to change. This is used as the end part of the
## debian version, after the major.minor.rel fields are added. You
## normally want to set this back to zero after you bump VERSION
## above.
FSREV=$(VERSION)~001
ROOT:=$(shell pwd)
BUILDDIR:=$(ROOT)/build
DOWNLOADS:=$(ROOT)/downloads
DEBDEST:=$(BUILDDIR)/debs
## GCC -march and -mtune params
## See https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html for more information
MARCH=westmere
MTUNE=generic
## If you do NOT want to tune the debs for a cpu type, comment out this line
TUNEVARS=-march=$(MARCH) -mtune=$(MTUNE)
.PHONY: help shell setup debs clean distclean
help:
@echo "Instructions:"
@echo " 'make shell' - gives you a shell in the basedocker container"
@echo " 'make clean' - Removes all packages and builds"
@echo " 'make distclean' - Same as clean but also removes download cache"
@echo "Building:"
@echo " 'make debs' - Build all the things"
@echo " 'make stage1' - Build all the debs required to build freeswitch"
@echo " 'make fsdocker' - Build stage1, build the fscontainer using those debs"
@echo " 'make freeswitch'- Build freeswitch using the fsdocker container"
include Makefile.common
# Configure githash, releases etc in here
include Makefile.settings
MAKEFILES := common settings
# Load all our associated makefiles
include $(wildcard includes/Makefile.*)
shell: setup $(BASEDOCKERTAG)
docker run --rm $(VOLUMES) -it basedocker:$(VERSION) bash
setup: | /usr/local/ccache/ccache.conf $(BUILDDEPS) $(BUILDSOURCE) $(BUILDDIR) $(DOWNLOADS) $(DEBDEST)
/usr/local/ccache/ccache.conf: ccache.conf
mkdir -p $(@D) && cp $< $@
clean:
rm -rf build $(DOCKERTAGS) $(DEBDEST)/ *docker/*deb basedocker/docbook-xsl-snapshot.zip testdocker/*gz
distclean: clean
rm -rf downloads/
stage1: $(addprefix $(DEBDEST)/,$(SRCDEBS))
@echo Stage 1 debs complete, build $(SRCDEBS)
debs: setup stage1 freeswitch
libssdocker/%.deb fsdocker/%.deb: $(DEBDEST)/%.deb
cp $< $@