# $Id: Makefile,v 1.12 1992/11/29 19:11:23 cogito Exp $
# Copyright, 1992, AG-Kastens, University Of Paderborn

# =======================================================
# makefile parameters to be adapted:

# destination directory for installation:

DESTDIR=	../../..

DIR=		Tool/lib/Name

# =======================================================
# sources:

PLAIN_MODULES=	Chain.doc Chain.lido Chain.specs \
		DefPt.c DefPt.head DefPt.pdl \
		DefPt.doc DefPt.h DefPt.lido DefPt.specs \
		Field.c Field.h Field.lido Field.specs \
		Field.head Field.pdl \
		Fwd.doc Fwd.head Fwd.pdl \
		Fwd.lido Fwd.specs \
		Nest.doc Nest.lido Nest.specs \
		NoKeyMsg.doc NoKeyMsg.lido \
		Unique.doc Unique.head Unique.pdl \
		Unique.lido Unique.specs \
		Chain.gnrc DefPt.gnrc Field.gnrc Fwd.gnrc Nest.gnrc \
		NoKeyMsg.gnrc Unique.gnrc

SRC=	Makefile $(PLAIN_MODULES)

INST=	$(PLAIN_MODULES)

TIDY=	core *~ *%
CLEAN=  $(TIDY) 

# =======================================================
# dependencies:

all: $(INST)
	chmod 0755 *.gnrc

# =======================================================
# cleaning:

# clean any files created by make, but not needed to execute this tool:

tidy:
	@rm -rf $(TIDY)

clean:
	@rm -rf $(CLEAN)

# ========================================================
# installation:

install: $(INST)
	@cp $(INST) $(DESTDIR)/$(DIR)
	@cd $(DESTDIR)/$(DIR); chmod 0644 $(INST); chmod 0755 *.gnrc

distrib: $(SRC)
	@cp $(SRC) $(DESTDIR)/$(DIR)
	@cd $(DESTDIR)/$(DIR); chmod 0644 $(SRC)

executable:	tidy
	rm -f Makefile

# ========================================================
# rcs operations for the development diectory (RCS in each subdirectory):

RCSSYS=		/usr/local/gnu/rcs/bin
RCSFLAGS=	-q
RCSCMD=		co

rcs:	RCS
	@echo "$(RCSCMD) in Name"
	@-$(RCSSYS)/$(RCSCMD) $(RCSFLAGS) $(SRC)

comakefile:

RCS:
	@mkdir RCS

