android: change build script from mk to bp.
This commit is contained in:
114
Android.bp
Normal file
114
Android.bp
Normal file
@@ -0,0 +1,114 @@
|
||||
cc_library_headers {
|
||||
name: "wiringPi-headers",
|
||||
}
|
||||
cc_library_shared {
|
||||
local_include_dirs: ["wiringPi"],
|
||||
|
||||
name: "libwiringPi",
|
||||
srcs: [
|
||||
"wiringPi/ads1115.c",
|
||||
"wiringPi/mcp23008.c",
|
||||
"wiringPi/mcp4802.c",
|
||||
"wiringPi/piHiPri.c",
|
||||
"wiringPi/sr595.c",
|
||||
"wiringPi/bmp180.c",
|
||||
"wiringPi/mcp23016.c",
|
||||
"wiringPi/odroidc1.c",
|
||||
"wiringPi/odroidn2.c",
|
||||
"wiringPi/piThread.c",
|
||||
"wiringPi/wiringPi.c",
|
||||
"wiringPi/mcp23017.c",
|
||||
"wiringPi/odroidc2.c",
|
||||
"wiringPi/drcSerial.c",
|
||||
"wiringPi/mcp23s08.c",
|
||||
"wiringPi/odroidn1.c",
|
||||
"wiringPi/wiringPiI2C.c",
|
||||
"wiringPi/ds18b20.c",
|
||||
"wiringPi/mcp23s17.c",
|
||||
"wiringPi/sn3218.c",
|
||||
"wiringPi/wiringPiSPI.c",
|
||||
"wiringPi/htu21d.c",
|
||||
"wiringPi/mcp3002.c",
|
||||
"wiringPi/odroidxu3.c",
|
||||
"wiringPi/softPwm.c",
|
||||
"wiringPi/wiringSerial.c",
|
||||
"wiringPi/max31855.c",
|
||||
"wiringPi/mcp3004.c",
|
||||
"wiringPi/pcf8574.c",
|
||||
"wiringPi/softServo.c",
|
||||
"wiringPi/wiringShift.c",
|
||||
"wiringPi/max5322.c",
|
||||
"wiringPi/mcp3422.c",
|
||||
"wiringPi/pcf8591.c",
|
||||
"wiringPi/softTone.c",
|
||||
"wiringPi/wpiExtensions.c",
|
||||
],
|
||||
|
||||
cflags: [
|
||||
"-UNDEBUG",
|
||||
"-DANDROID",
|
||||
"-Wno-return-type",
|
||||
],
|
||||
|
||||
host_ldlibs: [
|
||||
"-ldl",
|
||||
"-llog",
|
||||
],
|
||||
}
|
||||
|
||||
cc_library_shared {
|
||||
local_include_dirs: ["wiringPi"],
|
||||
|
||||
name: "libwiringPiDev",
|
||||
srcs: [
|
||||
"devLib/ds1302.c",
|
||||
"devLib/maxdetect.c",
|
||||
"devLib/piNes.c",
|
||||
"devLib/gertboard.c",
|
||||
"devLib/lcd128x64.c",
|
||||
"devLib/lcd.c",
|
||||
"devLib/piGlow.c",
|
||||
"devLib/scrollPhat.c",
|
||||
"devLib/piFace.c",
|
||||
],
|
||||
|
||||
shared_libs: ["libwiringPi"],
|
||||
|
||||
host_ldlibs: [
|
||||
"-ldl",
|
||||
"-llog",
|
||||
],
|
||||
|
||||
cflags: [
|
||||
"-UNDEBUG",
|
||||
"-DANDROID",
|
||||
"-Wno-return-type",
|
||||
],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
|
||||
name: "gpio",
|
||||
srcs: [
|
||||
"gpio/gpio.c",
|
||||
"gpio/readall.c",
|
||||
"gpio/pins.c",
|
||||
],
|
||||
|
||||
local_include_dirs: [
|
||||
"wiringPi",
|
||||
"devLib",
|
||||
],
|
||||
|
||||
cflags: [
|
||||
"-UNDEBUG",
|
||||
"-DANDROID",
|
||||
"-Wno-return-type",
|
||||
],
|
||||
host_ldlibs: ["-llog"],
|
||||
shared_libs: [
|
||||
"libwiringPi",
|
||||
"libwiringPiDev",
|
||||
],
|
||||
|
||||
}
|
||||
90
Android.mk
90
Android.mk
@@ -1,90 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_C_INCLUDES += \
|
||||
$(LOCAL_PATH)/wiringPi
|
||||
|
||||
LOCAL_MODULE := wiringPi
|
||||
LOCAL_SRC_FILES := \
|
||||
wiringPi/ads1115.c \
|
||||
wiringPi/mcp23008.c \
|
||||
wiringPi/mcp4802.c \
|
||||
wiringPi/piHiPri.c \
|
||||
wiringPi/sr595.c \
|
||||
wiringPi/bmp180.c \
|
||||
wiringPi/mcp23016.c \
|
||||
wiringPi/odroidc1.c \
|
||||
wiringPi/odroidn2.c \
|
||||
wiringPi/piThread.c \
|
||||
wiringPi/wiringOdroid.c \
|
||||
wiringPi/mcp23017.c \
|
||||
wiringPi/odroidc2.c \
|
||||
wiringPi/drcSerial.c \
|
||||
wiringPi/mcp23s08.c \
|
||||
wiringPi/odroidn1.c \
|
||||
wiringPi/wiringOdroidI2C.c \
|
||||
wiringPi/ds18b20.c \
|
||||
wiringPi/mcp23s17.c \
|
||||
wiringPi/sn3218.c \
|
||||
wiringPi/wiringOdroidSPI.c \
|
||||
wiringPi/htu21d.c \
|
||||
wiringPi/mcp3002.c \
|
||||
wiringPi/odroidxu3.c \
|
||||
wiringPi/softPwm.c \
|
||||
wiringPi/wiringSerial.c \
|
||||
wiringPi/max31855.c \
|
||||
wiringPi/mcp3004.c \
|
||||
wiringPi/pcf8574.c \
|
||||
wiringPi/softServo.c \
|
||||
wiringPi/wiringShift.c \
|
||||
wiringPi/max5322.c \
|
||||
wiringPi/mcp3422.c \
|
||||
wiringPi/pcf8591.c \
|
||||
wiringPi/softTone.c \
|
||||
wiringPi/wpiExtensions.c
|
||||
|
||||
LOCAL_CFLAGS += -UNDEBUG -DANDROID -Wno-return-type
|
||||
|
||||
LOCAL_LDLIBS := -ldl -llog
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_C_INCLUDES += \
|
||||
$(LOCAL_PATH)/wiringPi
|
||||
|
||||
LOCAL_MODULE := wiringPiDev
|
||||
LOCAL_SRC_FILES := \
|
||||
devLib/ds1302.c \
|
||||
devLib/maxdetect.c \
|
||||
devLib/piNes.c \
|
||||
devLib/gertboard.c \
|
||||
devLib/lcd128x64.c \
|
||||
devLib/lcd.c \
|
||||
devLib/piGlow.c \
|
||||
devLib/scrollPhat.c \
|
||||
devLib/piFace.c
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libwiringPi
|
||||
|
||||
LOCAL_LDLIBS := -ldl -llog
|
||||
|
||||
LOCAL_CFLAGS += -UNDEBUG -DANDROID -Wno-return-type
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := gpiod
|
||||
LOCAL_SRC_FILES := \
|
||||
gpio/gpio.c \
|
||||
gpio/readall.c \
|
||||
gpio/pins.c
|
||||
|
||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/wiringPi $(LOCAL_PATH)/devLib/
|
||||
|
||||
LOCAL_CFLAGS += -UNDEBUG -DANDROID -Wno-return-type
|
||||
LOCAL_LDLIBS := -llog
|
||||
LOCAL_SHARED_LIBRARIES := libwiringPi libwiringPiDev
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
Reference in New Issue
Block a user