# Makefile.
# $Id$

# Define i/o files.
OBJS     = lychee.o cls_config.o cls_filedroptarget.o cls_listctrl.o dlg_make.o dlg_process.o frm_main.o functions.o TPIHandle.o
OUT_EXE  = ../../bin/lychee
DIR_OBJ  = ../tmp
DIR_SHR  = ../../share
DIR_XRC  = $(DIR_SHR)/xrc
DIR_LOC  = $(DIR_SHR)/locale
XRCS     = frm_main.xrc dlg_make.xrc dlg_overwrite.xrc dlg_process.xrc
POT      = lychee.pot
IN_ADD   = $(DIR_LOC)/$(POT) $(addprefix $(DIR_XRC)/,$(XRCS))

include ../common/Makefile.default

$(DIR_XRC)/%.xrc: ui/%.fbp
	wxformbuilder -g $<
	touch $@

$(DIR_LOC)/$(POT): $(addprefix $(DIR_XRC)/,$(XRCS)) *.cpp
	wxrc --gettext $(addprefix $(DIR_XRC)/,$(XRCS)) | xgettext -C -k"_" --from-code=utf-8 -D ./ -o $@ *.cpp -
