# --------------------------------------------------------------------------
# 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)

UF=$(EXAMPLES)/UnixFile
PS=$(EXAMPLES)/Persistence

INCLUDES=$(OBST_INCLUDES) -I$(UF)


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

all: USED_MODULES $(PS)/Persistence 

clean:
	rm -f $(PS)/Persistence_main.o $(PS)/Persistence

realclean: clean


# ~~~~~~~~~~~~~~~~
# used modules
# ~~~~~~~~~~~~~~~~
# Persistence uses UnixFile

UF_OBJS = $(UF)/UnixFile_obst.o $(UF)/UnixFile.o

USED_MODULES:
	cd $(UF); make ALL_MODULES


# ~~~~~~~~~~~~~~~~~~~
# module: Persistence
# ~~~~~~~~~~~~~~~~~~~

PS_OBJS = $(PS_MODULES) $(PS_MAIN)

PS_MAIN = $(PS)/Persistence_main.o

PS_MODULES = 

ALL_MODULES: USED_MODULES $(PS_MODULES) 


$(PS)/Persistence_main.o: $(UF)/UnixFile_use.h $(PS)/Persistence_main.C
	$(COMP.CC) $(PS)/Persistence_main.C

$(PS)/Persistence: ALL_MODULES $(PS_MAIN) $(OBSTLIB)/libOBST*
	$(LINK.CC) $(PS_OBJS) $(UF_OBJS) $(libOBST)  $(LDFLAGS)
