include ../../make.include
include ../../make.pkgs

CXXFLAGS = $(CXXOPT) -w \
	-I. -I.. -I../widget -I../vector -I../frame -I../fitsy++ -I../list \
	-I../../include -I$(X11INCLUDE) \
	-I../../$(FUNTOOLSDIR)/util \
	-I../../$(ASTDIR)

SRC	= attribute.C \
	grf.C \
	grf3d.C \
	gridbase.C \
	grid2dbase.C \
	grid25dbase.C \
	grid3dbase.C \
	ps.C \
	smooth.C \
	saotk.C \
	util.C

INCLS	= smooth.h \
	util.h

OBJS	= $(SRC:%.C=%.o)

all	: $(OBJS) TAGS

clean	: FORCE
	rm -f core *~ *#

distclean : clean
	rm -f TAGS *.o 

ifdef DEPENDS
TAGS	: $(SS) $(INCLS)
	etags $+
else
TAGS	: FORCE
endif

FORCE	:

ifdef DEPENDS
%.d: %.C
	set -e; $(CXX) -MM $(CXXFLAGS) $< \
	| sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
	[ -s $@ ] || rm -f $@

include $(SRC:.C=.d)
endif
