SHELL=/bin/sh
.SUFFIXES:
.SUFFIXES: .c .o .pl .pm .pod .html .man


CC      = gcc
CPP     = gcc -E 
LEX     = flex
PERL    = /usr/bin/perl
YACC    = bison -y
PERL    = /usr/bin/perl
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
MKDIR = ../mkinstalldirs
STRIP   = strip

RM = rm -f

CFLAGS  = -Wall -g -static
CPPFLAGS= 
LDFLAGS = 
LIBS    = -lnsl -ldl 
DEFS    = 

INCLUDES=

COMPILE = $(CC) -c $(INCLUDES) $(CPPFLAGS) $(DEFS) $(CFLAGS)
LINK    = $(CC) $(LDFLAGS) -o $@

top_srcdir = ..
srcdir     = .


OBJS	   = llist.o spool-remailer.o
TARGETS	   = spool-remailer

all:: $(TARGETS)
	@echo making $@ in `basename \`pwd\``

spool-remailer.o: spool-remailer.c spool-remailer.h llist.o
	$(COMPILE) spool-remailer.c

spool-remailer: spool-remailer.o llist.o llist_error.o
	$(LINK) spool-remailer.o llist.o llist_error.o $(LIBS)

llistmain: llistmain.o llist.o llist_error.o 
	$(LINK) llistmain.o llist.o llist_error.o $(LIBS)
	
llistmain.o: llistmain.c
	$(COMPILE) -c llistmain.c

llist.o: llist.c llist.h
	$(COMPILE) -c llist.c

llist_error.o: llist_error.c llist_error.h llist.h
	$(COMPILE) -c llist_error.c
clean:
	$(RM) $(OBJS)

distclean: clean
	$(RM) core $(TARGETS) 

strip: $(TARGETS)
	$(STRIP) $(TARGETS)

