OSDN Git Service

Merge branch 'lineage-16.0' of https://github.com/me176c-dev/android_hardware_iio...
[android-x86/hardware-intel-libsensors.git] / Makefile
1 # Copyright (c) 2015 Intel Corporation
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 USE_IIO_SENSOR_HAL := true
16 USE_IIO_ACTIVITY_RECOGNITION_HAL := true
17 include Android.mk
18
19 LIBHARDWARE?=../../../../hardware/libhardware/
20 CFLAGS=-DLOG_TAG=\"sens\" -I$(LIBHARDWARE)include/ -I./linux -fPIC -Wall
21 LDFLAGS=-ldl -lpthread -lm -lrt
22
23 all: sensors.gmin.so sens activity_recognition.gmin.so activity
24
25 linux_src = linux/log.o
26
27 sens: sens.o $(linux_src)
28         cc -o $@ $^ $(LDFLAGS)
29
30 activity: activity.o $(linux_src)
31         cc -o $@ $^ $(LDFLAGS)
32
33 sensors.gmin.so: $(patsubst %.c,%.o,$(src_files) $(linux_src))
34         cc -o $@ $^ $(LDFLAGS) -shared
35
36 activity_recognition.gmin.so: $(patsubst %.c,%.o,$(activity_src_files) $(linux_src))
37         cc -o $@ $^ $(LDFLAGS) -shared
38
39 clean:
40         -rm $(patsubst %.c,%.o,$(src_files) $(activity_src_files) $(linux_src) sens.c activity.c) sens sensors.gmin.so activity activity_recognition.gmin.so 2>/dev/null