# Makefile for ifile
# written by Diego Zamboni, Mar 8, 1997
#        and Jason Rennie

CC=gcc
# CFLAGS=-g -DDEBUG -Wall -O2 -pedantic
CFLAGS=-Wall -O2
LOADLIBES=-lm    # puts library options at end of line
#LOADLIBES= -lm -pg    # puts library options at end of line
#LOADLIBES=-L/tmp/ElectricFence-2.0.5 -lefence -lm -pg    # puts library options at end of line
# LDFLAGS=-lm    # puts library options at beginning of line - evil!

all: ifilter irefile

ifilter: ifilter.o assoc_array_int.o ifile.o error.o
	${CC} ifilter.o assoc_array_int.o ifile.o error.o -lm -o ifilter

irefile: irefile.o assoc_array_int.o ifile.o error.o
	${CC} irefile.o assoc_array_int.o ifile.o error.o -lm -o irefile

irefile.queue: irefile.queue.o assoc_array_int.o ifile.o error.o
	${CC} irefile.queue.o assoc_array_int.o ifile.o error.o -lm -o irefile.queue

clean:
	rm -f *.o *~ core a.out ifilter irefile irefile.queue

tar:
	tar cvf ifile_c.tar README CHANGES INSTALL COPYING Makefile assoc_array_int.c assoc_array_int.h extendable_array.h ifile.jpg Ifile.jpg ifilter.c install.perl irefile.c knowledge_base.perl ifile.c ifile.h error.c error.h news2mail.perl irefile.queue.c data_collector; gzip ifile_c.tar

ifilter.o: ifilter.c assoc_array_int.h extendable_array.h ifile.h Makefile
irefile.o: irefile.c assoc_array_int.h extendable_array.h ifile.h Makefile
irefile.queue.o: irefile.queue.c assoc_array_int.h extendable_array.h ifile.h Makefile

ifile.o: ifile.c error.h ifile.h Makefile
error.o: error.c error.h ifile.h Makefile

ifile.h: extendable_array.h Makefile

assoc_array_int.o: assoc_array_int.c assoc_array_int.h Makefile
