Home | History | Annotate | Download | only in build-android
      1 @echo off
      2 REM # Copyright 2015 The Android Open Source Project
      3 REM # Copyright (C) 2015 Valve Corporation
      4 REM
      5 REM # Licensed under the Apache License, Version 2.0 (the "License");
      6 REM # you may not use this file except in compliance with the License.
      7 REM # You may obtain a copy of the License at
      8 REM
      9 REM #      http://www.apache.org/licenses/LICENSE-2.0
     10 REM
     11 REM # Unless required by applicable law or agreed to in writing, software
     12 REM # distributed under the License is distributed on an "AS IS" BASIS,
     13 REM # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14 REM # See the License for the specific language governing permissions and
     15 REM # limitations under the License.
     16 
     17 if exist generated (
     18   rmdir /s /q generated
     19 )
     20 mkdir generated\include generated\common
     21 
     22 python ../vk-generate.py Android dispatch-table-ops layer > generated/include/vk_dispatch_table_helper.h
     23 
     24 python ../vk_helper.py --gen_enum_string_helper ../include/vulkan/vulkan.h --abs_out_dir generated/include
     25 python ../vk_helper.py --gen_struct_wrappers ../include/vulkan/vulkan.h --abs_out_dir generated/include
     26 
     27 python ../vk-layer-generate.py Android object_tracker ../include/vulkan/vulkan.h > generated/include/object_tracker.cpp
     28 python ../vk-layer-generate.py Android unique_objects ../include/vulkan/vulkan.h > generated/include/unique_objects.cpp
     29 
     30 cd generated/include
     31 python ../../../genvk.py threading -registry ../../../vk.xml thread_check.h
     32 python ../../../genvk.py paramchecker -registry ../../../vk.xml parameter_validation.h
     33 cd ../..
     34 
     35 copy /Y ..\layers\vk_layer_config.cpp   generated\common\
     36 copy /Y ..\layers\vk_layer_extension_utils.cpp  generated\common\
     37 copy /Y ..\layers\vk_layer_utils.cpp    generated\common\
     38 copy /Y ..\layers\vk_layer_table.cpp    generated\common\
     39 
     40 REM create build-script root directory
     41 mkdir generated\gradle-build
     42 cd generated\gradle-build
     43 mkdir  core_validation device_limits image object_tracker parameter_validation swapchain threading unique_objects
     44 cd ..\..
     45 mkdir generated\layer-src
     46 cd generated\layer-src
     47 mkdir  core_validation device_limits image object_tracker parameter_validation swapchain threading unique_objects
     48 cd ..\..
     49 xcopy /s gradle-templates\*   generated\gradle-build\
     50 for %%G in (core_validation device_limits image parameter_validation swapchain threading) Do (
     51     copy ..\layers\%%G.cpp   generated\layer-src\%%G
     52     echo apply from: "../win.template.gradle"  > generated\gradle-build\%%G\build.gradle
     53 )
     54 copy generated\include\object_tracker.cpp   generated\layer-src\object_tracker
     55 echo apply from: "../win.template.gradle"  > generated\gradle-build\object_tracker\build.gradle
     56 copy generated\include\unique_objects.cpp   generated\layer-src\unique_objects
     57 move generated\include\vk_safe_struct.cpp generated\layer-src\unique_objects\vk_safe_struct.cpp
     58 echo apply from: "../win.template.gradle"  > generated\gradle-build\unique_objects\build.gradle
     59 
     60 del  /f /q generated\include\object_tracker.cpp
     61 del  /f /q generated\include\unique_objects.cpp
     62