#
# Library Makefile
#

LIB= list.a 

all:  $(LIB)

OBJ= construct_lnode.o \
delete_lnode.o \
destroy_lnode.o \
diff_fwd_lists.o \
diff_rev_lists.o \
dup_list.o \
find_lnode.o \
free_list.o \
fwd_insert_lnode.o \
lists_equal.o \
match_list.o \
merge_lists.o \
print_list.o \
remove_lnode.o \
rev_insert_lnode.o 

SRC=$(OBJ:.o=.c)

list.a: $(OBJ) list.h
	ar ruv $(LIB) $(OBJ)

clean:
	rm -f $(OBJ)

clobber:
	rm -f $(OBJ)
	rm -f $(LIB)

lint::
	lint -u -x -m $(CFLAGS) $(SRC) >lint.out

construct_lnode.o: construct_lnode.c list.h Makefile

destroy_lnode.o: destroy_lnode.c list.h Makefile


fwd_insert_lnode.o: fwd_insert_lnode.c list.h Makefile

rev_insert_lnode.o: rev_insert_lnode.c list.h Makefile

delete_lnode.o: delete_lnode.c list.h Makefile

remove_lnode.o: remove_lnode.c list.h Makefile


diff_fwd_lists.o: diff_fwd_lists.c list.h Makefile

diff_rev_lists.o: diff_rev_lists.c list.h Makefile

dup_list.o: dup_list.c list.h Makefile

merge_lists.o: merge_lists.c list.h Makefile

free_list.o: free_list.c list.h Makefile


find_lnode.o: find_lnode.c list.h Makefile

lists_equal.o: lists_equal.c list.h Makefile

match_list.o: match_list.c list.h Makefile

print_list.o: print_list.c list.h Makefile

