aboutsummaryrefslogblamecommitdiffstats
path: root/Makefile
blob: bd9c0900e17c73a1a87c4044ac7e761ccf78b2ed (plain) (tree)
1
2
3
4
5
6
7
8
9
10







                                                                                           

                                                                                                                 




                       
                                                              


                                                    
                                                   

 
                                                                                             
                                                                                                           
                                                                                             
                                                             

 



                         
GPP=gpp
JAVAC=javac

PP = comparable
SRC = $(shell find src | grep '\.java$$')
PPD = $(shell find src | grep '\.java$$' | sed -e 's:^src:obj:')
OBJ = $(shell find src | grep '\.java$$' | sed -e 's:^src:obj:' | sed -e 's:java$$:class:')

OBJ_LINKED_LISTS = $(shell find src/datastructures/linkedlists | grep 'LinkedList.java$$' | sed -e 's:^src:obj:')


.PHONY: all
all: $(OBJ)

obj/%.class: obj/%.java
	$(JAVAC) '-Xlint:all,-cast' -s obj -d obj -cp obj "$<"

obj/%.java: src/%.java $(foreach F, $(PP), src/$(F))
	mkdir -p "$(shell dirname "$@")"
	env GPP="$(GPP)" $(GPP) -s £ < "$<" > "$@"


$(OBJ_LINKED_LISTS): src/datastructures/linkedlists/template obj/algorithms/bits/Powers.class
obj/algorithms/searching/MultiinterpolationSearch.class: obj/algorithms/searching/InterpolationSearch.class
obj/algorithms/searching/MultibinarySearch.class: obj/algorithms/searching/BinarySearch.class
obj/datastructures/PerformanceTest.class: $(OBJ_LINKED_LISTS)


.PHONY: clean
clean:
	-rm -r -- bin obj