Permalink
Browse files

buidsystem: add TARGET_ defines similar to the main XBMC build system

  • Loading branch information...
1 parent e6b5247 commit 5886dc2fe1d4a5aaf5f67ca058960821f9013993 @margro margro committed Aug 26, 2012
Showing with 5 additions and 1 deletion.
  1. +1 −1 addons/Makefile.include.am
  2. +4 −0 configure.ac
@@ -4,7 +4,7 @@
INCLUDES = -I. -I$(abs_top_srcdir)/xbmc -I$(abs_top_srcdir)/lib @HOST_INCLUDES@
WARNINGS = -Wall -Wextra -Wno-missing-field-initializers -Woverloaded-virtual -Wno-parentheses
-DEFINES = -D_LINUX -DUSE_DEMUX -D__STDC_CONSTANT_MACROS
+DEFINES = @ARCH_DEFINES@ -DUSE_DEMUX -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
AM_CXXFLAGS = -g -O2 -fPIC $(WARNINGS) $(DEFINES) @HOST_CXXFLAGS@
LIBDIR = @abs_top_srcdir@/addons/$(ADDONNAME)/addon
LIB = @abs_top_srcdir@/addons/$(ADDONNAME)/addon/$(ADDONBINNAME).pvr
View
@@ -28,6 +28,7 @@ OS="unknown"
ARCHITECTURE="unknown"
HOST_INCLUDES=""
HOST_CXXFLAGS=""
+ARCH_DEFINES="-DTARGET_POSIX -DTARGET_LINUX -D_LINUX"
case "${host}" in
arm*-*-linux*)
@@ -59,9 +60,11 @@ case "${host}" in
HOST_INCLUDES="-I/opt/local/include"
HOST_CXXFLAGS="-dynamiclib -single_module -undefined dynamic_lookup"
host_os_osx="yes"
+ ARCH_DEFINES="-DTARGET_POSIX -DTARGET_DARWIN"
;;
*-freebsd*)
OS="freebsd"
+ ARCH_DEFINES="-DTARGET_POSIX -DTARGET_FREEBSD"
;;
esac
@@ -75,6 +78,7 @@ AC_SUBST(BUILD_TYPE)
AC_SUBST(HOST_CXXFLAGS)
AC_SUBST(HOST_INCLUDES)
AC_SUBST(OS)
+AC_SUBST(ARCH_DEFINES)
if test "x$host_os_osx" = "xyes"; then
AM_CONDITIONAL(HOST_IS_OSX, true)

0 comments on commit 5886dc2

Please sign in to comment.