Home | History | Annotate | Download | only in src
      1 # Copyright (C) 2016 The Android Open Source Project
      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 LOCAL_PATH:= $(call my-dir)
     16 
     17 libufdt_tests_cflags := -Wall -Werror
     18 ifeq ($(HOST_OS),darwin)
     19 libufdt_tests_cflags += -Wno-error=format
     20 endif
     21 
     22 ###################################################
     23 
     24 include $(CLEAR_VARS)
     25 
     26 LOCAL_MODULE := ufdt_gen_test_dts
     27 LOCAL_CFLAGS := $(libufdt_tests_cflags)
     28 LOCAL_SRC_FILES := ufdt_gen_test_dts.c
     29 
     30 include $(BUILD_HOST_EXECUTABLE)
     31 
     32 ###################################################
     33 
     34 include $(CLEAR_VARS)
     35 
     36 LOCAL_MODULE := ufdt_apply_overlay_host
     37 LOCAL_CFLAGS := $(libufdt_tests_cflags)
     38 LOCAL_SRC_FILES := ufdt_overlay_test_app.c util.c
     39 LOCAL_STATIC_LIBRARIES := \
     40     libufdt \
     41     libfdt \
     42     libufdt_sysdeps
     43 LOCAL_REQUIRED_MODULES := dtc
     44 LOCAL_CXX_STL := none
     45 
     46 include $(BUILD_HOST_EXECUTABLE)
     47 
     48 $(call dist-for-goals, dist_files, $(ALL_MODULES.ufdt_apply_overlay_host.BUILT):libufdt/ufdt_apply_overlay)
     49 
     50 ###################################################
     51 
     52 include $(CLEAR_VARS)
     53 
     54 LOCAL_MODULE := ufdt_apply_overlay
     55 LOCAL_CFLAGS := $(libufdt_tests_cflags)
     56 LOCAL_SRC_FILES := ufdt_overlay_test_app.c util.c
     57 LOCAL_STATIC_LIBRARIES := \
     58     libufdt \
     59     libfdt \
     60     libufdt_sysdeps
     61 LOCAL_REQUIRED_MODULES := dtc
     62 
     63 include $(BUILD_EXECUTABLE)
     64 
     65 ###################################################
     66 include $(CLEAR_VARS)
     67 
     68 LOCAL_MODULE := fdt_apply_overlay
     69 LOCAL_CFLAGS := $(libufdt_tests_cflags)
     70 LOCAL_SRC_FILES := fdt_overlay_test_app.c util.c
     71 LOCAL_STATIC_LIBRARIES := \
     72     libfdt \
     73     libufdt_sysdeps
     74 LOCAL_REQUIRED_MODULES := dtc
     75 
     76 include $(BUILD_HOST_EXECUTABLE)
     77 
     78 ###################################################
     79 
     80 include $(CLEAR_VARS)
     81 
     82 LOCAL_MODULE := extract_dtb
     83 LOCAL_CFLAGS := $(libufdt_tests_cflags)
     84 LOCAL_SRC_FILES := extract_dtb.c util.c
     85 LOCAL_STATIC_LIBRARIES := \
     86     libfdt \
     87     libufdt_sysdeps
     88 LOCAL_REQUIRED_MODULES := dtc
     89 LOCAL_CXX_STL := none
     90 
     91 include $(BUILD_HOST_EXECUTABLE)
     92 
     93 $(call dist-for-goals, dist_files, $(ALL_MODULES.extract_dtb.BUILT):libufdt/extract_dtb)
     94 
     95 ###################################################
     96 
     97 include $(CLEAR_VARS)
     98 
     99 LOCAL_MODULE := fdt_apply_overlay
    100 LOCAL_CFLAGS := $(libufdt_tests_cflags)
    101 LOCAL_SRC_FILES := fdt_overlay_test_app.c util.c
    102 LOCAL_STATIC_LIBRARIES := \
    103     libfdt \
    104     libufdt_sysdeps
    105 LOCAL_REQUIRED_MODULES := dtc
    106 
    107 include $(BUILD_EXECUTABLE)
    108 
    109 ###################################################
    110 include $(CLEAR_VARS)
    111 
    112 LOCAL_MODULE := ufdt_verify_overlay_host
    113 LOCAL_CFLAGS := $(libufdt_tests_cflags)
    114 LOCAL_SRC_FILES := ufdt_verify_overlay_app.cpp
    115 LOCAL_STATIC_LIBRARIES := \
    116     libufdt \
    117     libfdt \
    118     libufdt_sysdeps \
    119     libufdt_verify
    120 LOCAL_REQUIRED_MODULES := dtc
    121 
    122 include $(BUILD_HOST_EXECUTABLE)
    123 
    124 ###################################################
    125 include $(CLEAR_VARS)
    126 
    127 LOCAL_MODULE := ufdt_verify_overlay
    128 LOCAL_CFLAGS := $(libufdt_tests_cflags)
    129 LOCAL_SRC_FILES := ufdt_verify_overlay_app.cpp
    130 LOCAL_STATIC_LIBRARIES := \
    131     libufdt \
    132     libfdt \
    133     libufdt_sysdeps \
    134     libufdt_verify
    135 LOCAL_REQUIRED_MODULES := dtc
    136 
    137 include $(BUILD_NATIVE_TEST)
    138 
    139 ###################################################
    140