subdirs=backend
targets=bookmark,helper,htmlapp
cppflags_force=-I ../src
#cppflags=-D EMBEDDED
cflags_force=`pkg-config --cflags libDesktop`
cflags=-W -Wall -g -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
ldflags_force=`pkg-config --libs libDesktop`
ldflags=-pie -Wl,-z,relro -Wl,-z,now
dist=Makefile,helper.h,subst.sh

[bookmark]
type=binary
sources=bookmark.c

[bookmark.c]
depends=../config.h

[helper]
type=binary
#GtkMozEmbed
#cflags=`pkg-config --libs mozilla-gtkmozembed`
#ldflags=`pkg-config --libs mozilla-gtkmozembed`
#libgtkhtml2
#cflags=`pkg-config --cflags libgtkhtml-2.0 gnet-2.0`
#ldflags=`pkg-config --libs libgtkhtml-2.0 gnet-2.0`
#libParser
#cflags=`pkg-config --cflags libParser gnet-2.0`
#ldflags=`pkg-config --libs libParser gnet-2.0`
#WebKit/Gtk+ 2
#cflags=`pkg-config --cflags webkit-1.0`
#ldflags=`pkg-config --libs webkit-1.0`
#WebKit/Gtk+ 3
cflags=`pkg-config --cflags webkitgtk-3.0`
ldflags=`pkg-config --libs webkitgtk-3.0`
sources=ghtml-helper.c,helper.c,helper-main.c
install=$(BINDIR)

[ghtml-helper.c]
#cppflags=-D WITH_GTKMOZEMBED
#cppflags=-D WITH_GTKHTML
#cppflags=-D WITH_GTKTEXTVIEW
cppflags=-D WITH_WEBKIT
depends=../src/ghtml.h,../src/ghtml.c

[helper.c]
#cppflags=-D WITH_GTKMOZEMBED
#cppflags=-D WITH_GTKHTML
#cppflags=-D WITH_GTKTEXTVIEW
cppflags=-D WITH_WEBKIT
depends=../src/common/find.c,../src/surfer.h,../config.h,backend/contents.c,backend/gtkdoc.c,backend/manual.c,backend/search.c,helper.h

[helper-main.c]
depends=helper.h

[htmlapp]
type=binary
#GtkMozEmbed
#cflags=`pkg-config --libs mozilla-gtkmozembed`
#ldflags=`pkg-config --libs mozilla-gtkmozembed` $(OBJDIR)ghtml-helper.o
#libgtkhtml2
#cflags=`pkg-config --cflags libgtkhtml-2.0 gnet-2.0`
#ldflags=`pkg-config --libs libgtkhtml-2.0 gnet-2.0` $(OBJDIR)ghtml-helper.o
#libParser
#cflags=`pkg-config --cflags libParser gnet-2.0`
#ldflags=`pkg-config --libs libParser gnet-2.0` $(OBJDIR)ghtml-helper.o
#WebKit/Gtk+ 2
#cflags=`pkg-config --cflags webkit-1.0`
#ldflags=`pkg-config --libs webkit-1.0` $(OBJDIR)ghtml-helper.o
#WebKit/Gtk+ 3
cflags=`pkg-config --cflags webkitgtk-3.0`
ldflags=`pkg-config --libs webkitgtk-3.0` $(OBJDIR)ghtml-helper.o
depends=$(OBJDIR)ghtml-helper.o
sources=htmlapp.c
install=$(BINDIR)

[htmlapp.c]
#cppflags=-D WITH_GTKMOZEMBED
#cppflags=-D WITH_GTKHTML
#cppflags=-D WITH_GTKTEXTVIEW
cppflags=-D WITH_WEBKIT
depends=../src/common/find.c,../src/surfer.h,../config.h
