# Copyright INRIA

LDD = ld -x -o $@ /lib/crt0.o
LDDLF = -lU77 -lm -lcl -lisamstub -lc

bin/scilex: scilex-lib
	@x=1;if [ -f $@ ] ; then \
		x=`find $(MAINSCI) $(DEFAULTS) $(LIBR) \( -name '*.a' -o -name '*.o' \) \
		-newer $@ -print | wc -l `; \
	fi;\
	if [ $$x -ne 0 ] ; then \
		if [ -f $@ ]; then $(RM) $@; fi ;\
		echo "linking";\
		$(LDD)  $(MAINSCI) $(DEFAULTS) $(LIBR) $(LD_LDFLAGS) $(TCLTK_LIBS) \
			$(XLIBS) $(TERMCAPLIB) $(LDDLF);\
	else \
		echo bin/scilex is up to date ;\
	fi


show	:
	@echo 	$(LDD)  $(MAINSCI) $(DEFAULTS) $(LIBR) $(LD_LDFLAGS) $(TCLTK_LIBS) $(XLIBS) $(TERMCAPLIB) $(LDDLF);

