# $Header: /home/amb/wwwoffle/RCS/Makefile 2.30 1998/05/30 14:27:44 amb Exp amb $
#
# WWWOFFLE - World Wide Web Offline Explorer - Version 2.2.
#
# Test Programs Makefile.
#
# Written by Andrew M. Bishop
#
# This file Copyright 1998 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 -Wall -g

LD=gcc
LDFLAGS=-g

########

INCLUDE=
LIBRARY=

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

LINK=$(LD) $(LDFLAGS)

########

all : test-html test-msg

########

TEST_HTML_OBJ=test-html.o \
	     ../html.o \
	     ../io-noconf.o ../misc-urlonly-noconf.o ../proto-none.o

test-html : $(TEST_HTML_OBJ)
	$(LINK) $(TEST_HTML_OBJ) -o $@ $(LIBRARY)

####

TEST_MSG_OBJ=test-msg.o \
	     ../messages-noconf.o \
	     ../errors-noconf.o ../io-noconf.o

test-msg : $(TEST_MSG_OBJ)
	$(LINK) $(TEST_MSG_OBJ) -o $@ $(LIBRARY)

####

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

test-html.o : test-html.c ../wwwoffle.h ../misc.h
test-msg.o  : test-msg.c  ../wwwoffle.h ../misc.h


####

../messages-noconf.o: ../messages.c ../wwwoffle.h ../misc.h         ../errors.h                   ../version.h
	$(COMPILE) ../messages.c -o $@ $(INCLUDE) -DNO_CONFIG

../misc-urlonly-noconf.o : ../misc.c              ../misc.h                             ../proto.h
	$(COMPILE) ../misc.c -o $@ $(INCLUDE) -DURL_ONLY -DNO_CONFIG

########

clean :
	-rm -f test-html test-msg
	-rm -f core *.o *~
