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

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

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

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

CAMD = camd_aat camd_1 camd_2 camd_control camd_defaults camd_dump \
       camd_info camd_order camd_postorder camd_preprocess camd_valid

INC = Include/camd.h Include/camd_internal.h

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

CAMDL = $(addsuffix .o, $(subst camd_,../obj/camd_l_,$(CAMD)))

all : $(CAMDL) ../obj/camd_global.o

#-------------------------------------------------------------------------------
# compile each int routine
#-------------------------------------------------------------------------------

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

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

