##  $Id: Makefile,v 1.9 2002/03/31 22:42:00 rra Exp $

include ../../Makefile.global

top	= ../..
CFLAGS	= $(GCFLAGS) -I..

ALL	= #tdx-util
SOURCES = tdx-cache.c tdx-data.c tdx-group.c tdx-util.c tradindexed.c
OBJECTS = tdx-cache.o tdx-data.o tdx-group.o tradindexed.o

STORELIBS = $(LIBSTORAGE) $(LIBHIST) $(LIBINN) $(EXTSTORAGELIBS) $(LIBS)

.SUFFIXES: .lo

all: $(ALL) $(OBJECTS)

warnings:
	$(MAKE) COPT='$(WARNINGS)' all

.c.o .c.lo:
	$(LIBCC) $(CFLAGS) -c $*.c -o $@

tdx-util: tdx-util.o $(OBJECTS)
	$(LIBLD) $(LDFLAGS) -o $@ tdx-util.o $(OBJECTS) $(STORELIBS)

clobber clean distclean:
	rm -f *.o *.lo obj/*.o $(ALL)
	rm -rf .libs

tags ctags: $(SOURCES)
	$(CTAGS) $(SOURCES) ../../include/*.h ../*.h

##  Dependencies.  Default list, below, is probably good enough.

depend:	Makefile $(SOURCES)
	$(MAKEDEPEND) $(CFLAGS) $(SOURCES)

# DO NOT DELETE THIS LINE -- make depend depends on it.
tdx-cache.o: tdx-cache.c ../../include/config.h \
 ../../include/inn/defines.h ../../include/clibrary.h \
 ../../include/inn/hashtab.h ../../include/libinn.h \
 ../../include/storage.h tdx-private.h
tdx-data.o: tdx-data.c ../../include/config.h \
 ../../include/inn/defines.h ../../include/clibrary.h \
 ../../include/portable/mmap.h ../../include/inn/history.h \
 ../../include/libinn.h ../../include/ov.h ../../include/storage.h \
 ../ovinterface.h tdx-private.h tdx-structure.h
tdx-group.o: tdx-group.c ../../include/config.h \
 ../../include/inn/defines.h ../../include/clibrary.h \
 ../../include/portable/mmap.h ../../include/inn/hashtab.h \
 ../../include/inn/qio.h ../../include/libinn.h ../../include/paths.h \
 tdx-private.h ../../include/storage.h tdx-structure.h
tdx-util.o: tdx-util.c ../../include/config.h \
 ../../include/inn/defines.h ../../include/clibrary.h \
 ../../include/libinn.h ../../include/ov.h ../../include/storage.h \
 ../../include/inn/history.h tdx-private.h tdx-structure.h
tradindexed.o: tradindexed.c ../../include/config.h \
 ../../include/inn/defines.h ../../include/clibrary.h \
 ../../include/libinn.h ../../include/ov.h ../../include/storage.h \
 ../../include/inn/history.h tdx-private.h tdx-structure.h \
 tradindexed.h
