blob: ec31e59bc26d1de51c3b3c175dc1f5757a0e0679 [file] [log] [blame]
Harald Welte0cdf0712019-06-19 18:15:38 +02001# Copyright 2017 Harald Welte
2# Copyright 2018 sysmocom - s.f.m.c. GmbH
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
Harald Welte68079822017-12-12 16:30:53 +010015
16ECLIPSEGIT:=https://github.com/eclipse
17ECLIPSEGIT2:=git://git.eclipse.org/gitroot/titan
Harald Welte701b5742018-01-22 11:29:13 +010018OSMOGITHUB:=https://github.com/osmocom
Harald Welte3103fce2018-05-26 13:58:31 +020019OSMOGIT:=git://git.osmocom.org
Harald Welte68079822017-12-12 16:30:53 +010020
21ECLIPSEGIT_REPOS= titan.Libraries.TCCUsefulFunctions \
22 titan.ProtocolModules.ICMP \
23 titan.ProtocolModules.ICMPv6 \
24 titan.ProtocolModules.IP \
Harald Weltefaa42922019-03-04 18:31:11 +010025 titan.ProtocolModules.JSON_v07_2006 \
Harald Welte68079822017-12-12 16:30:53 +010026 titan.ProtocolModules.L2TP \
27 titan.ProtocolModules.M3UA \
Harald Welte36296dc2018-04-16 17:37:31 +020028 titan.ProtocolModules.SMPP \
Harald Welte68079822017-12-12 16:30:53 +010029 titan.ProtocolModules.TCP \
30 titan.ProtocolModules.UDP \
31 titan.ProtocolModules.RTP \
Harald Welte56071b72019-08-18 19:31:26 +020032 titan.ProtocolModules.DIAMETER_ProtocolModule_Generator \
Harald Welte68079822017-12-12 16:30:53 +010033 titan.TestPorts.Common_Components.Socket-API \
Harald Weltefaa42922019-03-04 18:31:11 +010034 titan.TestPorts.Common_Components.Abstract_Socket \
35 titan.TestPorts.HTTPmsg \
Harald Welte68079822017-12-12 16:30:53 +010036 titan.TestPorts.IPL4asp \
37 titan.TestPorts.LANL2asp \
38 titan.TestPorts.PCAPasp \
Harald Welte68079822017-12-12 16:30:53 +010039 titan.TestPorts.SIPmsg \
40 titan.TestPorts.TCPasp \
41 titan.TestPorts.TELNETasp \
Harald Weltea28dce12018-04-14 22:04:05 +020042 titan.TestPorts.UDPasp \
43 titan.TestPorts.UNIX_DOMAIN_SOCKETasp
Harald Welte68079822017-12-12 16:30:53 +010044
45ECLIPSEGIT2_REPOS= titan.ProtocolModules.GRE \
46 titan.ProtocolModules.M2PA \
Harald Welte834d67e2018-05-26 13:58:03 +020047 titan.ProtocolModules.ROSE \
Harald Welte68079822017-12-12 16:30:53 +010048 titan.ProtocolModules.SCTP \
49 titan.ProtocolModules.SUA \
50 titan.ProtocolModules.SDP \
51 titan.TestPorts.GPIO \
52 titan.ProtocolModules.BSSAPP_v7.3.0 \
53 titan.ProtocolModules.BSSGP_v13.0.0 \
Harald Welte68079822017-12-12 16:30:53 +010054 titan.ProtocolModules.GTP_v13.5.0 \
55 titan.ProtocolModules.GTPv2_v13.7.0 \
56 titan.ProtocolModules.ISUP_Q.762 \
Harald Welte68079822017-12-12 16:30:53 +010057 titan.ProtocolModules.MobileL3_v13.4.0 \
Harald Weltefc5f6372019-07-09 14:10:05 +080058 titan.ProtocolModules.NAS_EPS_15.2.0.1 \
Harald Welte68079822017-12-12 16:30:53 +010059 titan.ProtocolModules.NS_v7.3.0 \
Harald Welteb1add592018-03-27 20:43:40 +020060 titan.ProtocolModules.SNDCP_v7.0.0 \
61 titan.ProtocolEmulations.SCCP
Harald Welte68079822017-12-12 16:30:53 +010062
Harald Welte6fc784e2018-02-25 23:31:37 +010063OSMOGITHUB_REPOS= titan.TestPorts.SCTPasp \
Harald Welte2216b752019-04-23 22:13:51 +020064 titan.ProtocolModules.LLC_v7.1.0 \
Harald Welte1fd461a2018-10-28 10:26:13 +010065 titan.ProtocolModules.SGsAP_13.2.0 \
Harald Weltec87abfc2018-03-18 10:58:00 +010066 titan.TestPorts.MTP3asp \
Harald Welteb1add592018-03-27 20:43:40 +020067 titan.ProtocolEmulations.M3UA
Harald Welte701b5742018-01-22 11:29:13 +010068
Pau Espin Pedrolfe0c6082019-05-20 19:20:55 +020069OSMOGIT_REPOS= titan.ProtocolModules.MAP \
70 titan.ProtocolModules.BSSMAP
Harald Welte3103fce2018-05-26 13:58:31 +020071
72ALL_REPOS=$(ECLIPSEGIT_REPOS) $(ECLIPSEGIT2_REPOS) $(OSMOGITHUB_REPOS) $(OSMOGIT_REPOS)
Harald Welte68079822017-12-12 16:30:53 +010073
Stefan Sperling61c11e92018-03-20 18:25:26 +010074# Tag names from 'git-describe --tags'; if not available, a commit hash may be used instead.
75# In order to keep local changes in the repository of a dependency, set its commit to the
76# name of a local branch here (e.g. 'master').
Stefan Sperling61c11e92018-03-20 18:25:26 +010077titan.Libraries.TCCUsefulFunctions_commit= R.30.A
Stefan Sperlinge6bf4ac2018-06-12 17:36:26 +020078titan.ProtocolEmulations.M3UA_commit= R.2.A-2-g742cf02
Harald Welteb1add592018-03-27 20:43:40 +020079titan.ProtocolEmulations.SCCP_commit= R.7.A-2-g724c83f
Stefan Sperling61c11e92018-03-20 18:25:26 +010080titan.ProtocolModules.BSSAPP_v7.3.0_commit= R.2.A
81titan.ProtocolModules.BSSGP_v13.0.0_commit= R.2.A
Pau Espin Pedrolfe0c6082019-05-20 19:20:55 +020082titan.ProtocolModules.BSSMAP_commit= master
Stefan Sperling61c11e92018-03-20 18:25:26 +010083titan.ProtocolModules.GRE_commit= R.2.A
84titan.ProtocolModules.GTP_v13.5.0_commit= R.2.A
85titan.ProtocolModules.GTPv2_v13.7.0_commit= R.2.A
86titan.ProtocolModules.ICMP_commit= R.2.A
87titan.ProtocolModules.ICMPv6_commit= R.2.A
88titan.ProtocolModules.IP_commit= R.10.B-1-g99d0ec9
89titan.ProtocolModules.ISUP_Q.762_commit= R.8.A
Harald Weltefaa42922019-03-04 18:31:11 +010090titan.ProtocolModules.JSON_v07_2006_commit= R.1.A
Stefan Sperling61c11e92018-03-20 18:25:26 +010091titan.ProtocolModules.L2TP_commit= R.2.A
Harald Welte2216b752019-04-23 22:13:51 +020092titan.ProtocolModules.LLC_v7.1.0_commit= 2a3c09fbf7bae22f802aa88689800f38a1f3732d
Harald Welte3103fce2018-05-26 13:58:31 +020093titan.ProtocolModules.MAP_commit= R.2.A-1-g79c6a3d
Stefan Sperling61c11e92018-03-20 18:25:26 +010094titan.ProtocolModules.M2PA_commit= R.2.A
95titan.ProtocolModules.M3UA_commit= R.2.A
96titan.ProtocolModules.MobileL3_v13.4.0_commit= R.2.A
Harald Weltec4148da2019-08-18 19:42:04 +020097titan.ProtocolModules.NAS_EPS_15.2.0.1_commit= 2ba853c7d197f7f39d97b76fca4726a7143fb4ad
Stefan Sperling61c11e92018-03-20 18:25:26 +010098titan.ProtocolModules.NS_v7.3.0_commit= R.2.A
99titan.ProtocolModules.RTP_commit= R.5.A
Harald Welte56071b72019-08-18 19:31:26 +0200100titan.ProtocolModules.DIAMETER_ProtocolModule_Generator_commit= ffd939595a08da1b8c8176aaa1f8578bfe02a912
Harald Welte834d67e2018-05-26 13:58:03 +0200101titan.ProtocolModules.ROSE_commit= R.1.C
Stefan Sperling61c11e92018-03-20 18:25:26 +0100102titan.ProtocolModules.SCTP_commit= R.2.A
Harald Welte1fd461a2018-10-28 10:26:13 +0100103titan.ProtocolModules.SGsAP_13.2.0_commit= 520dc48dd41ee15c9fd77e71d2ea7a05c58770b9
Stefan Sperling61c11e92018-03-20 18:25:26 +0100104titan.ProtocolModules.SDP_commit= R.14.A
Harald Welte36296dc2018-04-16 17:37:31 +0200105titan.ProtocolModules.SMPP_commit= R.2.A-2-gb7aee69
Stefan Sperling61c11e92018-03-20 18:25:26 +0100106titan.ProtocolModules.SNDCP_v7.0.0_commit= R.2.A
107titan.ProtocolModules.SUA_commit= R.5.A
108titan.ProtocolModules.TCP_commit= R.3.A
109titan.ProtocolModules.UDP_commit= R.4.A
110titan.TestPorts.Common_Components.Socket-API_commit= R.6.A
Harald Weltefaa42922019-03-04 18:31:11 +0100111titan.TestPorts.Common_Components.Abstract_Socket_commit= R.9.B
Stefan Sperling61c11e92018-03-20 18:25:26 +0100112titan.TestPorts.GPIO_commit= R.3.A
Harald Weltefaa42922019-03-04 18:31:11 +0100113titan.TestPorts.HTTPmsg_commit= R.9.B
Stefan Sperling61c11e92018-03-20 18:25:26 +0100114titan.TestPorts.IPL4asp_commit= R.29.A
115titan.TestPorts.LANL2asp_commit= R.8.B
116titan.TestPorts.MTP3asp_commit= 1cecdad6f3641a5f19b3833703bff6e5005eff11
117titan.TestPorts.PCAPasp_commit= R.7.A
118titan.TestPorts.SCTPasp_commit= R.11.A-2-g2faa9cf
119titan.TestPorts.SIPmsg_commit= R.15.A-1-ge4f9dd0
120titan.TestPorts.TCPasp_commit= R.9.A
121titan.TestPorts.TELNETasp_commit= R.9.A
122titan.TestPorts.UDPasp_commit= R.8.A
Harald Welte0a068c32018-04-06 13:52:35 +0200123titan.TestPorts.UNIX_DOMAIN_SOCKETasp_commit= R.2.A-4-gbacd73d
Harald Welte68079822017-12-12 16:30:53 +0100124
Stefan Sperling61c11e92018-03-20 18:25:26 +0100125all: $(foreach dir,$(ALL_REPOS),$(dir)/update)
Harald Welte68079822017-12-12 16:30:53 +0100126clean: $(foreach dir,$(ALL_REPOS),$(dir)/clean)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100127distclean: $(foreach dir,$(ALL_REPOS),$(dir)/distclean)
Harald Welte68079822017-12-12 16:30:53 +0100128
129define GIT_template
Stefan Sperling61c11e92018-03-20 18:25:26 +0100130$(1)_ORIGIN!= if [ -d $(1) ]; then cd $(1) && git remote get-url origin; fi
131$(1)_HEAD!= if [ -d $(1) ]; then cd $(1) && git describe --tags 2>/dev/null || git rev-parse HEAD; fi
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100132$(1)_MODIFIED!= if [ -d $(1) ]; then cd $(1) && git diff --quiet --exit-code || echo -n "1"; fi
Stefan Sperling61c11e92018-03-20 18:25:26 +0100133
Harald Welte68079822017-12-12 16:30:53 +0100134$(1):
135 git clone $(2)/$(1)
136
Stefan Sperling61c11e92018-03-20 18:25:26 +0100137.PHONY: $(1)/update
Harald Welte68079822017-12-12 16:30:53 +0100138$(1)/update: $(1)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100139ifeq ($$($(1)_MODIFIED),1)
140 @echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
141else
Stefan Sperling61c11e92018-03-20 18:25:26 +0100142ifneq ($$($(1)_ORIGIN),$(2)/$(1))
143 cd $(1) && git remote set-url origin $(2)/$(1) && git fetch
144endif
145ifneq ($$($(1)_HEAD),$($(1)_commit))
Harald Welte035f7f82018-03-27 20:49:27 +0200146 cd $(1) && git fetch && git checkout -q -f "$($(1)_commit)"
Stefan Sperling61c11e92018-03-20 18:25:26 +0100147endif
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100148endif
Harald Welte68079822017-12-12 16:30:53 +0100149
150.PHONY: $(1)/clean
Harald Welte4c294b62018-02-15 18:27:10 +0100151$(1)/clean: $(1)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100152ifeq ($$($(1)_MODIFIED),1)
153 @echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
154else
Harald Welte035f7f82018-03-27 20:49:27 +0200155 cd $(1) && git fetch && git checkout -q -f "$($(1)_commit)" && git reset --hard
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100156endif
Harald Welte4c294b62018-02-15 18:27:10 +0100157
158.PHONY: $(1)/distclean
159$(1)/distclean:
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100160ifeq ($$($(1)_MODIFIED),1)
161 @echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
162else
Harald Welte68079822017-12-12 16:30:53 +0100163 @rm -rf $(1)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100164endif
Harald Welte68079822017-12-12 16:30:53 +0100165endef
166
167$(foreach dir,$(ECLIPSEGIT_REPOS), \
168 $(eval $(call GIT_template,$(dir),$(ECLIPSEGIT))))
169
170$(foreach dir,$(ECLIPSEGIT2_REPOS), \
171 $(eval $(call GIT_template,$(dir),$(ECLIPSEGIT2))))
Harald Welte701b5742018-01-22 11:29:13 +0100172
173$(foreach dir,$(OSMOGITHUB_REPOS), \
174 $(eval $(call GIT_template,$(dir),$(OSMOGITHUB))))
Harald Welte3103fce2018-05-26 13:58:31 +0200175
176$(foreach dir,$(OSMOGIT_REPOS), \
177 $(eval $(call GIT_template,$(dir),$(OSMOGIT))))