blob: 34f221d04764d975844d70fcc0e9ca5befea9b1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
ARCH=@ARCH@
INCLUDES=-I. -I../../../xbmc/addons/kodi-addon-dev-kit/include/kodi -I../../../xbmc/addons/kodi-addon-dev-kit/include -I../../../xbmc -I../../../xbmc/cores/VideoPlayer/DVDDemuxers
DEFINES+=
CXXFLAGS=-fPIC
LIBNAME=libKODI_guilib
OBJS=$(LIBNAME).o
LIB_INTERFACE=../../../xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h
ifeq ($(findstring osx,$(ARCH)), osx)
LIB_SHARED=../../../addons/library.kodi.guilib/$(LIBNAME)-$(ARCH).dylib
else
LIB_SHARED=../../../addons/library.kodi.guilib/$(LIBNAME)-$(ARCH).so
endif
GENERATED_ADDON_GUILIB = ../../../addons/kodi.guilib/addon.xml
LIB_VERSION := $(shell sed -n 's/.*KODI_GUILIB_API_VERSION\s*"\(.*\)"/\1/p' $(LIB_INTERFACE))
LIB_VERSION_MIN := $(shell sed -n 's/.*KODI_GUILIB_MIN_API_VERSION\s*"\(.*\)"/\1/p' $(LIB_INTERFACE))
all: $(LIB_SHARED) $(GENERATED_ADDON_GUILIB)
$(LIB_SHARED): $(OBJS) $(LIB_INTERFACE)
ifeq ($(findstring osx,$(ARCH)), osx)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -dynamiclib -o $@ $(OBJS)
else
$(CXX) $(CFLAGS) $(LDFLAGS) -shared -g -o $(LIB_SHARED) $(OBJS)
endif
$(GENERATED_ADDON_GUILIB) : $(LIB_INTERFACE)
sed -e s/@guilib_version@/$(LIB_VERSION)/g -e s/@guilib_version_min@/$(LIB_VERSION_MIN)/g $@.in > $@
CLEAN_FILES = \
$(LIB_SHARED) \
DISTCLEAN_FILES= \
Makefile \
include ../../../Makefile.include
|