###########################################################

SLIBDEPS = $(DIG_ATTLIB) $(GISLIB)
# VECTLIB_REAL is a cyclic dependency
# SLIBDEPS = $(DIG_ATTLIB) $(VECTLIB_REAL) $(GISLIB)

#    set_head.o 

OBJ = \
    allocation.o  \
    attribute.o \
    area.o \
    bound_box.o  \
    calc_angl.o  \
    check_node.o  \
    chk_inside.o \
    clock.o \
    cont_lines.o \
    debugf.o \
    file_checks.o \
    find_area.o \
    format.o \
    isle.o \
    linecros.o \
    line_dist.o \
    load_plus.o \
    map_to_head.o  \
    memory_io.o \
    node_op.o  \
    old2new.o \
    point_t_line.o \
    point_t_area.o \
    prune.o  \
    rw_ascii.o  \
    struct_alloc.o  \
    struct_copy.o \
    unit_conv.o \
    write_file.o \
    \
    portable.o \
    portable2.o \
    x_struct_io.o 


CFILES = \
    allocation.c  \
    attribute.c \
    area.c \
    bound_box.c  \
    calc_angl.c  \
    check_node.c  \
    chk_inside.c \
    clock.c \
    cont_lines.c \
    debugf.c \
    file_checks.c \
    find_area.c \
    linecros.c \
    line_dist.c \
    load_plus.c \
    map_to_head.c  \
    memory_io.c \
    node_op.c  \
    old2new.c \
    point_t_line.c \
    point_t_area.c \
    prune.c  \
    rw_ascii.c  \
    struct_alloc.c  \
    struct_copy.c \
    unit_conv.c \
    write_file.c \
    format.c \
    isle.c \
    portable.c \
    portable2.c \
    x_rw_binary.c \
    x_point_io.c \
    x_struct_io.c 


$(DEPDIG2LIB): $(OBJ)
	$(SLIBRULE)

EXTRA_CFLAGS    = $(VECTLIBFLAGS) $(PICFLAGS)

read_head: read_head.o
	$(CC) -o $@ read_head.o $(DIGLIB) $(GISLIB)
	-rm read_head.c

read_head.c: read_head.C
	cp read_head.C read_head.c


iprint:
	pr -l60 *.h *.c | expand -4 | ipr


check_node.o:
curses.o:	menu.h
digitize.o:	
edit.o:		
first_plot.o:
interact.o:	
mark.o:		
move_point.o:	
node_op.o:
remove.o:	
set_thresh.o:	
snap.o:	
snap.o:	
map_ask.o: map.h
map_coor.o: map.h
map_init.o: map.h
map_resid.o: map.h
map_scale.o:	
menus.o:  menus.i
