summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2015-04-06 15:34:08 +0200
committerlouis <louis.braun@gmx.de>2015-04-06 15:34:08 +0200
commitfe10143fd8e13cc27579dc9afc3f1fee93cd3c64 (patch)
tree27f0c6a487e5d87d3f31efb4108b49f0a046e85f /Makefile
parentd70bfe70913602de016e14d17d4ac485a8683cf5 (diff)
downloadvdr-plugin-skindesigner-fe10143fd8e13cc27579dc9afc3f1fee93cd3c64.tar.gz
vdr-plugin-skindesigner-fe10143fd8e13cc27579dc9afc3f1fee93cd3c64.tar.bz2
changed build and install process
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 25 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index f7cec16..d7db2cb 100644
--- a/Makefile
+++ b/Makefile
@@ -54,10 +54,6 @@ LIBS += $(shell pkg-config --libs librsvg-2.0 cairo-png) -ljpeg
LIBS += $(shell xml2-config --libs)
-INCLUDES += $(shell pkg-config --cflags libskindesignerapi)
-LIBS += $(shell pkg-config --libs libskindesignerapi)
-DEFINES += -DLIBSKINDESIGNERAPIVERSION='"$(shell pkg-config --modversion libskindesignerapi)"'
-
### The object files:
OBJS = $(PLUGIN).o \
config.o \
@@ -113,12 +109,32 @@ OBJS = $(PLUGIN).o \
### The main target:
-all: $(SOFILE) i18n
+all: subprojects $(SOFILE) i18n
+
+### subprojects:
+
+.PHONY: libskindesignerapi subprojects
+
+libskindesignerapi:
+ $(MAKE) -C libskindesignerapi
+
+subprojects: libskindesignerapi
+
+install-subprojects:
+ $(MAKE) -C libskindesignerapi install
+
+clean-subprojects:
+ $(MAKE) -C libskindesignerapi clean
+
+### get version of subprojects in specific targets when subprojects have been built
+
+%.o: SUB_DEFINES = -DLIBSKINDESIGNERAPIVERSION='"$(shell pkg-config --modversion libskindesignerapi/libskindesignerapi.pc)"'
+$(SOFILE): SUB_LIBS = libskindesignerapi/libskindesignerapi.so.$(shell pkg-config --modversion libskindesignerapi/libskindesignerapi.pc)
### Implicit rules:
%.o: %.c
- $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
+ $(CXX) $(CXXFLAGS) -c $(DEFINES) $(SUB_DEFINES) $(INCLUDES) -o $@ $<
### Dependencies:
@@ -158,7 +174,7 @@ install-i18n: $(I18Nmsgs)
### Targets:
$(SOFILE): $(OBJS)
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LIBS) -o $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LIBS) $(SUB_LIBS) -o $@
install-lib: $(SOFILE)
install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
@@ -177,7 +193,7 @@ install-scripts:
mkdir -p $(DESTDIR)$(SKINDESIGNER_SCRIPTDIR)
cp -r scripts/* $(DESTDIR)$(SKINDESIGNER_SCRIPTDIR)
-install: install-lib install-i18n install-themes install-skins install-scripts
+install: install-subprojects install-lib install-i18n install-themes install-skins install-scripts
dist: $(I18Npo) clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@@ -187,6 +203,6 @@ dist: $(I18Npo) clean
@-rm -rf $(TMPDIR)/$(ARCHIVE)
@echo Distribution package created as $(PACKAGE).tgz
-clean:
+clean: clean-subprojects
@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~