Skip to content

Commit

Permalink
[depends] add kodi makefile for building with cmake - squash me
Browse files Browse the repository at this point in the history
  • Loading branch information
wsnipex authored and popcornmix committed Sep 23, 2015
1 parent 1b6644b commit df77a09
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions tools/depends/target/xbmc/Makefile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
-include ../../Makefile.include

VERSION.TXT := $(XBMCROOT)/version.txt
APP_NAME=$(shell awk '/APP_NAME/ {print tolower($$2)}' $(VERSION.TXT))

SOURCE=../../../../

export CXXFLAGS+=-O3
export CFLAGS+=-O3

ifeq ($(CROSS_COMPILING),yes)
CONFIG_EXTRA += -DWITH_ARCH=$(HOST) -DWITH_CPU=$(CPU) -DENABLE_INTERNAL_FFMPEG=ON -DENABLE_INTERNAL_CROSSGUID=OFF
endif

ifeq ($(TARGET_PLATFORM),raspberry-pi)
CONFIG_EXTRA += -DENABLE_PULSEAUDIO=OFF -DENABLE_X11=OFF -DENABLE_OPENGL=OFF -DENABLE_VAAPI=OFF -DENABLE_VDPAU=OFF -DENABLE_MMAL=ON
endif

ifeq ($(OS),android)
CONFIGURE += --enable-codec=libstagefright,amcodec --enable-breakpad
endif

ifeq ($(Configuration),Release)
DEBUG = --enable-debug=no
endif

CONFIGURE += $(CONFIG_EXTRA)

all: $(SOURCE)/lib$(APP_NAME).so

release: DEBUG=--enable-debug=no
release: $(SOURCE)/lib$(APP_NAME).so

debug: DEBUG=--enable-debug=yes
debug: $(SOURCE)/lib$(APP_NAME).so

$(SOURCE)/lib$(APP_NAME).so:
# cd $(SOURCE); BOOTSTRAP_FROM_DEPENDS=yes ./bootstrap
mkdir -p $(PLATFORM)
cd $(PLATFORM); $(CMAKE) -DCMAKE_INSTALL_PREFIX=$(PREFIX) $(CONFIG_EXTRA) -DVERBOSE=0 VERBOSE=1 $(XBMCROOT)/project/cmake
cd $(PLATFORM); $(MAKE) -j4

../../Makefile.include:
$(error Please run configure)

clean:
cd $(SOURCE); $(MAKE) clean

distclean:
cd $(SOURCE); $(MAKE) clean

0 comments on commit df77a09

Please sign in to comment.