Switch to side-by-side view

--- a/src/query/Makefile
+++ b/src/query/Makefile
@@ -2,22 +2,22 @@
 include $(depth)/mk/sysconf
 
 PROGS = xadump recollq #trhist qtry qxtry 
+SRCS = xadump.cpp 
 
-all: $(PROGS)
+all: depend $(PROGS) librecoll
 
-SRCS = xadump.cpp rclqlang.cpp
-.cpp.o : 
-	$(CXX) -c $(ALL_CXXFLAGS) -o $@ $<
-
-XADUMP_OBJS= xadump.o $(BIGLIB)
+XADUMP_OBJS= xadump.o 
 xadump : $(XADUMP_OBJS)
 	$(CXX) $(ALL_CXXFLAGS) -o xadump $(XADUMP_OBJS) \
-	       $(LIBICONV) $(LIBXAPIAN) $(LIBSYS)
+	       $(depth)/lib/librecoll.a $(LIBICONV) $(LIBXAPIAN) $(LIBSYS)
+xadump.o : xadump.cpp 
+	$(CXX) $(ALL_CXXFLAGS) -c xadump.cpp
 
-RECOLLQ_OBJS= recollq.o  $(BIGLIB) 
-recollq : $(RECOLLQ_OBJS)
+RECOLLQ_OBJS= recollq.o 
+recollq : $(RECOLLQ_OBJS) librecoll
 	$(CXX) $(ALL_CXXFLAGS) -o recollq $(RECOLLQ_OBJS) \
-	       $(LIBICONV) $(LIBXAPIAN) $(LIBSYS)
+	       $(BSTATIC) $(LIBRECOLL) $(LIBXAPIAN) $(LIBICONV) $(BDYNAMIC) \
+               $(LIBSYS)
 recollq.o : recollq.cpp 
 	$(CXX) $(ALL_CXXFLAGS) -DTEST_RECOLLQ -c recollq.cpp
 
@@ -28,27 +28,14 @@
 trhist.o : history.cpp history.h
 	$(CXX) $(ALL_CXXFLAGS) -DTEST_HISTORY -c -o trhist.o history.cpp
 
-WASASTRINGTOQUERY_OBJS= trwasastrtoq.o  $(BIGLIB) 
+WASASTRINGTOQUERY_OBJS= trwasastrtoq.o  
 trwasastrtoq : $(WASASTRINGTOQUERY_OBJS)
 	$(CXX) $(ALL_CXXFLAGS) -o trwasastrtoq $(WASASTRINGTOQUERY_OBJS) \
-             $(LIBICONV) $(LIBXAPIAN)
+             $(LIBRECOLL) $(LIBICONV) $(LIBXAPIAN)
 trwasastrtoq.o : wasastringtoquery.cpp wasastringtoquery.h
 	$(CXX) $(ALL_CXXFLAGS) -DTEST_WASASTRINGTOQUERY -c \
              -o trwasastrtoq.o wasastringtoquery.cpp
 
-$(BIGLIB): force
-	cd $(depth)/lib;$(MAKE)
-force:
-
-  
-depend: alldeps.stamp
-alldeps.stamp : $(SRCS)
-	$(CXX) -M $(ALL_CXXFLAGS) $(SRCS) > alldeps
-	touch alldeps.stamp
-
-clean:
-	cp /dev/null alldeps
-	rm -f alldeps.stamp
-	rm -f *.o $(PROGS)
+include $(depth)/mk/commontargets
 
 include alldeps