mxml/Makefile.in

124 lines
2.0 KiB
Makefile
Raw Normal View History

2003-06-03 19:46:29 +00:00
#
2003-06-04 00:12:12 +00:00
# "$Id: Makefile.in,v 1.2 2003/06/04 00:12:12 mike Exp $"
2003-06-03 19:46:29 +00:00
#
# Makefile for mini-XML, a small XML-like file parsing library.
#
# Copyright 2003 by Michael Sweet.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2, or (at your option) any later version.
#
# This program 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.
#
#
# Compiler tools definitions...
#
AR = @AR@
ARFLAGS = @ARFLAGS@
CC = @CC@
CFLAGS = @CFLAGS@ @CPPFLAGS@
LDFLAGS = @LDFLAGS@
RANLIB = @RANLIB@
SHELL = /bin/sh
#
# Configured directories...
#
prefix = @prefix@
exec_prefix = @exec_prefix@
includedir = @includedir@
libdir = @libdir@
#
# Rules...
#
.SUFFIXES: .c .o
.c.o:
$(CC) $(CFLAGS) -c $<
#
# Targets...
#
LIBOBJS = mxml-attr.o mxml-file.o mxml-node.o mxml-search.o
OBJS = testmxml.o $(LIBOBJS)
TARGETS = libmxml.a testmxml
#
# Make everything...
#
all: $(TARGETS)
#
# Clean everything...
#
clean:
rm -f $(OBJS) $(TARGETS)
rm -f *.bck *.bak
rm -f config.cache config.log config.status
rm -rf autom4te*.cache
#
# Install everything...
#
install: $(TARGETS)
-mkdir -p $(libdir)
cp libmxml.a $(libdir)
-mkdir -p $(includedir)
cp mxml.h $(includedir)
#
# libmxml.a
#
libmxml.a: $(LIBOBJS)
rm -f $@
$(AR) $(ARFLAGS) $@ $(LIBOBJS)
$(RANLIB) $@
$(LIBOBJS): mxml.h
#
# testmxml
#
testmxml: libmxml.a testmxml.o
$(CC) $(LDFLAGS) -o $@ testmxml.o libmxml.a
2003-06-04 00:12:12 +00:00
@echo Testing library...
@./testmxml test.xml >temp1.xml
@./testmxml temp1.xml >temp2.xml
@if cmp temp1.xml temp2.xml; then \
echo Test passed!; \
else \
echo Test failed!; \
fi
2003-06-03 19:46:29 +00:00
testmxml.o: mxml.h
2003-06-04 00:12:12 +00:00
$(OBJS): Makefile
2003-06-03 19:46:29 +00:00
#
2003-06-04 00:12:12 +00:00
# End of "$Id: Makefile.in,v 1.2 2003/06/04 00:12:12 mike Exp $".
2003-06-03 19:46:29 +00:00
#