# Makefile for the File-Date-StringUtils library
# Copyright (c) 1999 Michael Weers


.PHONY : all clean doc test deps

all : UnixFile.o UnixDirectoryLister.o DirectoryList.o StringUtils.o Date.o text/format.o

clean :
	rm -f *.o ftest tz-test text/*.o

doc :
	rm doc/*
	/opt/kdoc/bin/kdoc -p -d doc -n File-Date-StringUtils   *.hpp text/format.h
# kdoc 2 (beta) recommended.


test : 
	$(MAKE) all
	$(MAKE) ftest

# implizite Regel fürs Compilieren von C++-Programmen
# 
%.o : %.cpp
	$(CXX) -c -o $@ $(GLOBAL_FLAGS) $(INCLUDE_FLAGS) $(CFLAGS) $(CPPFLAGS) $<

ftest : ftest.o UnixFile.o Date.o StringUtils.o
	$(CXX) -o ftest  $(CPPFLAGS) \
             ftest.o UnixFile.o StringUtils.o Date.o

ftest.o : ftest.cpp UnixFile.hpp File.hpp
	$(CXX) -fno-access-control  -o $@  $< 

UnixFile.o :  UnixFile.cpp UnixFile.hpp File.hpp Date.hpp StringUtils.hpp text/format.h
 
UnixDirectoryLister.o : UnixDirectoryLister.cpp UnixFile.hpp File.hpp

DirectoryList.o: DirectoryList.cpp DirectoryList.hpp \
 UnixFile.hpp File.hpp

StringUtils.o : StringUtils.cpp StringUtils.hpp

Date.o : Date.cpp Date.hpp

text/format.o : text/format.cpp text/format.h

tz-test.o : tz-test.cpp Date.o

tz-test : tz-test.o Date.o
	$(CXX) -o tz-test  tz-test.o Date.o


# --- generic part ---
deps : 
	$(CXX) -MM $(INCLUDE_FLAGS) *.cpp

