# BlinkGTK examples — 配布用 Makefile / Makefile for the bundled examples
#
# 前提 / Requires: blinkgtk-0.1 が pkg-config から見えること。
#   tarball を展開して使う場合 / when using the extracted tarball:
#     export PKG_CONFIG_PATH=<展開先>/usr/lib64/pkgconfig:$PKG_CONFIG_PATH
#   RPM / DEB でインストールした場合は設定不要 / nothing needed for RPM or DEB.
#
# 注意 / Note: PartitionAlloc の allocator shim は blinkgtk-0.1.pc の Libs に
#   含まれます。pkg-config を経由せず -lblinkgtk だけでリンクすると、
#   ページの読み込みが完了しません (画面が白いまま)。
#   The PartitionAlloc allocator shim is in the Libs of blinkgtk-0.1.pc.
#   Linking with just -lblinkgtk instead of going through pkg-config means
#   page loads never complete and the window stays blank.

CC      ?= cc
PKGS     = blinkgtk-0.1
CFLAGS  += -O2 -Wall $(shell pkg-config --cflags $(PKGS))
LDLIBS  += $(shell pkg-config --libs $(PKGS))

PROGS = blinkgtk_browser

all: $(PROGS)

%: %.c
    $(CC) $(CFLAGS) -o $@ $< $(LDLIBS)

clean:
    rm -f $(PROGS)

.PHONY: all clean