TREE_COMPILE ?= g++ -g -Wall -c
TREE_LINK ?= g++ -g -Wall
LINK=$(TREE_LINK)
COMPILE=$(TREE_COMPILE)

MAINOBJECTS=../shared/read_data.o ../shared/dictionary.o opt.o main.o tsp.o distance.o reoptions.o opt2.o


all: ../TreeArrange 

clean: 
	rm -f *~ *.o *.d main

../TreeArrange: $(MAINOBJECTS)
	$(LINK) $(MAINOBJECTS) -o ../TreeArrange

distance.o: distance.c distance.h ../shared/read_data.h ../shared/dictionary.h
	$(COMPILE) $<

main.o: main.c opt.h ../shared/read_data.h tsp.h distance.h reoptions.h
	$(COMPILE) $<

opt.o: opt.c opt.h ../shared/read_data.h  ../shared/dictionary.h  
	$(COMPILE) $<

opt2.o: opt2.c opt2.h ../shared/read_data.h ../shared/dictionary.h opt.h 
	$(COMPILE) $< 

reoptions.o: reoptions.c reoptions.h
	$(COMPILE) $<

tsp.o: tsp.c tsp.h opt.h ../shared/read_data.h ../shared/dictionary.h
	$(COMPILE) $<



