CXXFLAGS=$(DEBUG) $(OPTIMIZE) $(WARN)
ALL_CXXFLAGS=$(CXXFLAGS) -I$(srcdir) -I$(srcdir)/../include $(INCLUDE) \
 $(DEFINES)
ALL_CFLAGS=$(CFLAGS) $(DEBUG) $(OPTIMIZE) $(INCLUDE) $(DEFINES)
MSGGENFLAGS=
CXXDEPGENFLAGS=-MM
AR=ar
RANLIB=:
M4=m4
GENSRCS=
OBJS=
COBJS=
PROG=
PERL=perl

.SUFFIXES: .cxx .c .o .m4 .msg

.cxx.o:
	$(CXX) $(ALL_CXXFLAGS) -c $<

.c.o:
	$(CC) $(ALL_CFLAGS) -c $<

.m4.cxx:
	rm -f $@
	$(M4) $(srcdir)/../lib/instmac.m4 $< >$@
	chmod -w $@

.msg.h:
	$(PERL) -w $(srcdir)/../msggen.pl $(MSGGENFLAGS) $<

depend_src: depend.temp
	mv depend.temp Makefile.dep

depend.temp: FORCE
	$(CXX) -MM $(ALL_CXXFLAGS) $(CXXDEPGENFLAGS) $(OBJS:.o=.cxx) \
	  | sed -e 's; \([^/ ][^/ ]*\)/; $$(srcdir)/\1/;g' >depend.temp

clean: FORCE
	-rm -f $(CLEANFILES)

FORCE:

%: RCS/%,v
	test -w $@ || co -u $@
