Home | History | Annotate | Download | only in OpenglOsUtils
      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 #
      7 LOCAL_PATH := $(call my-dir)
      8 
      9 ### Host library ##############################################
     10 
     11 host_common_SRC_FILES := osDynLibrary.cpp
     12 host_common_LDLIBS :=
     13 host_common_INCLUDES := $(LOCAL_PATH)
     14 
     15 ifeq ($(HOST_OS),windows)
     16     host_common_SRC_FILES += \
     17         osProcessWin.cpp \
     18         osThreadWin.cpp
     19     host_common_LDLIBS += -lws2_32 -lpsapi
     20 else
     21     host_common_SRC_FILES += \
     22         osProcessUnix.cpp \
     23         osThreadUnix.cpp
     24     host_common_LDLIBS += -ldl
     25 endif
     26 
     27 ifeq ($(HOST_OS),linux)
     28     host_common_LDLIBS += -lpthread -lrt -lX11
     29 endif
     30 
     31 ### 32-bit host library ####
     32 $(call emugl-begin-host-static-library,libOpenglOsUtils)
     33     $(call emugl-export,C_INCLUDES,$(host_common_INCLUDES))
     34     LOCAL_SRC_FILES = $(host_common_SRC_FILES)
     35     $(call emugl-export,LDLIBS,$(host_common_LDLIBS))
     36     $(call emugl-import,libemugl_common)
     37 $(call emugl-end-module)
     38 
     39 ### 64-bit host library ####
     40 ifdef EMUGL_BUILD_64BITS
     41     $(call emugl-begin-host64-static-library,lib64OpenglOsUtils)
     42         $(call emugl-export,C_INCLUDES,$(host_common_INCLUDES))
     43         LOCAL_SRC_FILES = $(host_common_SRC_FILES)
     44         $(call emugl-export,LDLIBS,$(host_common_LDLIBS))
     45         $(call emugl-import,lib64emugl_common)
     46         $(call emugl-export,CFLAGS,-m64 -fPIC)
     47     $(call emugl-end-module)
     48 endif
     49