#
#       Makefile for bin
#
#       Copyright (C) 2000 GFD Dennou Club. All rights reserved.
#

include ../Mkinclude

LIBSRCS 	= $(DCLFRT) $(DCLCC)
INSTSRC		= dcldate dclver dclexec dcltrf dclclr dcldbs dclfont \
		  dclpara dcltone repsl


all: $(DCLFRT) $(DCLCC)

$(DCLFRT): dclfrt.org
	@echo "Making shell script $(DCLFRT)"
	@sed -e 's!@LDFLAGS!$(LDFLAGS)!' \
	     -e 's!@LDLIBS!$(LDLIBS)!' \
	     -e 's!@FC!$(FC)!' \
	     -e 's!@FFLAGS!$(FFLAGS)!' dclfrt.org > $(DCLFRT)
	@chmod +x $(DCLFRT)

$(DCLCC): dclcc.org
	@echo "Making shell script $(DCLCC)"
	@sed -e 's!@LDFLAGS!$(LDFLAGS)!' \
	     -e 's!@LDLIBS!$(LDLIBS)!' \
	     -e 's!@CC!$(CC)!' \
	     -e 's!@CFLAGS!$(CFLAGS)!' dclcc.org > $(DCLCC)
	@chmod +x $(DCLCC)

install:
	@-if (test $(BINDIR) != $(DCLDIR)/bin) then \
	$(CP) $(LIBSRCS) $(BINDIR); fi

clean:
	$(RM) *~

clean.all:
	$(RM) *~ $(INSTSRC) $(DCLFRT) $(DCLCC)
