# Main Makefile for Kevins stupid "libsmtp" library
# Copyright (C) 2001 Kevin Read.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU 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.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

include ../../../Rules.make

SHELL = /bin/sh
top_srcdir = ..
srcdir = .


.SUFFIXES:
.SUFFIXES: .c .o

OPT=-g -O

AR_FLAGS = rc

CFLAGS = -I. -I../include -DUSE_MIME -DOPENSSL
CFLAGS += -I../../openssl-0.9.7a/include
CFLAGS += -I../glib/
LDFLAGS = -L. -L../../openssl-0.9.7a
LIBS = -lsmtp -lssl
 
INSTALL = /usr/bin/install -c
prefix = /root/ASoC2200New/firmware/apps/MyLibs/LibSmtp/build
exec_prefix = ${prefix}
bindir = $(exec_prefix)/bin
libdir = $(prefix)/lib
infodir = $(prefix)/info

SOURCES=libsmtp_comm.c libsmtp_connection.c libsmtp_data.c \
        libsmtp_error.c
DOCS=
MISC=configure mkinstalldirs install-sh aclocal.m4
OBJS=
LIB_OBJS=libsmtp_comm.o libsmtp_connection.o libsmtp_data.o libsmtp_error.o
LIB_OBJS+=base64.o digestmd5.o hmac_md5.o md5c.o
LIB_OBJS+=../glib/glist.o
LIB_OBJS+=../glib/gmem.o
LIB_OBJS+=../glib/gmessages.o
LIB_OBJS+=../glib/gmutex.o
LIB_OBJS+=../glib/gnode.o
LIB_OBJS+=../glib/gstrfuncs.o
LIB_OBJS+=../glib/gstring.o
LIB_OBJS+=../glib/gtree.o

LIB_NAME=libsmtp

all: $(LIB_NAME).a

# ??? here I make the bindir, libdir and infodir directories; you
# might not need all of these.  also, I assumed the names PROG and
# libMYPROG.a for the program and library.
install: all
	$(top_srcdir)/mkinstalldirs $(libdir)
	$(INSTALL) libsmtp.a $(libdir)/$(LIB_NAME).a

uninstall:
	/bin/rm -f $(libdir)/$(LIB_NAME).a

$(LIB_NAME).a: $(LIB_OBJS)
	/bin/rm -f $(LIB_NAME).a
	$(AR) $(AR_FLAGS) $(LIB_NAME).a $(LIB_OBJS)
	$(RANLIB) $(LIB_NAME).a

clean:
	/bin/rm -f core *.o $(OBJS) $(LIB_OBJS) $(LIB_NAME).a ../../$(LIB_NAME).a

distclean: clean
	/bin/rm -f Makefile config.h config.status config.cache config.log

mostlyclean: clean

maintainer-clean: clean

# automatic re-running of configure if the ocnfigure.in file has changed
#${srcdir}/configure: configure.in aclocal.m4
#	cd ${srcdir} &#38;&#38; autoconf

# autoheader might not change config.h.in, so touch a stamp file
#${srcdir}/config.h.in: stamp-h.in
#${srcdir}/stamp-h.in: configure.in aclocal.m4
#		cd ${srcdir} &#38;&#38; autoheader
#		echo timestamp &#62; ${srcdir}/stamp-h.in

#config.h: stamp-h
#stamp-h: config.h.in config.status
#	./config.status
#Makefile: Makefile.in config.status
#	./config.status
#config.status: configure
#	./config.status --recheck
