# Debian makefile for apt-transport-debtorrent

all: debtorrent

CXXFLAGS = -g -O2 -Wall
LDLIBS = -lapt-pkg

debtorrent_SRCS = debtorrent.cc connect.cc rfc2553emu.cc
debtorrent_OBJS = $(patsubst %.cc,%.o,$(debtorrent_SRCS))
debtorrent_DEPS = $(patsubst %.cc,.%.d,$(debtorrent_SRCS))

$(debtorrent_OBJS) : %.o : %.cc
	$(CXX) -c $(CXXFLAGS) $< -o $@

$(debtorrent_DEPS) : .%.d : %.cc
	$(CXX) -MM $(CXXFLAGS) $<  > $@

include $(debtorrent_DEPS)

debtorrent : $(debtorrent_OBJS)
	$(CXX) -o $@ $(debtorrent_OBJS) $(LDLIBS)

.PHONY : clean clean-deps dist    

clean:
	rm -f *.o *~ core debtorrent *.dump

clean-deps:
	rm -f .*.d

.PHONY: all clean clean-deps
