Selaa lähdekoodia

Added framework for compiling PSVR driver

TheOnlyJoey 8 vuotta sitten
vanhempi
commit
196e1ad685
5 muutettua tiedostoa jossa 25 lisäystä ja 1 poistoa
  1. 14 1
      configure.ac
  2. 11 0
      src/Makefile.am
  3. 0 0
      src/drv_psvr/packet.c
  4. 0 0
      src/drv_psvr/psvr.c
  5. 0 0
      src/drv_psvr/psvr.h

+ 14 - 1
configure.ac

@@ -49,6 +49,15 @@ AC_ARG_ENABLE([driver-deepoon],
 
 AM_CONDITIONAL([BUILD_DRIVER_DEEPOON], [test "x$driver_deepoon_enabled" != "xno"])
 
+# Sony PSVR Driver
+AC_ARG_ENABLE([driver-psvr],
+        [AS_HELP_STRING([--disable-driver-psvr],
+                [disable building of Sony PSVR driver [default=yes]])],
+        [driver_psvr_enabled=$enableval],
+        [driver_psvr_enabled='yes'])
+
+AM_CONDITIONAL([BUILD_DRIVER_PSVR], [test "x$driver_psvr_enabled" != "xno"])
+
 # External Driver
 AC_ARG_ENABLE([driver-external],
         [AS_HELP_STRING([--disable-driver-external],
@@ -75,6 +84,10 @@ AS_IF([test "x$driver_oculus_rift_enabled" != "xno"],
 AS_IF([test "x$driver_deepoon_enabled" != "xno"],
 	[PKG_CHECK_MODULES([hidapi], [$hidapi] >= 0.0.5)])
 
+# Libs required by Sony PSVR Driver
+AS_IF([test "x$driver_psvr_enabled" != "xno"],
+	[PKG_CHECK_MODULES([hidapi], [$hidapi] >= 0.0.5)])
+
 # Do we build OpenGL example?
 AC_ARG_ENABLE([openglexample],
         [AS_HELP_STRING([--enable-openglexample],
@@ -117,4 +130,4 @@ AC_PROG_CC_C99
 
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile tests/unittests/Makefile examples/Makefile examples/opengl/Makefile examples/simple/Makefile])
-AC_OUTPUT 
+AC_OUTPUT

+ 11 - 0
src/Makefile.am

@@ -36,6 +36,17 @@ libopenhmd_la_LDFLAGS += $(hidapi_LIBS)
 
 endif
 
+if BUILD_DRIVER_PSVR
+
+libopenhmd_la_SOURCES += \
+	drv_psvr/psvr.c \
+	drv_psvr/packet.c
+
+libopenhmd_la_CPPFLAGS += $(hidapi_CFLAGS) -DDRIVER_PSVR
+libopenhmd_la_LDFLAGS += $(hidapi_LIBS)
+
+endif
+
 if BUILD_DRIVER_EXTERNAL
 
 libopenhmd_la_SOURCES += \

+ 0 - 0
src/drv_psvr/packet.c


+ 0 - 0
src/drv_psvr/psvr.c


+ 0 - 0
src/drv_psvr/psvr.h