]>
Commit | Line | Data |
---|---|---|
5de7ce63 UH |
1 | ## |
2 | ## This file is part of the sigrok-androidutils project. | |
3 | ## | |
4 | ## Copyright (C) 2014 Marcus Comstedt <marcus@mc.pp.se> | |
5 | ## | |
6 | ## This program is free software: you can redistribute it and/or modify | |
7 | ## it under the terms of the GNU General Public License as published by | |
8 | ## the Free Software Foundation, either version 3 of the License, or | |
9 | ## (at your option) any later version. | |
10 | ## | |
11 | ## This program is distributed in the hope that it will be useful, | |
12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | ## GNU General Public License for more details. | |
15 | ## | |
16 | ## You should have received a copy of the GNU General Public License | |
17 | ## along with this program. If not, see <http://www.gnu.org/licenses/>. | |
18 | ## | |
ea3ce762 | 19 | |
32aa2c6e UH |
20 | lib_LTLIBRARIES = libsigrokandroidutils.la |
21 | ||
22 | libsigrokandroidutils_la_CXXFLAGS = \ | |
23 | -fno-exceptions | |
24 | ||
25 | libsigrokandroidutils_la_SOURCES = \ | |
26 | lib/jvm_glue.cpp \ | |
27 | lib/envsetup.cpp | |
28 | ||
29 | pkgconfigdir = $(libdir)/pkgconfig | |
30 | pkgconfig_DATA = lib/libsigrokandroidutils.pc | |
31 | ||
32 | library_includedir = $(includedir)/libsigrokandroidutils | |
33 | library_include_HEADERS = lib/libsigrokandroidutils.h | |
34 | noinst_HEADERS = lib/libsigrokandroidutils-internal.h | |
2b68989a | 35 | |
70c9d937 | 36 | dist_pkgdata_DATA = device_filter.xml |
5d83f11e MC |
37 | |
38 | jardir = $(prefix)/jar | |
39 | jar_DATA = $(UTILS_JAR) $(ANTTASKS_JAR) | |
40 | ||
711d21ce MC |
41 | mvndir = $(prefix)/.m2/repository/org/sigrok/sigrok-core-android/$(BINDINGS_VERSION) |
42 | mvn_DATA = $(SIGROK_CORE_AAR) $(SIGROK_CORE_POM) | |
43 | ||
ea3ce762 MC |
44 | UTILS_JAR = sigrok-androidutils.jar |
45 | ||
46 | ANTTASKS_JAR = ant/sigrok-androidutils-anttasks.jar | |
47 | ||
711d21ce MC |
48 | BINDINGS_VERSION = $(LIBSIGROKCXX_VERSION) |
49 | ||
50 | SIGROK_CORE_AAR = sigrok-core-android-$(BINDINGS_VERSION).aar | |
51 | SIGROK_CORE_POM = sigrok-core-android-$(BINDINGS_VERSION).pom | |
52 | ||
53 | ANTFLAGS = -Dandroid.sdk=$(ANDROID_SDK) -Dandroid.platform=$(ANDROID_PLATFORM) \ | |
54 | -Dprefix=$(prefix) -Dbindings.version=$(BINDINGS_VERSION) | |
ea3ce762 | 55 | |
70c9d937 MC |
56 | EXTRA_DIST = build.xml src ant/src ant/resources |
57 | ||
ea3ce762 | 58 | $(UTILS_JAR): always |
4c13edc3 | 59 | $(AM_V_GEN)ant -S -q $(ANTFLAGS) utils |
ea3ce762 MC |
60 | |
61 | $(ANTTASKS_JAR): always | |
4c13edc3 | 62 | $(AM_V_GEN)ant -S -q anttasks |
ea3ce762 | 63 | |
711d21ce MC |
64 | $(SIGROK_CORE_AAR): always $(UTILS_JAR) $(ANTTASKS_JAR) $(lib_LTLIBRARIES) |
65 | $(AM_V_GEN)ant -S -q $(ANTFLAGS) aar | |
66 | ||
67 | $(SIGROK_CORE_POM): always | |
68 | $(AM_V_GEN)ant -S -q $(ANTFLAGS) pom | |
69 | ||
7a810032 UH |
70 | update-device-filter: |
71 | @echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" | |
72 | @echo "<!-- Generated via 'make update-device-filter', don't edit. -->" | |
73 | @echo "<resources>" | |
74 | @echo -e -n `wget 'http://sigrok.org/gitweb/?p=libsigrok.git;a=blob_plain;f=contrib/z60_libsigrok.rules' -q -O - | grep idVendor | sed 's/ATTRS{idVendor}=="\(.*\)", ATTRS{idProduct}=="\(.*\)", MODE.*/<usb-device vendor-id="\1" product-id="\2" \/>\\\n/p' | sort | uniq` | |
75 | @echo "</resources>" | |
76 | ||
283c6abb | 77 | clean-local: |
711d21ce | 78 | -rm -rf build ant/build jni |
283c6abb | 79 | -rm -f $(UTILS_JAR) $(ANTTASKS_JAR) |
711d21ce | 80 | -rm -f $(SIGROK_CORE_AAR) $(SIGROK_CORE_POM) classes.jar |
283c6abb | 81 | |
ea3ce762 MC |
82 | .PHONY: always |
83 | ||
84 | always: | |
85 |