3 webdvd_lib_dir := $(prefix)/lib/webdvd
6 $(shell pkg-config --variable=prefix mozilla-gtkmozembed)/include/mozilla
8 $(shell pkg-config --variable=prefix mozilla-gtkmozembed)/lib/mozilla
11 $(shell sed 's/\#define MOZILLA_VERSION "\(.*\)"/\1/; t; d' \
12 < $(moz_include_dir)/mozilla-config.h)
13 moz_version_major := $(word 1,$(subst ., ,$(moz_version)))
14 moz_version_minor := $(word 2,$(subst ., ,$(moz_version)))
15 moz_version_patchlevel := $(word 3,$(subst ., ,$(moz_version)))
18 CPPFLAGS := -D_REENTRANT
19 # Non-virtual destructors are fine in XPCOM interface classes since
20 # instances are only ever called by the Release function which is virtual.
21 CXXFLAGS := -Wall -Wno-non-virtual-dtor
22 LDFLAGS := -lpthread $(shell pkg-config --libs gtkmm-2.0 mozilla-gtkmozembed) \
23 -Wl,-rpath -Wl,$(moz_lib_dir)
34 auto_proc.cpp browser_widget.cpp child_iterator.cpp \
35 link_iterator.cpp pixbufs.cpp style_sheets.cpp temp_file.cpp video.cpp \
36 webdvd.cpp x_frame_buffer.cpp xpcom_support.cpp
39 webdvd : $(cxxsources:.cpp=.o) $(csources:.c=.o)
40 $(CXX) $(LDFLAGS) -o $@ $^
43 rm -f webdvd *.d *.o *~ .\#* *.orig *.rej svn-commit*.tmp
49 mkdir -p -m 755 $(prefix)/bin $(prefix)/lib/webdvd
50 install -m 755 -s webdvd $(prefix)/bin
51 install -m 644 webdvd.css $(prefix)/lib/webdvd
53 .PHONY : clean distclean install
55 browser_widget.% : CPPFLAGS += -DMOZ_LIB_DIR='"$(moz_lib_dir)"'
58 : CPPFLAGS += -DWEBDVD_LIB_DIR='"$(webdvd_lib_dir)"' \
59 -DMOZ_VERSION_MAJOR=$(moz_version_major) \
60 -DMOZ_VERSION_MINOR=$(moz_version_minor) \
61 -DMOZ_VERSION_PATCHLEVEL=$(moz_version_patchlevel)
63 browser_widget.% pixbufs.% temp_file.% webdvd.% \
64 : CPPFLAGS += $(shell pkg-config --cflags gtkmm-2.0)
66 browser_widget.% child_iterator.o link_iterator.% style_sheets.% webdvd.% \
68 : CPPFLAGS += $(shell pkg-config --cflags mozilla-gtkmozembed)
70 # These dig a bit deeper into Mozilla
71 link_iterator.% style_sheets.% webdvd.% \
72 : CPPFLAGS += $(addprefix -I$(moz_include_dir)/, \
73 content docshell dom gfx layout necko webshell widget)
76 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -MM -MF $@ $<
79 $(CC) $(CFLAGS) $(CPPFLAGS) -MM -MF $@ $<
81 ifneq ($(MAKECMDGOALS),clean)
82 include $(cxxsources:.cpp=.d) $(csources:.c=.d)