#
# Copyright 2003 John-Mark Gurney.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $Id: Makefile.in,v 1.3 2003/09/15 23:37:19 jmg Exp $
#
SHELL = /bin/sh
LIB = mime
SRCS = ct.c header.c message.c mimemisc.c util.c
OBJS = ct.o header.o message.o mimemisc.o util.o
SOBJS = ct.so header.so message.so mimemisc.so util.so
POBJS = ct.po header.po message.po mimemisc.po util.po
INCS = ct.h mime.h mimemisc.h
TPROG = test
TSRCS = main.c
TOBJS = main.o
DEBUG = -g
#OPT = -O2
PROFILE = -pg
LIBOPTS =
srcdir = @srcdir@
AFLAGS = -Wall -I$(srcdir) $(DEBUG) $(OPT) $(LIBOPTS) $(CFLAGS)
MAJOR = 1
ARNAME = lib$(LIB).a
SONAME = lib$(LIB).so.$(MAJOR)
PANAME = lib$(LIB)_p.a
prefix = @prefix@
exec_prefix = @exec_prefix@
LIBDIR = @libdir@
LIBOWN = 0
LIBGRP = 0
LIBMOD = 0444
INCDIR = @includedir@
INCOWN = 0
INCGRP = 0
INCMOD = 0444
all: $(ARNAME) $(SONAME) $(PANAME)
$(ARNAME): $(OBJS)
$(AR) rc $@ $(OBJS)
$(SONAME): $(SOBJS)
$(CC) -shared -o $@ $(SOBJS)
$(PANAME): $(POBJS)
$(AR) rc $@ $(POBJS)
$(TPROG): $(TOBJS) $(ARNAME)
$(CC) -static $(CFLAGS) -o $@ $(TOBJS) $(ARNAME) $(PROFILE)
deepclean: clean
rm -f Makefile config.cache config.log config.status configure
clean:
rm -f $(ARNAME) $(OBJS) $(SONAME) $(SOBJS) $(PANAME) \
$(POBJS) $(TPROG) $(TOBJS) .depend
install: $(ARNAME) $(SONAME) $(PANAME)
mkdir -p -m 755 $(LIBDIR)
for i in $(ARNAME) $(SONAME) $(PANAME); do \
cp $$i $(LIBDIR); \
chown $(LIBOWN):$(LIBGRP) $(LIBDIR)/$$i; \
chmod $(LIBMOD) $(LIBDIR)/$$i; \
done
mkdir -p -m 755 $(INCDIR)
for i in $(INCS); do \
cp $$i $(INCDIR); \
chown $(INCOWN):$(INCGRP) $(INCDIR)/$$i; \
chmod $(INCMOD) $(INCDIR)/$$i; \
done
depend:
mkdep $(AFLAGS) $(SRCS) $(TSRCS)
$(srcdir)/configure: configure.in
cd $(srcdir) && autoconf
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
.SUFFIXES:
.SUFFIXES: .so .po .c .o
.c.so:
$(CC) -fpic $(AFLAGS) -c $< -o $@
.c.po:
$(CC) $(PROFILE) $(AFLAGS) -c $< -o $@
.c.o:
$(CC) $(CPPFLAGS) $(AFLAGS) -c $< -o $@
.c: $(ARNAME)
$(CC) $(CPPFLAGS) $(AFLAGS) -o $@ $< $(ARNAME)
syntax highlighted by Code2HTML, v. 0.9.1