# $Header: /home/amb/cxref/query/RCS/Makefile 1.4 1996/07/01 19:10:10 amb Exp $
#
# C Cross Referencing & Documentation tool. Version 1.2
#
# Query Program Makefile.
#
# Written by Andrew M. Bishop
#
# This file Copyright 1995,96 Andrew M. Bishop
# It may be distributed under the GNU Public License, version 2, or
# any higher version.  See section COPYING of the GNU Public license
# for conditions under which this file may be redistributed.
#

CC=gcc
CFLAGS=-O2

INCLUDES=

LIB=

COMPILE=$(CC) -c $(CFLAGS)

LINK=$(CC) 

####

OBJ_FILES=query.o \
          input.o output.o \
          ../memory.o ../slist.o

########

cxref-query : $(OBJ_FILES)
	$(LINK) $(OBJ_FILES) -o $@ $(LIB)

########

%.o:%.c
	$(COMPILE) $< -o $@ $(INCLUDES)

query.o   : query.c   query.h ../cxref.h ../datatype.h ../memory.h
input.o   : input.c   query.h ../cxref.h ../datatype.h ../memory.h
output.o  : output.c  query.h ../cxref.h ../datatype.h ../memory.h

../memory.o   : ../memory.c                            ../memory.h
	$(MAKE) -C .. memory.o

../slist.o   : ../slist.c     ../cxref.h ../datatype.h ../memory.h
	$(MAKE) -C .. slist.o

########

clean :
	-rm -f core *.o *~

########
