
#
# Makefile for view subdirectory
#
# This file is part of WebTree
#
# WebTree is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# WebTree is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with WebTree; see the file COPYING.  If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#


SOURCES	= html_main.c html_helper.c lists.c parser.c html_mirror.c
SRCMETA	= 

OBJECTS = html_main.o html_helper.o lists.o parser.o html_mirror.o
OBJMETA	= 

TARGET	= html.o

CC 	= gcc

.SUFFIXES: .c .deps .fl

.c.o: 
	$(CC) -c $(CFLAGS) $(INC_DIRS) $<

all:    $(TARGET)

parser.c: scanner.fl
	flex -i -oparser.c scanner.fl

htest:	htest.c html.o ../http/http.o
	$(CC) -DLINUX -o htest htest.c html.o ../http/http.o

$(TARGET): $(OBJECTS) $(OBJMETA)
	$(AR) -rs $@ $?

.deps: $(SRCMETA) $(SOURCES)
	@makedepend -I$(INC_DIRS) $(SOURCES) $(SRCMETA) -f- >.deps 2>/dev/null


clean:  
	-rm -f core .deps parser.c
	-rm -f *.o *.bak *BAK *~ *% #*
	-rm -f $(SRCMETA) $(TARGET)

$(SRCMETA): m%.cpp : %.h
	$(MOC) $< -o $@

include .deps







