4 $(shell pkg-config --variable=prefix mozilla-gtkmozembed)/include/mozilla
6 $(shell pkg-config --variable=prefix mozilla-gtkmozembed)/lib/mozilla
9 CPPFLAGS := -D_REENTRANT
11 LDFLAGS := -lpthread $(shell pkg-config --libs gtkmm-2.0 mozilla-gtkmozembed) \
12 -Wl,-rpath -Wl,$(moz_lib_dir)
23 auto_proc.cpp browserwidget.cpp childiterator.cpp framebuffer.cpp \
24 linkiterator.cpp pixbufs.cpp stylesheets.cpp webdvd.cpp xpcom_support.cpp
27 webdvd : $(cxxsources:.cpp=.o) $(csources:.c=.o)
28 $(CXX) $(LDFLAGS) -o $@ $^
31 rm -f webdvd *.d *.o *~ .\#* *.orig *.rej svn-commit*.tmp *.dvdauthor *.png *.vob *.spumux
37 mkdir -p -m 755 $(prefix)/bin $(prefix)/lib/webdvd
38 install -m 755 -s webdvd $(prefix)/bin
39 install -m 644 webdvd.css $(prefix)/lib/webdvd
41 .PHONY : clean distclean install
43 browserwidget.% : CPPFLAGS += -DMOZ_LIB_DIR='"$(moz_lib_dir)"'
46 : CPPFLAGS += -DWEBDVD_LIB_DIR='"$(prefix)/lib/webdvd"'
48 browserwidget.% pixbufs.% webdvd.% \
49 : CPPFLAGS += $(shell pkg-config --cflags gtkmm-2.0)
51 browserwidget.% childiterator.o linkiterator.% stylesheets.% webdvd.% \
53 : CPPFLAGS += $(shell pkg-config --cflags mozilla-gtkmozembed)
55 # These dig a bit deeper into Mozilla
56 linkiterator.% stylesheets.% webdvd.% \
57 : CPPFLAGS += $(addprefix -I$(moz_include_dir)/, \
58 content docshell dom gfx layout necko webshell widget)
61 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -MM -MF $@ $<
64 $(CC) $(CFLAGS) $(CPPFLAGS) -MM -MF $@ $<
66 ifneq ($(MAKECMDGOALS),clean)
67 include $(cxxsources:.cpp=.d) $(csources:.c=.d)
70 # Temporary rule for testing output files.
72 %.vob : %_back.png %.spumux %_links.png
73 pngtopnm $*_back.png \
74 | ppmtoy4m -v0 -n 1 -F 25:1 -A 59:54 -I p -S 420_mpeg2 \
75 | mpeg2enc -v0 -f 8 -a 2 -o /dev/stdout \
76 | mplex -v0 -f 8 -o /dev/stdout /dev/stdin \
77 | spumux -v0 -m dvd $*.spumux > $@