• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# This build script corresponds to a small library containing
2# OS-specific support functions for:
3#   - thread-local storage
4#   - dynamic library loading
5#   - child process creation and wait  (probably not needed in guest)
6#
7LOCAL_PATH := $(call my-dir)
8
9### Guest library ##############################################
10$(call emugl-begin-static-library,libOpenglOsUtils)
11
12    $(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
13    $(call emugl-export,LDLIBS,-ldl)
14
15    LOCAL_SRC_FILES := \
16        osProcessUnix.cpp \
17        osThreadUnix.cpp \
18        osDynLibrary.cpp
19
20$(call emugl-end-module)
21
22
23### Host library ##############################################
24$(call emugl-begin-host-static-library,libOpenglOsUtils)
25
26    $(call emugl-export,C_INCLUDES,$(LOCAL_PATH))
27
28    LOCAL_SRC_FILES := osDynLibrary.cpp
29
30    ifeq ($(HOST_OS),windows)
31        LOCAL_SRC_FILES += \
32            osProcessWin.cpp \
33            osThreadWin.cpp
34
35        $(call emugl-export,LDLIBS,-lws2_32 -lpsapi)
36    else
37        LOCAL_SRC_FILES += \
38            osProcessUnix.cpp \
39            osThreadUnix.cpp
40
41        $(call emugl-export,LDLIBS,-ldl)
42    endif
43
44    ifeq ($(HOST_OS),linux)
45        $(call emugl-export,LDLIBS,-lpthread -lrt)
46    endif
47
48$(call emugl-end-module)
49