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

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


include $(UNIXFILE)/UnixFile_defs.mk
include $(DIRECTORY)/Directory_defs.mk

#-----------------------------------------------

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

#-----------------------------------------------

all    : UNIX Directory_A Directory_B  

depend : 
	mkdefs -rootmacro DIRECTORY -libmacro DIRECTORY . \
		> $(srcdir)/Directory_defs.mk

clean  :	
	rm -f Directory_A Directory_B *.o

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

#------------------------------------------------

DIR_A_OBJS     =  $(UnixFile_obst.o) $(UnixFile.o) $(Directory_A_main.o)
DIR_B_OBJS     =  $(UnixFile_obst.o) $(UnixFile.o) $(Directory_B_main.o)
DIRLIBS     =$(libOBST)
DIRLIBS_dep =$(OBSTLIB)/lib*


UNIX : 
	cd $(UNIXFILE); make

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

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

Directory_A : $(DIR_A_OBJS) $(DIRLIBS_dep) 
	$(LINK.CC) $(DIR_A_OBJS) $(DIRLIBS) $(LDFLAGS)

Directory_B: $(DIR_B_OBJS) $(DIRLIBS_dep) 
	$(LINK.CC) $(DIR_B_OBJS) $(DIRLIBS) $(LDFLAGS)

