-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathatom.mk
90 lines (72 loc) · 1.79 KB
/
atom.mk
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
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libfutils
LOCAL_CATEGORY_PATH := libs
LOCAL_DESCRIPTION := c utility functions
LOCAL_PRIVATE_LIBRARIES := libulog
LOCAL_CONDITIONAL_PRIVATE_LIBRARIES := OPTIONAL:libputils
LOCAL_EXPORT_C_INCLUDES := \
$(LOCAL_PATH)/include
LOCAL_CFLAGS := -D_FILE_OFFSET_BITS=64
LOCAL_SRC_FILES := \
src/hash.c \
src/mbox.c \
src/systimetools.c \
src/timetools.c \
src/random.c \
src/varint.c
ifeq ("$(TARGET_OS)", "linux")
LOCAL_SRC_FILES += src/inotify.c
ifneq ("$(TARGET_OS_FLAVOUR)", "android")
LOCAL_SRC_FILES += src/string.c
endif
endif
ifneq ("$(TARGET_OS)-$(TARGET_OS_FLAVOUR)","linux-android")
LOCAL_SRC_FILES += src/dynmbox.c
endif
ifneq ("$(TARGET_OS)","windows")
LOCAL_SRC_FILES += \
src/fdutils.c \
src/fs.c \
src/safew.c \
src/synctools.c
else
LOCAL_LDLIBS += -lws2_32
endif
include $(BUILD_LIBRARY)
# Unit testing
ifdef TARGET_TEST
include $(CLEAR_VARS)
LOCAL_MODULE := tst-libfutils
LOCAL_SRC_FILES := \
tests/futils_test.c \
tests/futils_test_dynmbox.c \
tests/futils_test_list.c \
tests/futils_test_mbox.c \
tests/futils_test_random.c \
tests/futils_test_systimetools.c \
tests/futils_test_timetools.c \
tests/futils_test_varint.c
ifeq ("$(TARGET_OS)", "linux")
ifneq ("$(TARGET_OS_FLAVOUR)", "android")
LOCAL_SRC_FILES += tests/futils_test_string.c
endif
endif
ifneq ("$(TARGET_OS)","windows")
LOCAL_SRC_FILES += \
tests/futils_test_safew.c
endif
LOCAL_LIBRARIES := libfutils libcunit
ifeq ("$(TARGET_OS)","windows")
LOCAL_LDLIBS += -lws2_32
endif
include $(BUILD_EXECUTABLE)
endif
include $(CLEAR_VARS)
LOCAL_MODULE := futils-random
LOCAL_CATEGORY_PATH := test
LOCAL_DESCRIPTION := futils random benchmark
LOCAL_SRC_FILES := \
tests/futils_random.c
LOCAL_LIBRARIES := libfutils
include $(BUILD_EXECUTABLE)