# --------------------------------------------------------------------------
# Copyright 1992-1994 by Forschungszentrum Informatik (FZI)
# All rights reserved.
#
# You can use and distribute this software under the terms of the license
# you should have received along with this software; either version 1.1 of
# the license, or (at your option) any later version.
# For a copy of the license or for additional information about this software,
# write to Xcc Software, Durlacher Allee 53, D-76131 Karlsruhe, Germany;
# Email: obst@xcc-ka.de.
# --------------------------------------------------------------------------


include ../tut_common.mk

srcdir_rel =.
srcdir_abs =$(TUTPATH)/TextFile

TEXTFILE = $(srcdir_abs) 
UNIXFILE = $(TUTPATH)/UnixFile


include $(TEXTFILE)/TextFile_defs.mk
include $(UNIXFILE)/UnixFile_defs.mk

#-----------------------------------------------
OPT_CCFLAG   =#$(CC_DO_OPT)
PROF_CCFLAG  =#$(CC_DO_PROF)
DEBUG_CCFLAG =$(CC_DO_DEBUG)
INCLUDES     =$(OBST_INCLUDES) -I$(UNIXFILE)
#-----------------------------------------------

all    : UNIX TextFile

depend : 
	mkdefs -rootmacro TEXTFILE -libmacro TEXTFILE . \
	> $(srcdir)/TextFile_defs.mk

clean  :
	rm -f TextFile *.o

realclean : clean
	rm -f *_obst.[Cch] *_use.h *_scp.C
	touch *.obst
#--------------------------------------------------

TEXTOBJS     =  $(TextFile_obst.o) $(TextFile.o) $(UnixFile_obst.o) \
		$(UnixFile.o) $(TextFile_main.o)
TEXTLIBS     =$(libOBST)
TEXTLIBS_dep =$(OBSTLIB)/lib* 
UNIX :
	cd $(UNIXFILE); make

$(TEXTFILE)/TextFile_obst.h $(TEXTFILE)/TextFile_use.h \
$(TEXTFILE)/TextFile_obst.C : $(TEXTFILE)/TextFile.obst
	$(OBST.CMP) TextFile

$(TextFile_obst.o) : $(TextFile_obst.C)
	$(OBST.GEN.CC) TextFile_obst.C

$(TextFile.o) : $(TextFile.C)
	$(OBST.CC) TextFile.C

$(TextFile_main.o) : $(TextFile_main.C)
	$(COMP.CC) TextFile_main.C

TextFile : $(TEXTOBJS) $(TEXTLIBS_dep) 
	$(LINK.CC) $(TEXTOBJS) $(TEXTLIBS) $(LDFLAGS)

