
# List of sources
SRCS = simple_html.c simple_html2.c autosize_html.c forced_html.c html.c \
	html_browser.c

# List of object files
OBJS = simple_html.o simple_html2.o autosize_html.o forced_html.o html.o \
	html_browser.o

# Targets to make
EXAMPLES=simple_html simple_html2 autosize_html forced_html html html_browser

# The library
XMHTMLINC= -I../lib
XMHTMLLIB= -L../lib -lXmHTML
LINKLIBS = $(XMHTMLLIB) $(LOADLIBES) $(DMALLOCLIB)

# rule to create .o files from .c files 
.c.o:
	$(RM) $@
	$(CC) $(CFLAGS) $(CPPFLAGS) $(XMHTMLINC) $(INCLUDES) -c $<

all: $(EXAMPLES)

# targets to build

simple_html::  ../src/libXmHTML.a simple_html.o
	$(RM) $@ \ 
	$(CC) -o $@ $(LDFLAGS) simple_html.o $(LINKLIBS)

simple_html2::  ../src/libXmHTML.a simple_html2.o
	$(RM) $@ \ 
	$(CC) -o $@ $(LDFLAGS) simple_html2.o $(LINKLIBS)

autosize_html::  ../src/libXmHTML.a autosize_html.o
	$(RM) $@ \ 
	$(CC) -o $@ $(LDFLAGS) autosize_html.o $(LINKLIBS)

forced_html::  ../src/libXmHTML.a forced_html.o
	$(RM) $@ \ 
	$(CC) -o $@ $(LDFLAGS) forced_html.o $(LINKLIBS)

html::  ../src/libXmHTML.a html.o
	$(RM) $@ \ 
	$(CC) -o $@ $(LDFLAGS) html.o $(LINKLIBS)

html_browser::  ../src/libXmHTML.a html_browser.o
	$(RM) $@ \ 
	$(CC) -o $@ $(LDFLAGS) html_browser.o $(LINKLIBS)

.PHONY: ../src/libXmHTML.a 

depend:: $(SRCS) 
	$(MAKEDEPEND) $(XMHTMLINC) $(INCLUDES) $(CPPFLAGS) $(SRCS)

.PHONY: stamp-includes

includes:: stamp-includes

clean::
	$(RM) $(OBJS)  
	$(RM) $(EXAMPLES)

distclean:: clean 
	$(RM) core *.out *.log make.world *.bak *.last *.auto *.rej *.orig
	$(CP) Makefile.org Makefile

#--------------------------------------------------------------------------
# don't delete anything below this line, makedepend depends on it
#--------------------------------------------------------------------------
