diff options
author | Jasmin Jessich <jasmin@anw.at> | 2017-05-17 01:41:24 +0200 |
---|---|---|
committer | Jasmin Jessich <jasmin@anw.at> | 2017-05-18 21:03:13 +0200 |
commit | d69aef07c4606e66b2b5c6bc4a2a115c43ec58c7 (patch) | |
tree | 35ba1700d3d7ed8e59e3ac2254666cc33eb2610e /pages | |
parent | 9ce0791bee17a904ee41801ebe8ca5518c1e3a7a (diff) | |
download | vdr-plugin-live-d69aef07c4606e66b2b5c6bc4a2a115c43ec58c7.tar.gz vdr-plugin-live-d69aef07c4606e66b2b5c6bc4a2a115c43ec58c7.tar.bz2 |
Makefile enhancements
- Speedup make by use of ":=" instead of "=".
- Build "*.po" files only if a source file has been changed.
- Make some targets PHONY.
- Change subdir handling.
- Build "*.po" and "*.mo" files only if it is required.
- Install "*.mo" files and plugin "*.so" file only if they have been
changed.
Diffstat (limited to 'pages')
-rw-r--r-- | pages/Makefile | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/pages/Makefile b/pages/Makefile index 07fd031..1e56731 100644 --- a/pages/Makefile +++ b/pages/Makefile @@ -1,21 +1,23 @@ ### The official name of this plugin. -PLUGIN = live +PLUGIN := live ### Additional options to silence TNTNET warnings -TNTFLAGS ?= -Wno-overloaded-virtual -Wno-unused-variable +TNTFLAGS ?= -Wno-overloaded-virtual -Wno-unused-variable ### Includes and Defines (add further entries here): INCLUDES += -I$(VDRDIR)/include -I.. ### The object files (add further files here): -OBJS = menu.o recordings.o schedule.o multischedule.o screenshot.o \ - timers.o whats_on.o switch_channel.o keypress.o remote.o \ - channels_widget.o edit_timer.o error.o pageelems.o tooltip.o \ - vlc.o searchtimers.o edit_searchtimer.o searchresults.o \ - searchepg.o login.o ibox.o xmlresponse.o play_recording.o \ - pause_recording.o stop_recording.o ffw_recording.o \ - rwd_recording.o setup.o content.o epginfo.o timerconflicts.o \ - recstream.o users.o edit_user.o edit_recording.o +OBJS := menu.o recordings.o schedule.o multischedule.o screenshot.o \ + timers.o whats_on.o switch_channel.o keypress.o remote.o \ + channels_widget.o edit_timer.o error.o pageelems.o tooltip.o \ + vlc.o searchtimers.o edit_searchtimer.o searchresults.o \ + searchepg.o login.o ibox.o xmlresponse.o play_recording.o \ + pause_recording.o stop_recording.o ffw_recording.o \ + rwd_recording.o setup.o content.o epginfo.o timerconflicts.o \ + recstream.o users.o edit_user.o edit_recording.o +SRCS := $(patsubst %.o,%.cpp,$(OBJS)) +ESRCS := $(patsubst %.o,%.ecpp,$(OBJS)) ### The main target: all: libpages.a @@ -29,10 +31,10 @@ all: libpages.a $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CPP) $< ### Dependencies: -MAKEDEP = $(CXX) -MM -MG -DEPFILE = .dependencies -$(DEPFILE): Makefile $(OBJS:%.o=%.cpp) $(OBJS:%.o=%.ecpp) - @$(MAKEDEP) $(DEFINES) $(PLUGINFEATURES) $(INCLUDES) $(OBJS:%.o=%.cpp) > $@ +MAKEDEP := $(CXX) -MM -MG +DEPFILE := .dependencies +$(DEPFILE): Makefile $(SRCS) $(ESRCS) + @$(MAKEDEP) $(DEFINES) $(PLUGINFEATURES) $(INCLUDES) $(SRCS) > $@ ifneq ($(MAKECMDGOALS),clean) -include $(DEPFILE) @@ -43,7 +45,7 @@ libpages.a: $(OBJS) $(AR) r $@ $^ clean: - @rm -f *~ *.o core* libpages.a $(OBJS:%.o=%.cpp) $(DEPFILE) + @rm -f *~ *.o core* libpages.a $(SRCS) $(DEPFILE) dist: clean @echo "Nothing to do for distribution here ..." |