include ../../Makefile.site

GOAL   = libripup.a 

OBJS   = UP_util.o UP_extrnl_syntax.o UP_subject.o
SRCS   = UP_util.c UP_extrnl_syntax.c UP_subject.c
HFILES = er_UP_errors.h UP_extrnl_syntax.h UP_subject.h


# directories
srcdir		= .
top_srcdir	= .
INCDIRS         = -I$(srcdir) -I. -I.. $(INCLUDES)
# programs

SHELL           = /bin/sh
#
DEFINES  = -DHAVE_CONFIG_H -DHAVE_STRTOK_R

default: all

# Implicit rules
.c.o:
	$(CC)  -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $<

er_UP_errors.h:		er_UP_errors.m4 
	${M4} er_UP_errors.m4  > er_UP_errors.h


#
# No need to make changes below
#
all: $(GOAL) 

$(GOAL): $(OBJS) 
	ar -r ../../lib/libripup.a $(OBJS) 


clean:
	rm -f *.o *~   $(GOAL)

mostlyclean:
	rm -f *.o *~

# make dependencies
depend:	${SRCS}
	echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
	echo '$$r makedep' >>eddep
	echo 'w' >>eddep
	cp Makefile Makefile.bak
	ed - Makefile < eddep
	rm eddep makedep
	echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
	echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
	echo '# see make depend above' >> Makefile

# DO NOT DELETE THIS LINE
UP_util.o: UP_util.c dbupdate.h \
 ../er/erroutines.h \
 ../er/er_facilities.h ../er/er_ER_errors.h ../ip/er_IP_errors.h \
 ../rx/er_RX_errors.h er_UP_errors.h ../ut/er_UT_errors.h \
 ../wh/er_WH_errors.h ../../include/er_RP_errors.h \
 ../../include/er_QI_errors.h ../../include/er_QC_errors.h \
 ../../include/er_PW_errors.h ../../include/er_SK_errors.h \
 ../../include/er_TH_errors.h ../au/AU_util.h 
# DEPENDENCIES MUST END AT END OF FILE
# IF YOU PUT STUFF HERE IT WILL GO AWAY
# see make depend above
