TOPDIR	:= $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)

all: libs utils
libs: rawcom.o
utils: ../../../bin/mhcidx ../../../bin/rwpidx

../../../bin/mhcidx: mhcidx.cpp
	g++ $(OPTS) -o ../../../bin/mhcidx -I/usr/include/g++-include -I../../../include mhcidx.cpp `find ../../.. -type f -name "*.o" -print`

../../../bin/rwpidx: rwpidx.cpp
	g++ $(OPTS) -o ../../../bin/rwpidx -I/usr/include/g++-include -I../../../include rwpidx.cpp `find ../../.. -type f -name "*.o" -print`

rawcom.o: rawcom.cpp ../../../include/swcom.h ../../../include/rawcom.h
	g++ $(OPTS) -c -I/usr/include/g++-include -I../../../include rawcom.cpp
