diff --git a/Makefile b/Makefile
index 046f617e83f2053d354eb07c5676038627539ca6..8608409292042a531aa2bc7c02e184ed987b9f83 100644
--- a/Makefile
+++ b/Makefile
@@ -26,12 +26,13 @@ MDV=make_dyadic_vectors
 FMO=fdt_matrix_ops
 INDEXER=indexer
 TEST=testfile
+ORDVEC=reorder_dyadic_vectors
 
 
 DTIFITOBJS=dtifit.o dtifitOptions.o
 CCOPSOBJS=ccops.o ccopsOptions.o
 PTOBJS=probtrack.o probtrackOptions.o pt_alltracts.o pt_matrix.o pt_seeds_to_targets.o pt_simple.o pt_twomasks.o pt_matrix_mesh.o
-PTXOBJS=probtrackx.o probtrackxOptions.o streamlines.o ptx_simple.o ptx_seedmask.o ptx_twomasks.o
+PTXOBJS=probtrackx.o probtrackxOptions.o streamlines.o ptx_simple.o ptx_seedmask.o ptx_twomasks.o ptx_nmasks.o
 FTBOBJS=find_the_biggest.o
 PJOBJS=proj_thresh.o
 MEDOBJS=medianfilter.o 
@@ -44,11 +45,12 @@ MDVOBJS=make_dyadic_vectors.o
 FMOOBJS=fdt_matrix_ops.o
 INDEXEROBJS=indexer.o
 TESTOBJS=testfile.o
+ORDVECOBJS=reorder_dyadic_vectors.o heap.o
 
 SGEBEDPOST =sge_bedpost  sge_bedpost_postproc.sh  sge_bedpost_preproc.sh  sge_bedpost_single_slice.sh
 SGEBEDPOSTX=sge_bedpostX sge_bedpostX_postproc.sh sge_bedpostX_preproc.sh sge_bedpostX_single_slice.sh
 
-SCRIPTS = eddy_correct bedpost bedpost_proc bedpost_cleanup bedpost_kill_all bedpost_kill_pid zeropad bedpost_datacheck
+SCRIPTS = eddy_correct bedpost bedpost_proc bedpost_cleanup bedpost_kill_all bedpost_kill_pid zeropad bedpost_datacheck bedpostX bedpostX_proc
 FSCRIPTS=correct_and_average ocmr_preproc bedpostX bedpostX_proc bedpostX_cleanup bedpostX_kill_all \
 	${SGEBEDPOST} ${SGEBEDPOSTX}
 
@@ -109,6 +111,10 @@ ${TEST}:    	${TESTOBJS}
 		   ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ ${TESTOBJS} ${DLIBS}
 
 
+${ORDVEC}:    	${ORDVECOBJS}
+		   ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ ${ORDVECOBJS} ${DLIBS}
+
+