diff options
| author | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2008-01-17 00:22:44 +0100 |
|---|---|---|
| committer | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2008-01-17 00:22:44 +0100 |
| commit | 07d1116c3de24a3a049c3d36ae8ec9704e0055c4 (patch) | |
| tree | 797713ddc4ee9024be2cea2263c12f88098c57a6 /Makefile | |
| parent | 53920ac400a4a062eb90bb1656140e03e19ecd3d (diff) | |
| parent | 880ee6e7feb33daeb94c6a1195c8eb4202a570b0 (diff) | |
| download | vdr-plugin-live-07d1116c3de24a3a049c3d36ae8ec9704e0055c4.tar.gz vdr-plugin-live-07d1116c3de24a3a049c3d36ae8ec9704e0055c4.tar.bz2 | |
Merge branch 'devel'
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 34 |
1 files changed, 20 insertions, 14 deletions
@@ -14,7 +14,6 @@ PLUGIN = live ### The version number of this plugin (taken from the main source file): VERSION = $(shell grep '\#define LIVEVERSION ' setup.h | awk '{ print $$3 }' | sed -e 's/[";]//g') -VERSINFO= $(shell ./buildutil/version-util) ### The C++ compiler and options: @@ -58,7 +57,7 @@ ifneq ($(TNTVERS7),yes) LIBS += httpd/libhttpd.a endif -DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DVERSION_SUFFIX='"$(VERSINFO)"' +DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' ifeq ($(TNTVERS7),yes) DEFINES += -DTNTVERS7 endif @@ -69,6 +68,8 @@ ifneq ($(TNTVERS7),yes) SUBDIRS += httpd endif +VERSIONSUFFIX = gen_version_suffix.h + ### The object files (add further files here): PLUGINOBJS = $(PLUGIN).o thread.o tntconfig.o setup.o i18n.o timers.o \ @@ -79,10 +80,10 @@ WEBLIBS = pages/libpages.a css/libcss.a javascript/libjavascript.a ### Default rules: -.PHONY: all dist clean SUBDIRS - all: libvdr-$(PLUGIN).so $(I18NTARG) +.PHONY: all dist clean subdirs $(SUBDIRS) PAGES + ### Implicit rules: %.o: %.cpp @@ -95,7 +96,9 @@ DEPFILE = .dependencies $(DEPFILE): Makefile @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(PLUGINOBJS:%.o=%.cpp) > $@ +ifneq ($(MAKECMDGOALS),clean) -include $(DEPFILE) +endif ### Internationalization (I18N): @@ -131,15 +134,18 @@ generate-i18n: i18n-template.h $(I18Npot) $(I18Npo) buildutil/pot2i18n.pl ### Targets: -SUBDIRS: - @for dir in $(SUBDIRS); do \ - make -C $$dir CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" || exit 1; \ - done +subdirs: $(SUBDIRS) + +$(SUBDIRS): + $(MAKE) -C $@ CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" $(MAKECMDGOALS) PAGES: - make -C pages CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" .dependencies || exit 1; + $(MAKE) -C pages CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" .dependencies + +$(VERSIONSUFFIX): FORCE + ./buildutil/version-util $(VERSIONSUFFIX) -libvdr-$(PLUGIN).so: SUBDIRS $(PLUGINOBJS) +libvdr-$(PLUGIN).so: $(VERSIONSUFFIX) $(SUBDIRS) $(PLUGINOBJS) $(CXX) $(LDFLAGS) -shared -o $@ $(PLUGINOBJS) -Wl,--whole-archive $(WEBLIBS) -Wl,--no-whole-archive $(LIBS) @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ifneq ($(TNTVERS7),yes) @@ -173,11 +179,11 @@ dist: clean @-rm -rf $(TMPDIR)/$(ARCHIVE) @echo Distribution package created as $(PACKAGE).tgz -clean: +clean: $(SUBDIRS) @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot @-rm -f $(PLUGINOBJS) $(DEPFILE) *.so *.tgz core* *~ - @for dir in $(SUBDIRS); do \ - make -C $$dir clean ; \ - done + @-rm -f $(VERSIONSUFFIX) .PRECIOUS: $(I18Npo) + +FORCE: |
