CFLAGS=-Wall -g

QUICK_OBJECTS = \
	qsort.o \
	swap.o

MERGE_OBJECTS = \
	merge-sort.o

HEADERS = \
	qsort.h \
	swap.h 

default: examples

examples: qie qse mie mse

qie: int-example.o $(QUICK_OBJECTS)
	$(LINK.o) -o $@ $^

qse: string-example.o $(QUICK_OBJECTS)
	$(LINK.o) -o $@ $^

mie: int-example.o $(MERGE_OBJECTS)
	$(LINK.o) -o $@ $^

mse: string-example.o $(MERGE_OBJECTS)
	$(LINK.o) -o $@ $^

.PHONY: clean
clean:
	rm *.o

# Info on header dependencies
qsort.o: sort.h swap.h
swap.o: swap.h
int-example.o: sort.h
string-example.o: sort.h
merge-sort.o: sort.h
