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 CPPFLAGS := -D_REENTRANT
12 # Non-virtual destructors are fine in XPCOM interface classes since
13 # instances are only ever called by the Release function which is virtual.
14 CXXFLAGS := -Wall -Wno-non-virtual-dtor
15 LDFLAGS := -lpthread $(shell pkg-config --libs gtkmm-2.0 mozilla-gtkmozembed) \
16 -Wl,-rpath -Wl,$(moz_lib_dir)
27 auto_proc.cpp browserwidget.cpp childiterator.cpp framebuffer.cpp \
28 linkiterator.cpp pixbufs.cpp stylesheets.cpp temp_file.cpp video.cpp \
29 webdvd.cpp xpcom_support.cpp
32 webdvd : $(cxxsources:.cpp=.o) $(csources:.c=.o)
33 $(CXX) $(LDFLAGS) -o $@ $^
36 rm -f webdvd *.d *.o *~ .\#* *.orig *.rej svn-commit*.tmp
42 mkdir -p -m 755 $(prefix)/bin $(prefix)/lib/webdvd
43 install -m 755 -s webdvd $(prefix)/bin
44 install -m 644 webdvd.css $(prefix)/lib/webdvd
46 .PHONY : clean distclean install
48 browserwidget.% : CPPFLAGS += -DMOZ_LIB_DIR='"$(moz_lib_dir)"'
50 webdvd.% : CPPFLAGS += -DWEBDVD_LIB_DIR='"$(webdvd_lib_dir)"'
52 browserwidget.% pixbufs.% temp_file.% webdvd.% \
53 : CPPFLAGS += $(shell pkg-config --cflags gtkmm-2.0)
55 browserwidget.% childiterator.o linkiterator.% stylesheets.% webdvd.% \
57 : CPPFLAGS += $(shell pkg-config --cflags mozilla-gtkmozembed)
59 # These dig a bit deeper into Mozilla
60 linkiterator.% stylesheets.% webdvd.% \
61 : CPPFLAGS += $(addprefix -I$(moz_include_dir)/, \
62 content docshell dom gfx layout necko webshell widget)
65 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -MM -MF $@ $<
68 $(CC) $(CFLAGS) $(CPPFLAGS) -MM -MF $@ $<
70 ifneq ($(MAKECMDGOALS),clean)
71 include $(cxxsources:.cpp=.d) $(csources:.c=.d)