-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.am
86 lines (63 loc) · 2.81 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
##
## This file is part of the sigrok-androidutils project.
##
## Copyright (C) 2014 Marcus Comstedt <[email protected]>
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##
lib_LTLIBRARIES = libsigrokandroidutils.la
libsigrokandroidutils_la_CXXFLAGS = \
-fno-exceptions
libsigrokandroidutils_la_SOURCES = \
lib/jvm_glue.cpp \
lib/envsetup.cpp
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = lib/libsigrokandroidutils.pc
library_includedir = $(includedir)/libsigrokandroidutils
library_include_HEADERS = lib/libsigrokandroidutils.h
noinst_HEADERS = lib/libsigrokandroidutils-internal.h
dist_pkgdata_DATA = device_filter.xml
jardir = $(prefix)/jar
jar_DATA = $(UTILS_JAR) $(ANTTASKS_JAR)
mvndir = $(prefix)/.m2/repository/org/sigrok/sigrok-core-android/$(BINDINGS_VERSION)
mvn_DATA = $(SIGROK_CORE_AAR) $(SIGROK_CORE_POM)
UTILS_JAR = sigrok-androidutils.jar
ANTTASKS_JAR = ant/sigrok-androidutils-anttasks.jar
BINDINGS_VERSION = $(LIBSIGROKCXX_VERSION)
SIGROK_CORE_AAR = sigrok-core-android-$(BINDINGS_VERSION).aar
SIGROK_CORE_POM = sigrok-core-android-$(BINDINGS_VERSION).pom
ANTFLAGS = -Dandroid.sdk=$(ANDROID_SDK) -Dandroid.platform=$(ANDROID_PLATFORM) \
-Dprefix=$(prefix) -Dbindings.version=$(BINDINGS_VERSION) \
-Dant.build.javac.target=1.6 -Dant.build.javac.source=1.6
EXTRA_DIST = build.xml src ant/src ant/resources
$(UTILS_JAR): always
$(AM_V_GEN)ant -S -q $(ANTFLAGS) utils
$(ANTTASKS_JAR): always
$(AM_V_GEN)ant -S -q anttasks
$(SIGROK_CORE_AAR): always $(UTILS_JAR) $(ANTTASKS_JAR) $(lib_LTLIBRARIES)
$(AM_V_GEN)ant -S -q $(ANTFLAGS) aar
$(SIGROK_CORE_POM): always
$(AM_V_GEN)ant -S -q $(ANTFLAGS) pom
update-device-filter:
@echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
@echo "<!-- Generated via 'make update-device-filter', don't edit. -->"
@echo "<resources>"
@wget 'http://sigrok.org/gitweb/?p=libsigrok.git;a=blob_plain;f=contrib/60-libsigrok.rules' -q -O - | perl -ne 'm/ATTRS\{idVendor\}=="([^"]*)", ATTRS\{idProduct\}=="([^"]*)"/ && print(" <usb-device vendor-id=\"".hex($$1)."\" product-id=\"".hex($$2)."\" />\n")' | sort | uniq
@echo "</resources>"
clean-local:
-rm -rf build ant/build jni
-rm -f $(UTILS_JAR) $(ANTTASKS_JAR)
-rm -f $(SIGROK_CORE_AAR) $(SIGROK_CORE_POM) classes.jar
.PHONY: always
always: