# $Id: Makefile,v 1.1.1.1 2005/06/13 16:47:36 bogdan_iancu Exp $
#
# example module makefile
#
# 
# WARNING: do not run this directly, it should be run by the master Makefile

# extra debug messages
DEFS+=-DDBT_EXTRA_DEBUG
 
include ../../Makefile.defs
auto_gen=
NAME=p2psip.so
LIBS=-lstdc++

include ../../Makefile.modules

sources+= $(wildcard *.cpp)  $(wildcard xmlrpc++/*.cpp)

dependsx=$(sources:.c=.d) 
depends=$(dependsx:.cpp=.d) 
objsx=$(sources:.c=.o) 
objs=$(objsx:.cpp=.o) 

#include ../../Makefile.rules

debug:
	echo $(objs)

%.o: %.cpp $(ALLDEP)
	@echo "Compiling $<"
	$(Q)$(CC) $(CFLAGS) $(DEFS) -c $< -o $@

%.d: %.cpp $(ALLDEP)
	@set -e; $(MKDEP) $(DEFS) $< \
	|  sed 's#\(\($*D)\)\?$(*F)\)\.o[ :]*#$*.o $@ : #g' > $@; \
	[ -s $@ ] || rm -f $@

# normal rules
$(NAME): $(NEWSVNREVISION) $(objs) $(ALLDEP)
	@echo "Linking $(NAME)"
	$(Q)$(LD) $(LDFLAGS) $(objs) $(extra_objs) $(LIBS) -o $(NAME) 

            

