-
Notifications
You must be signed in to change notification settings - Fork 2
/
headers.patch
48 lines (47 loc) · 1.95 KB
/
headers.patch
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
diff -rN -u a/dios/CMakeLists.txt b/dios/CMakeLists.txt
--- a/dios/CMakeLists.txt 2019-11-01 15:57:40.145739566 +0100
+++ b/dios/CMakeLists.txt 2019-11-01 15:57:40.145739566 +0100
@@ -133,3 +133,43 @@
target_link_libraries( divine-rt divine-cc )
set_target_properties( divine-rt PROPERTIES POSITION_INDEPENDENT_CODE ON )
install( TARGETS divine-rt DESTINATION lib )
+
+# Install headers
+foreach( D sys config vfs vfs include include/_PDCLIB include/util include/rst
+ include/sys include/bits include/machine include/netinet include/arpa
+ libcxxabi/src libcxx/include/support/xlocale libcxx/src/support
+ libcxx/include/support/divine lava lamp )
+
+ file( GLOB HPP_${D} LIST_DIRECTORIES false ${D}/*.hpp ${D}/*.h ${D}/*.def
+ ${D}/*.ipp ${D}/*.undef )
+ install( FILES ${HPP_${D}} DESTINATION include/dios/${D} )
+endforeach()
+
+foreach( D libcxxabi/include libcxx/include libcxx/include/ext
+ libcxx/include/experimental libunwind/include )
+ file( GLOB HPP_${D} LIST_DIRECTORIES false ${D}/* )
+ install( FILES ${HPP_${D}} DESTINATION include/dios/${D} )
+endforeach()
+
+file( GLOB HPP_BRICKS LIST_DIRECTORIES false ../bricks/brick-* )
+install( FILES ${HPP_BRICKS} DESTINATION include/bricks )
+
+install( DIRECTORY ${SYSINC} DESTINATION include/dios/sys )
+
+# Install sources
+foreach( D host native sys vfs proxy config arch/divm arch/klee arch/native
+ rst libm libm/ld80 libcxxabi/src libcxx/src libpthread host lava
+ lamp )
+ file( GLOB SRC_${D} ${D}/*.c ${D}/*.cpp )
+ install( FILES ${SRC_${D}} DESTINATION include/dios/${D} )
+endforeach()
+
+# Install libc sources
+file( GLOB LIBC_SUBDIRS libc/* )
+foreach( D ${LIBC_SUBDIRS} )
+ if( IS_DIRECTORY ${D} )
+ file( RELATIVE_PATH D "${CMAKE_CURRENT_SOURCE_DIR}/libc" "${D}" )
+ file( GLOB SRC_${D} LIST_DIRECTORIES false libc/${D}/*.c libc/${D}/*.cpp )
+ install( FILES ${SRC_${D}} DESTINATION include/dios/libc/${D} )
+ endif()
+endforeach()