# modified by É. Canot -- IPR/CNRS -- Aug 2013

#-------------------------------------------------------------------------------
# AMD Makefile for compiling on Unix systems (for GNU make only)
#-------------------------------------------------------------------------------

C = $(CC) $(CC_FLAGS) -I. -I./Include -I../SuiteSparse_config

#-------------------------------------------------------------------------------
# source files
#-------------------------------------------------------------------------------

AMD = amd_aat amd_1 amd_2 amd_dump amd_postorder amd_post_tree \
   amd_defaults amd_order amd_control amd_info amd_valid amd_preprocess

INC = Include/amd.h Include/amd_internal.h

#-------------------------------------------------------------------------------
# object files
#-------------------------------------------------------------------------------

AMDL = $(addsuffix .o, $(subst amd_,../obj/amd_l_,$(AMD)))

all : $(AMDL) ../obj/amd_global.o

#-------------------------------------------------------------------------------
# compile each int routine (with no real/complex version)
#-------------------------------------------------------------------------------

../obj/amd_global.o : Source/amd_global.c $(INC)
	$(C) -c $< -o $@

../obj/amd_l_%.o: Source/amd_%.c $(INC)
	$(C) -DDLONG -c $< -o $@

