diff options
author | Jasmin Jessich <jasmin@anw.at> | 2017-05-21 00:26:28 +0200 |
---|---|---|
committer | Jasmin Jessich <jasmin@anw.at> | 2017-05-21 00:26:28 +0200 |
commit | c2761cb4a8e93434470c1c6cac15b950413e1add (patch) | |
tree | 70af42a2c569454adacd678d66c0b2ee1a004b0a /pages | |
parent | eba2ad612cc25fcfcd7347f360b5506ba8921835 (diff) | |
download | vdr-plugin-live-c2761cb4a8e93434470c1c6cac15b950413e1add.tar.gz vdr-plugin-live-c2761cb4a8e93434470c1c6cac15b950413e1add.tar.bz2 |
More Makefile adaptations
- Generate dependency files ".*.edep" out of the "*.ecpp" files and include
them in pages/Makefile.
- Allow building of "<subdir>/*.o" from the top makefile as target.
- .gitignore will ignore the new dependency files ".*.edep".
Diffstat (limited to 'pages')
-rw-r--r-- | pages/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pages/Makefile b/pages/Makefile index cfe482c..018f256 100644 --- a/pages/Makefile +++ b/pages/Makefile @@ -18,6 +18,7 @@ OBJS := menu.o recordings.o schedule.o multischedule.o screenshot.o \ recstream.o users.o edit_user.o edit_recording.o osd.o SRCS := $(patsubst %.o,%.cpp,$(OBJS)) ESRCS := $(patsubst %.o,%.ecpp,$(OBJS)) +ESRCS_DEPS := $(patsubst %.o,.%.edep,$(OBJS)) ### The main target: all: libpages.a @@ -30,6 +31,9 @@ all: libpages.a %.cpp: %.ecpp $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CPP) $< +.%.edep: %.ecpp + @$(ECPPC) -M $(ECPPFLAGS) $(ECPPFLAGS_CPP) $< > $@ + ### Dependencies: MAKEDEP := $(CXX) -MM -MG DEPFILE := .dependencies @@ -38,6 +42,7 @@ $(DEPFILE): Makefile $(SRCS) $(ESRCS) ifneq ($(MAKECMDGOALS),clean) -include $(DEPFILE) +-include $(ESRCS_DEPS) endif ### Targets: @@ -45,7 +50,9 @@ libpages.a: $(OBJS) $(AR) r $@ $^ clean: - @rm -f *~ *.o core* libpages.a $(SRCS) $(DEPFILE) + @rm -f *~ *.o core* libpages.a $(SRCS) $(DEPFILE) $(ESRCS_DEPS) dist: clean @echo "Nothing to do for distribution here ..." + +.PRECIOUS: $(SRCS) |