#
# COPYRIGHT INFORMATION - DO NOT REMOVE
# "Portions Copyright (c) 2000-2001 LinuxMagic Inc. All Rights Reserved.
#
# This file contains Original Code and/or Modifications of Original Code as
# defined in and that are subject to the Free Source Code License Version
# 1.0 (the 'License'). You may not use this file except in compliance with
# the License. Please obtain a copy of the License at:
#
# http://www.linuxmagic.com/opensource/licensing/FSCL.txt
#
# and read it before using this file.
#
# The Original Code and all software distributed under the License are
# distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
# EXPRESS OR IMPLIED, AND LINUXMAGIC HEREBY DISCLAIMS ALL SUCH WARRANTIES,
# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see
# the License for the specific language governing rights and limitations
# under the License."
#
# Please read the terms of this license carefully. By using or downloading
# this software or file, you are accepting and agreeing to the terms of this
# license with LinuxMagic Inc. If you are agreeing to this license on behalf
# of a company, you represent that you are authorized to bind the company to
# such a license. If you do not meet this criterion or you do not agree to
# any of the terms of this license, do NOT download, distribute, use or alter
# this software or file in any way.
#
# Author: Josh Wilsdon (josh@wizard.ca)
# CVS Id: $Id: Makefile,v 1.8 2003/10/29 17:56:55 josh Exp $
#
# DO NOT MODIFY WITHOUT CONSULTING THE LICENSE
#

CC=gcc
CFLAGS=-Wall -W -O2

all: spam_rules.inc clean_rules.o load_rules.o load_controls.o read_rules.o stopwatch.o spam_log.o

spam_rules.inc: spam_rules
	./parse_spam_rules.pl > spam_rules.inc

control_files.inc: control_files
	./parse_control_files.pl > control_files.inc

clean_rules.o: clean_rules.c
	$(CC) $(CFLAGS) -c -o clean_rules.o clean_rules.c

load_rules.o: load_rules.c
	$(CC) $(CFLAGS) -c -o load_rules.o load_rules.c

load_controls.o: control_files.inc
	$(CC) $(CFLAGS) -c -o load_controls.o load_controls.c

read_rules.o: read_rules.c
	$(CC) $(CFLAGS) -c -o read_rules.o read_rules.c

stopwatch.o: stopwatch.c
	$(CC) $(CFLAGS) -c -o stopwatch.o stopwatch.c

spam_log.o: spam_log.c
	$(CC) $(CFLAGS) -c -o spam_log.o spam_log.c

clean:
	@rm -vf *.o spam_rules.inc control_files.inc
