# --------------------------------------------------------------------------
# Copyright 1992 by Forschungszentrum Informatik (FZI)
#
# You can use and distribute this software under the terms of the license
# version 1 you should have received along with this software.
# If not or if you want additional information, write to
# Forschungszentrum Informatik, "OBST Projekt", Haid-und-Neu-Strasse 10-14,
# D-76131 Karlsruhe, Germany.
# --------------------------------------------------------------------------
default: all

include ../tut_common.mk


EXAMPLES=$(SAMPLE)

EX=$(EXAMPLES)/External


# ~~~~~~~~~~~~~~~~~

all: USED_MODULES $(EX)/External

clean:
	rm -f $(EX)/*.o $(EX)/External

realclean: clean
	   rm -f $(EX)/*_obst.[Cch] $(EX)/*_use.h $(EX)/*_scp.C
	   touch $(EX)/*.obst


# ~~~~~~~~~~~~~~~~~
# used modules
# ~~~~~~~~~~~~~~~~~
# External does not use other modules

USED_MODULES:


# ~~~~~~~~~~~~~~~~~~
# module: External
# ~~~~~~~~~~~~~~~~~~

EX_OBJS = $(EX_MODULES) $(EX_MAIN)

EX_MAIN = $(EX)/External_main.o 

EX_MODULES = $(EX)/External.o $(EX)/External_obst.o

ALL_MODULES: USED_MODULES $(EX_MODULES) 


$(EX)/External_obst.h $(EX)/External_use.h $(EX)/External_obst.C: \
	$(EX)/External.obst
	$(OBST.CMP) External

$(EX)/External_obst.o: $(EX)/External_obst.C $(EX)/External_obst.h
	$(OBST.GEN.CC) $(EX)/External_obst.C

$(EX)/External.o: $(EX)/External_obst.h $(EX)/External.C
	$(OBST.CC) $(EX)/External.C

$(EX)/External_main.o: $(EX)/External_use.h $(EX)/External_main.C
	$(COMP.CC) $(EX)/External_main.C

$(EX)/External: ALL_MODULES $(EX_MAIN) $(OBSTLIB)/libOBST*
	$(LINK.CC) $(EX_OBJS) $(libOBST) $(LDFLAGS)
