ovr_sdk

diff LibOVR/Makefile @ 0:1b39a1b46319

initial 0.4.4
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 14 Jan 2015 06:51:16 +0200
parents
children e01da1033ca5
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/LibOVR/Makefile	Wed Jan 14 06:51:16 2015 +0200
     1.3 @@ -0,0 +1,156 @@
     1.4 +#############################################################################
     1.5 +#
     1.6 +# Filename    : Makefile
     1.7 +# Content     : Makefile for building Linux version of: libovr
     1.8 +# Created     : 2014
     1.9 +# Authors     : Simon Hallam, Peter Giokaris, Chris Taylor
    1.10 +# Copyright   : Copyright 2014 OculusVR, Inc. All Rights Reserved
    1.11 +# Instruction : The g++ compiler and standard lib packages need to be
    1.12 +#               installed on the system.  Navigate in a shell to the
    1.13 +#               directory where this Makefile is located and enter:
    1.14 +#
    1.15 +#               make                builds the release version for the
    1.16 +#                                   current architecture
    1.17 +#               make clean          delete intermediate release object files
    1.18 +#                                   and the library file
    1.19 +#               make DEBUG=1        builds the debug version for the current
    1.20 +#                                   architecture
    1.21 +#               make clean DEBUG=1  deletes intermediate debug object files
    1.22 +#                                   and the library file
    1.23 +#
    1.24 +# Output      : Relative to the directory this Makefile lives in, libraries
    1.25 +#               are built at the following locations depending upon the
    1.26 +#               architecture of the system you are running:
    1.27 +#
    1.28 +#               ./Lib/Linux/Debug/i386/libovr.a
    1.29 +#               ./Lib/Linux/Debug/x86_64/libovr.a
    1.30 +#               ./Lib/Linux/Release/i386/libovr.a
    1.31 +#               ./Lib/Linux/Release/x86_64/libovr.a
    1.32 +#
    1.33 +#############################################################################
    1.34 +
    1.35 +####### Include auxiliary makefiles in current directory
    1.36 +-include Makefile.*[^~]
    1.37 +
    1.38 +####### Detect system architecture
    1.39 +
    1.40 +SYSARCH       = i386
    1.41 +ifeq ($(shell uname -m),x86_64)
    1.42 +SYSARCH       = x86_64
    1.43 +endif
    1.44 +
    1.45 +####### Compiler, tools and options
    1.46 +
    1.47 +CXX           = g++
    1.48 +LINK          = 
    1.49 +DELETEFILE    = rm -f
    1.50 +
    1.51 +####### Detect debug or release
    1.52 +
    1.53 +COMMONFLAGS   = -Wall -Wextra -Werror -pipe -fPIC -msse2
    1.54 +
    1.55 +DEBUG         ?= 0
    1.56 +CXXFLAGS 			?=
    1.57 +ifeq ($(DEBUG), 1)
    1.58 +	CXXFLAGS      += $(COMMONFLAGS) -DDEBUG -DOVR_BUILD_DEBUG -g
    1.59 +	RELEASETYPE   ?= Debug
    1.60 +else
    1.61 +	CXXFLAGS      += $(COMMONFLAGS) -O2 -fno-strict-aliasing
    1.62 +	RELEASETYPE   ?= Release
    1.63 +endif
    1.64 +
    1.65 +####### Paths
    1.66 +
    1.67 +LIBOVRPATH    = .
    1.68 +3RDPARTYPATH  = ../3rdParty
    1.69 +INCPATH       = -I. -I.. -I$(LIBOVRPATH)/Include -I$(LIBOVRPATH)/Src
    1.70 +OBJPATH       = ./Obj/Linux/$(RELEASETYPE)/$(SYSARCH)
    1.71 +PREFIX        = /usr/local
    1.72 +
    1.73 +####### Files
    1.74 +
    1.75 +TARGET_DIR      = ./Lib/Linux/$(RELEASETYPE)/$(SYSARCH)
    1.76 +STATIC_NAME     = libovr.a
    1.77 +STATIC_TARGET   = $(TARGET_DIR)/$(STATIC_NAME)
    1.78 +LIBOVR_INST_HDR = Src/OVR_CAPI.h Src/OVR_CAPI_Keys.h Src/OVR_CAPI_GL.h
    1.79 +
    1.80 +####### Rules
    1.81 +
    1.82 +all:    $(STATIC_TARGET)
    1.83 +
    1.84 +OTHER_SOURCE =	$(3RDPARTYPATH)/EDID/edid.cpp \
    1.85 +				$(3RDPARTYPATH)/TinyXml/tinyxml2.cpp
    1.86 +
    1.87 +OTHER_OBJECTS = $(OTHER_SOURCE:.cpp=.o)
    1.88 +
    1.89 +LIBOVR_SOURCE = 	$(LIBOVRPATH)/Src/Net/OVR_BitStream.cpp \
    1.90 +				$(LIBOVRPATH)/Src/Net/OVR_Unix_Socket.cpp \
    1.91 +				$(LIBOVRPATH)/Src/Net/OVR_NetworkPlugin.cpp \
    1.92 +				$(LIBOVRPATH)/Src/Net/OVR_PacketizedTCPSocket.cpp \
    1.93 +				$(LIBOVRPATH)/Src/Net/OVR_RPC1.cpp \
    1.94 +				$(LIBOVRPATH)/Src/Net/OVR_Session.cpp \
    1.95 +				$(LIBOVRPATH)/Src/Net/OVR_Socket.cpp \
    1.96 +				$(LIBOVRPATH)/Src/Service/Service_NetClient.cpp \
    1.97 +				$(LIBOVRPATH)/Src/Service/Service_NetSessionCommon.cpp \
    1.98 +				$(LIBOVRPATH)/Src/Tracking/Tracking_SensorStateReader.cpp \
    1.99 +				$(LIBOVRPATH)/Src/Displays/OVR_Display.cpp \
   1.100 +				$(LIBOVRPATH)/Src/Displays/OVR_Linux_Display.cpp \
   1.101 +				$(LIBOVRPATH)/Src/Displays/OVR_Linux_SDKWindow.cpp \
   1.102 +				$(LIBOVRPATH)/Src/CAPI/CAPI_DistortionRenderer.cpp \
   1.103 +				$(LIBOVRPATH)/Src/CAPI/CAPI_HSWDisplay.cpp \
   1.104 +				$(LIBOVRPATH)/Src/CAPI/CAPI_FrameTimeManager.cpp \
   1.105 +				$(LIBOVRPATH)/Src/CAPI/CAPI_HMDRenderState.cpp \
   1.106 +				$(LIBOVRPATH)/Src/CAPI/CAPI_HMDState.cpp \
   1.107 +				$(LIBOVRPATH)/Src/CAPI/CAPI_LatencyStatistics.cpp \
   1.108 +				$(LIBOVRPATH)/Src/CAPI/GL/CAPI_GL_DistortionRenderer.cpp \
   1.109 +				$(LIBOVRPATH)/Src/CAPI/GL/CAPI_GL_HSWDisplay.cpp \
   1.110 +				$(LIBOVRPATH)/Src/CAPI/GL/CAPI_GL_Util.cpp \
   1.111 +				$(LIBOVRPATH)/Src/CAPI/GL/CAPI_GLE.cpp \
   1.112 +				$(LIBOVRPATH)/Src/Kernel/OVR_Alg.cpp \
   1.113 +				$(LIBOVRPATH)/Src/Kernel/OVR_Allocator.cpp \
   1.114 +				$(LIBOVRPATH)/Src/Kernel/OVR_Atomic.cpp \
   1.115 +				$(LIBOVRPATH)/Src/Kernel/OVR_CRC32.cpp \
   1.116 +				$(LIBOVRPATH)/Src/Kernel/OVR_DebugHelp.cpp \
   1.117 +				$(LIBOVRPATH)/Src/Kernel/OVR_File.cpp \
   1.118 +				$(LIBOVRPATH)/Src/Kernel/OVR_FileFILE.cpp \
   1.119 +				$(LIBOVRPATH)/Src/Kernel/OVR_Lockless.cpp \
   1.120 +				$(LIBOVRPATH)/Src/Kernel/OVR_Log.cpp \
   1.121 +				$(LIBOVRPATH)/Src/Kernel/OVR_Math.cpp \
   1.122 +				$(LIBOVRPATH)/Src/Kernel/OVR_RefCount.cpp \
   1.123 +				$(LIBOVRPATH)/Src/Kernel/OVR_SharedMemory.cpp \
   1.124 +				$(LIBOVRPATH)/Src/Kernel/OVR_Std.cpp \
   1.125 +				$(LIBOVRPATH)/Src/Kernel/OVR_String.cpp \
   1.126 +				$(LIBOVRPATH)/Src/Kernel/OVR_String_FormatUtil.cpp \
   1.127 +				$(LIBOVRPATH)/Src/Kernel/OVR_String_PathUtil.cpp \
   1.128 +				$(LIBOVRPATH)/Src/Kernel/OVR_SysFile.cpp \
   1.129 +				$(LIBOVRPATH)/Src/Kernel/OVR_System.cpp \
   1.130 +				$(LIBOVRPATH)/Src/Kernel/OVR_ThreadsPthread.cpp \
   1.131 +				$(LIBOVRPATH)/Src/Kernel/OVR_ThreadCommandQueue.cpp \
   1.132 +				$(LIBOVRPATH)/Src/Kernel/OVR_Timer.cpp \
   1.133 +				$(LIBOVRPATH)/Src/Kernel/OVR_UTF8Util.cpp \
   1.134 +				$(LIBOVRPATH)/Src/Util/Util_Interface.cpp \
   1.135 +				$(LIBOVRPATH)/Src/Util/Util_LatencyTest2Reader.cpp \
   1.136 +				$(LIBOVRPATH)/Src/Util/Util_Render_Stereo.cpp \
   1.137 +				$(LIBOVRPATH)/Src/Util/Util_SystemInfo.cpp \
   1.138 +				$(LIBOVRPATH)/Src/Util/Util_SystemGUI.cpp \
   1.139 +				$(LIBOVRPATH)/Src/OVR_CAPI.cpp \
   1.140 +				$(LIBOVRPATH)/Src/OVR_SerialFormat.cpp \
   1.141 +				$(LIBOVRPATH)/Src/OVR_JSON.cpp \
   1.142 +				$(LIBOVRPATH)/Src/OVR_Profile.cpp \
   1.143 +				$(LIBOVRPATH)/Src/OVR_Stereo.cpp
   1.144 +
   1.145 +LIBOVR_OBJECTS = $(patsubst $(LIBOVRPATH)%.cpp,$(OBJPATH)%.o,$(LIBOVR_SOURCE))
   1.146 +
   1.147 +OBJECTS = $(OTHER_OBJECTS) $(LIBOVR_OBJECTS)
   1.148 +
   1.149 +$(OBJPATH)/%.o: %.cpp
   1.150 +	@mkdir -p $(dir $@)
   1.151 +	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
   1.152 +
   1.153 +$(STATIC_TARGET): $(OBJECTS)
   1.154 +	@mkdir -p $(@D)
   1.155 +	ar rvs $(STATIC_TARGET) $(OBJECTS)
   1.156 +
   1.157 +clean:
   1.158 +	-$(DELETEFILE) $(OBJECTS)
   1.159 +	-$(DELETEFILE) $(STATIC_TARGET)