
# Makefile for resample

include ../make_stuff.txt

# place to search for includes and targets
VPATH = ../lib
# voxbo libs that might be important here
VBLIBS=libvbutil.a libvbio.a libvbprefs.a

# object files for the executables

RESAMPLEOBJECTS = resample.o
VBTRANSFORMOBJECTS = vbtransform.o

# miscellaneous flags and such

LIBS =$(LIBDIRS) -lm -lvbprefs -lvbio -lvbutil -lz $(DLLIB) $(GSL_LIBS)

BINS=resample
OUT=vbtransform

# the main targets

all: $(BINS)

install:
	cp -f $(BINS) $(BINDIR)

clean:
	rm -f $(BINS) *.exe
	rm -f *.o *~ core $(BINS)

# rule to build the libvoxbo libraries
$(VBLIBS):
	make -C ../lib $@

# THE EXECUTABLES

resample: $(RESAMPLEOBJECTS) $(VBLIBS)
	$(CXX) -o resample $(RESAMPLEOBJECTS) $(LIBS)

vbtransform: $(VBTRANSFORMOBJECTS) $(VBLIBS)
	$(CXX) -o vbtransform $(VBTRANSFORMOBJECTS) $(LIBS)

# THE OBJECTS

resample.o: resample.cpp $(VBLIBS)
	$(CXX) $(CXXFLAGS) -c -o resample.o resample.cpp

vbtransform.o: vbtransform.cpp $(VBLIBS)
	$(CXX) $(CXXFLAGS) -c -o vbtransform.o vbtransform.cpp
