1 # Copyright (c) 2015 Intel Corporation
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 USE_IIO_SENSOR_HAL := true
16 USE_IIO_ACTIVITY_RECOGNITION_HAL := true
19 LIBHARDWARE?=../../../../hardware/libhardware/
20 CFLAGS=-DLOG_TAG=\"sens\" -I$(LIBHARDWARE)include/ -I./linux -fPIC -Wall
21 LDFLAGS=-ldl -lpthread -lm -lrt
23 all: sensors.gmin.so sens activity_recognition.gmin.so activity
25 linux_src = linux/log.o
27 sens: sens.o $(linux_src)
28 cc -o $@ $^ $(LDFLAGS)
30 activity: activity.o $(linux_src)
31 cc -o $@ $^ $(LDFLAGS)
33 sensors.gmin.so: $(patsubst %.c,%.o,$(src_files) $(linux_src))
34 cc -o $@ $^ $(LDFLAGS) -shared
36 activity_recognition.gmin.so: $(patsubst %.c,%.o,$(activity_src_files) $(linux_src))
37 cc -o $@ $^ $(LDFLAGS) -shared
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