-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
172 lines (140 loc) · 5.91 KB
/
Makefile.am
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
SUBDIRS= \
meta
EXTRA_DIST= \
AUTHORS \
COPYING \
MANIFEST.in \
setup.py.in \
autogen.sh \
$(PACKAGE).spec.in \
otestpoint \
emm-gen \
debian \
README.md
BUILT_SOURCES = \
setup.py \
$(PACKAGE).spec \
otestpoint/lte/emaneenb.proto \
otestpoint/lte/emaneue.proto \
otestpoint/lte/probe-emanelte-enb.xsd \
otestpoint/lte/probe-emanelte-ue.xsd \
otestpoint/lte/emaneenb_pb2.py \
otestpoint/lte/emaneue_pb2.py \
otestpoint/lte/srsenb.proto \
otestpoint/lte/srsepc.proto \
otestpoint/lte/srsmbms.proto \
otestpoint/lte/srsue.proto \
otestpoint/lte/probe-srslte-enb.xsd \
otestpoint/lte/probe-srslte-epc.xsd \
otestpoint/lte/probe-srslte-mbms.xsd \
otestpoint/lte/probe-srslte-ue.xsd \
otestpoint/lte/srsenb_pb2.py \
otestpoint/lte/srsepc_pb2.py \
otestpoint/lte/srsmbms_pb2.py \
otestpoint/lte/srsue_pb2.py
all-local:
$(PYTHON) setup.py build
dist-hook:
find $(distdir) -name "*_pb2.py" -delete
find $(distdir) -name "*.xsd" -delete
rm -f $(distdir)/otestpoint/lte/emaneenb.proto
rm -f $(distdir)/otestpoint/lte/emaneue.proto
rm -f $(distdir)/otestpoint/lte/srsenb.proto
rm -f $(distdir)/otestpoint/lte/srsepc.proto
rm -f $(distdir)/otestpoint/lte/srsmbms.proto
rm -f $(distdir)/otestpoint/lte/srsue.proto
clean-local: setup.py cleandeb
$(PYTHON) setup.py clean
-rm -rf build
-rm -rf dist
-rm -rf deb_dist
-rm -f $(BUILT_SOURCES)
-find . -name "*.pyc" -delete
-rm -rf opentestpoint_probe_lte.egg-info
-rm -f opentestpoint-probe-lte-*.tar.gz
-rm -f $(PACKAGE).spec
-rm -rf .rpmbuild
-rm -rf .debbuild
-rm -f debian/changelog
DISTCLEANFILES=setup.py
sdist:
$(PYTHON) setup.py sdist
edit = sed \
-e 's|@VERSION[@]|$(VERSION)|g' \
-e 's|@PYTHON[@]|$(PYTHON)|g' \
-e 's|@DEBIAN_VERSION[@]|$(DEBIAN_VERSION)|g' \
-e 's|@DATE_RFC2822[@]|$(DATE_RFC2822)|g'
setup.py: setup.py.in
if test -f $@; then chmod u+w $@; fi
$(edit) $< > $@
chmod g-w,u-w $@
install-exec-hook: $(BUILT_SOURCES)
$(PYTHON) setup.py install \
--single-version-externally-managed \
-O1 \
--root=$(DESTDIR)
RPMARCH=`arch`
if HAVE_RPMBUILD
rpm: $(PACKAGE).spec dist-gzip
mkdir -p .rpmbuild/BUILD \
.rpmbuild/SPECS \
.rpmbuild/SOURCES \
.rpmbuild/SRPMS \
.rpmbuild/RPMS/noarch \
.rpmbuild/tmp
cp -f $(PACKAGE)-$(VERSION).tar.gz .rpmbuild/SOURCES
rpmbuild --clean -ba $(top_srcdir)/$(PACKAGE).spec --target $(RPMARCH) \
--define "_topdir $$PWD/.rpmbuild" \
--define "_tmppath $$PWD/.rpmbuild/tmp"
@echo "============================================================"
@echo "RPMs located in .rpmbuild/RPMS and .rpmbuild/SRPMS"
endif
if HAVE_DEB
deb: dist-gzip
mkdir -p .debbuild
cp -f $(PACKAGE)-$(VERSION).tar.gz .debbuild
cd .debbuild && tar xzf $(PACKAGE)-$(VERSION).tar.gz
$(edit) .debbuild/$(PACKAGE)-$(VERSION)/debian/changelog.in > \
.debbuild/$(PACKAGE)-$(VERSION)/debian/changelog
cd .debbuild/$(PACKAGE)-$(VERSION) && dpkg-buildpackage -F -us -uc
@echo "============================================================"
@echo "debs located in .debbuild"
cleandeb:
dh_clean
else
cleandeb:
endif
$(PACKAGE).spec: $(PACKAGE).spec.in
if test -f $@; then chmod u+w $@; fi
$(edit) $< > $@
chmod g-w,u-w $@
otestpoint/lte/srsenb_pb2.py: otestpoint/lte/srsenb.proto
protoc -I=otestpoint/lte -I=$(libotestpoint_PROTODIR) --python_out=otestpoint/lte $<
sed -i -e 's/import measurementtable_pb2/from otestpoint.interface import measurementtable_pb2/' $@
otestpoint/lte/srsepc_pb2.py: otestpoint/lte/srsepc.proto
protoc -I=otestpoint/lte -I=$(libotestpoint_PROTODIR) --python_out=otestpoint/lte $<
sed -i -e 's/import measurementtable_pb2/from otestpoint.interface import measurementtable_pb2/' $@
otestpoint/lte/srsmbms_pb2.py: otestpoint/lte/srsmbms.proto
protoc -I=otestpoint/lte -I=$(libotestpoint_PROTODIR) --python_out=otestpoint/lte $<
sed -i -e 's/import measurementtable_pb2/from otestpoint.interface import measurementtable_pb2/' $@
otestpoint/lte/srsue_pb2.py: otestpoint/lte/srsue.proto
protoc -I=otestpoint/lte -I=$(libotestpoint_PROTODIR) --python_out=otestpoint/lte $<
sed -i -e 's/import measurementtable_pb2/from otestpoint.interface import measurementtable_pb2/' $@
otestpoint/lte/emaneenb_pb2.py: otestpoint/lte/emaneenb.proto
protoc -I=otestpoint/lte -I=$(libotestpoint_PROTODIR) --python_out=otestpoint/lte $<
sed -i -e 's/import measurementtable_pb2/from otestpoint.interface import measurementtable_pb2/' $@
otestpoint/lte/emaneue_pb2.py: otestpoint/lte/emaneue.proto
protoc -I=otestpoint/lte -I=$(libotestpoint_PROTODIR) --python_out=otestpoint/lte $<
sed -i -e 's/import measurementtable_pb2/from otestpoint.interface import measurementtable_pb2/' $@
otestpoint/lte/srsenb.proto otestpoint/lte/probe-srslte-enb.xsd: meta/srsenb.xml emm-gen
$(PYTHON) ./emm-gen -o ENB --classname srsenb --protofilename srsenb.proto --category SRSLTE -p otestpoint/lte $<
otestpoint/lte/srsepc.proto otestpoint/lte/probe-srslte-epc.xsd: meta/srsepc.xml emm-gen
$(PYTHON) ./emm-gen -o EPC --classname srsepc --protofilename srsepc.proto --category SRSLTE -p otestpoint/lte $<
otestpoint/lte/srsmbms.proto otestpoint/lte/probe-srslte-mbms.xsd: meta/srsmbms.xml emm-gen
$(PYTHON) ./emm-gen -o MBMS --classname srsmbms --protofilename srsmbms.proto --category SRSLTE -p otestpoint/lte $<
otestpoint/lte/srsue.proto otestpoint/lte/probe-srslte-ue.xsd: meta/srsue.xml emm-gen
$(PYTHON) ./emm-gen -o UE --classname srsue --protofilename srsue.proto --category SRSLTE -p otestpoint/lte $<
otestpoint/lte/emaneenb.proto otestpoint/lte/probe-emanelte-enb.xsd: meta/emaneenb.xml emm-gen
$(PYTHON) ./emm-gen -o LTE --classname emaneenb --xsdfilename probe-emanelte-enb.xsd --protofilename emaneenb.proto --category EMANE -p otestpoint/lte $<
otestpoint/lte/emaneue.proto otestpoint/lte/probe-emanelte-ue.xsd: meta/emaneue.xml emm-gen
$(PYTHON) ./emm-gen -o LTE --classname emaneue --xsdfilename probe-emanelte-ue.xsd --protofilename emaneue.proto --category EMANE -p otestpoint/lte $<