You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mxml/Makefile.in

125 lines
2.0 KiB

21 years ago
#
# "$Id: Makefile.in,v 1.3 2003/06/04 00:25:59 mike Exp $"
21 years ago
#
# 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
@echo Testing library...
@./testmxml test.xml >temp1.xml
@./testmxml temp1.xml >temp2.xml
@if cmp temp1.xml temp2.xml; then \
echo Test passed!; \
rm -f temp1.xml temp2.xml; \
else \
echo Test failed!; \
fi
21 years ago
testmxml.o: mxml.h
$(OBJS): Makefile
21 years ago
#
# End of "$Id: Makefile.in,v 1.3 2003/06/04 00:25:59 mike Exp $".
21 years ago
#