case $CONFIG in
'')
    if test ! -f config.sh; then
	ln ../config.sh . || \
	ln ../../config.sh . || \
	ln ../../../config.sh . || \
	(echo "Can't find config.sh."; exit 1)
    fi
    . ./config.sh
    ;;
esac
case "$0" in
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
esac

echo "Extracting lib/misc/Makefile (with variable substitutions)"
$cat >Makefile <<!GROK!THIS!
#!$make
# $Id: Makefile.SH,v 1.4 2006/04/09 07:37:36 hurtta Exp $
#
#
#  Makefile for the ELM (ME+) mail program.
#
#  Author: Kari Hurtta <hurtta+elm@posti.FMI.FI> 
#      or  Kari Hurtta <elm@elmme-mailer.org>
#
#
#
AR		=	$ar
CC		=	$cc
CCFLAGS		=	$ccflags $picflag $xencf
CP		=	$cp
RM              =       $rm -f
MV              =       $mv
OPTIMIZE	=	$optimize
RANLIB		=	$ranlib
TOUCH           =       $touch
CHMOD           =       $chmod
REG             =       ../../bin/elmregister 
!GROK!THIS!

if $test "$d_shared" = "$define" ; then
   A=
   if $test "$soname_include_path" = y ; then
	A="$shlib/"
   fi

cat >>Makefile <<SUBSTITUTE
INSTLIB		= \$(ELM_ROOT)//$shlib/libelmme-misc.so$d_shared_rev
SONAME          = ${soname_opt}${A}libelmme-misc.so$d_shared_rev
SOTARG          = ../../shlib/libelmme-misc.so

SUBSTITUTE

else

cat >>Makefile <<'!NO!SUBS!'
INSTLIB         =
SONAME		=
SOTARG          = 
!NO!SUBS!

fi

$cat >>Makefile <<'!NO!SUBS!'
CFLAGS		=	-I$(INCLDIR) $(CCFLAGS) $(OPTIMIZE)
INCLDIR		=	../../hdrs
OBJS            =       init.o terminal.o mediatype.o mime_types.o \
 charset.o

all:	Makefile ../../libs/libelmme-misc.a $(SOTARG)
install_s: all $(INSTLIB)

uninstall_s:
	$(REG) rm $(INSTLIB)

clean: 
	rm -f $(OBJS) ../../shlib/libelmme-misc.so ../../libs/libelmme-misc.a

.PRECIOUS: $(INCLDIR)/defs.h def_misc.h

$(INCLDIR)/defs.h: ../../config.h $(INCLDIR)/sysdefs.h
	$(CHMOD) u+w $@
	$(TOUCH) $@

def_misc.h: $(INCLDIR)/defs.h $(INCLDIR)/elmlib.h \
 $(INCLDIR)/misclib.h $(INCLDIR)/s_me.h

	$(CHMOD) u+w $@
	$(TOUCH) $@

Makefile: Makefile.SH ../../config.sh 
	@echo "You must run 'sh Configure -S' or 'sh Configure'"
	exit 1

lint:		

tags:

init.o:		def_misc.h 
terminal.o:	def_misc.h $(INCLDIR)/cs_imp.h \
 $(INCLDIR)/cs_terminal.h $(INCLDIR)/s_me.h
mediatype.o:	def_misc.h
mime_types.o:	def_misc.h $(INCLDIR)/s_me.h
charset.o:	def_misc.h def_misc.h $(INCLDIR)/cs_imp.h \
 $(INCLDIR)/s_me.h

../../libs/libelmme-misc.a: $(OBJS)
	$(AR) r $@ $?
	$(RANLIB) $@

!NO!SUBS!

if $test "$d_shared" = "$define" ; then

cat >>Makefile <<'!NO!SUBS!'

../../shlib/libelmme-misc.so: $(OBJS)
	$(CC) $(CCFLAGS) $(SONAME) -o $@ $(OBJS) 

$(INSTLIB): ../../shlib/libelmme-misc.so
	$(REG) copy -m 444 $? $@

!NO!SUBS!

else

cat >>Makefile <<'!NO!SUBS!'

!NO!SUBS!

fi



syntax highlighted by Code2HTML, v. 0.9.1