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 treeps.o main.o palette.o options.o

all: ../Treeps 

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

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

main.o: main.c treeps.h  ../shared/read_data.h  ../shared/dictionary.h \
 color.h palette.h options.h
	$(COMPILE) $<

options.o: options.c options.h color.h palette.h ../shared/dictionary.h 
	$(COMPILE) $<

palette.o: palette.c palette.h color.h ../shared/dictionary.h
	$(COMPILE) $<

treeps.o: treeps.c ../shared/read_data.h  ../shared/dictionary.h \
 color.h palette.h options.h 
	$(COMPILE) $<



