
include			../../Makefile.top

XPROGRAMS		= selftest keyremap
XTARGETS		= xselftest xkeyremap
selftest-TARGET		= $(molbin)/selftest
keyremap-TARGET		= $(molbin)/keyremap
xselftest-OBJS		= performance.o selftest.o vsprintf.o
xkeyremap-OBJS		= keyremap.o vsprintf.o

$(ODIR)/selftest: $(ODIR)/init.o $(ODIR)/libxselftest.a
	$(LD) -Ttext=0x101000 -Bstatic $^ -o $@
	@$(STRIP) -s $@

$(ODIR)/keyremap: $(ODIR)/init.o $(ODIR)/libxkeyremap.a
	$(LD) -Ttext=0x101000 -Bstatic $^ -o $@
	$(STRIP) $@

all-local:
	@test -d $(molbin) || $(INSTALL) -d $(molbin)
	@ln -f $(ODIR)/keyremap $(ODIR)/selftest $(molbin)/

clean-local:
	@$(RM) $(ODIR)/keyremap $(ODIR)/selftest

include			$(top_srcdir)/Rules.make
