#!/bin/bash # BUILD_ALL # CXX = g++ CXXFLAGS = -g -O3 PROGS = pagesm commandm querym soap_cmdm soapm2 soapm web_cmdm1 web_cmdm2 rem_shm # First, compile all classes into our own library (new.lib): LIBSRC = errors.cpp ser_io.cpp sockets.cpp event.cpp storage.cpp node_id.cpp \ comdat.cpp cell.cpp cell_array.cpp message.cpp xml.cpp http_msngr.cpp \ soap.cpp soap_sub.cpp web_cmd.cpp isy.cpp pages.cpp command.cpp query.cpp LIBOBJ = $(LIBSRC:.cpp=.o) LIBISY = libisy.a #LIBOBJ = errors.o ser_io.o sockets.o event.o storage.o node_id.o \ # comdat.o cell.o cell_array.o message.o xml.o http_msngr.o \ # soap.o soap_sub.o web_cmd.o isy.o pages.o command.o query.o # all: $(PROGS) $(LIBISY): $(LIBOBJ) ar rv $(LIBISY) $(LIBOBJ) # #.c.a: (%.o): %.c $(CXX) $(CXXFLAGS) -c $< -o $*.o # comment $(AR) rv $@ $*.o $(RM) $*.o # LIBISY dependencies errors.o: errors.cpp gecore.h ser_io.o: ser_io.cpp ser_io.h sockets.o: sockets.cpp sockets.h event.o: event.cpp event.h xml.h storage.o: storage.cpp storage.h node_id.o: node_id.cpp node_id.h storage.h xml.h comdat.o: comdat.cpp comdat.h record.h bucket.h cell.o: cell.cpp cell.h cell_array.o: cell_array.cpp cell_array.h cell.h message.o: message.cpp message.h xml.o: xml.cpp xml.h http_msngr.o: http_msngr.cpp http_msngr.h message.h sockets.h soap.o: soap.cpp soap.h event.h record.h bucket.h comdat.h xml.h soap_sub.o: soap_sub.cpp soap_sub.h event.h comdat.h record.h bucket.h web_cmd.o: web_cmd.cpp web_cmd.h comdat.h record.h bucket.h cell_array.h cell.h isy.o: isy.cpp isy.h pages.o: pages.cpp pages.h xml.h command.o: command.cpp command.h query.o: query.cpp query.h # # Now build all the executables: # pagesm: $(LIBISY) $(CXX) -o pagesm pagesm.cpp $(LIBISY) commandm: $(LIBISY) $(CXX) -o commandm commandm.cpp $(LIBISY) querym: $(LIBISY) $(CXX) -o querym querym.cpp $(LIBISY) soap_cmdm: $(LIBISY) $(CXX) -o soap_cmdm soap_cmdm.cpp $(LIBISY) soapm2:$(LIBISY) $(CXX) -o soapm2 soapm2.cpp $(LIBISY) web_cmdm1: $(LIBISY) $(CXX) -o web_cmdm1 web_cmdm1.cpp $(LIBISY) web_cmdm2: $(LIBISY) $(CXX) -o web_cmdm2 web_cmdm2.cpp $(LIBISY) rem_shm: $(LIBISY) $(CXX) -o rem_shm rem_shm.cpp $(LIBISY) # # Note that the pthread library, part of the default Linux setup, # must be specifically included in the link list for SOAPM only. # # Note that some Linux systems may require "g++" instead of "$(CXX)". # soapm: $(LIBISY) $(CXX) -o soapm soapm.cpp $(LIBISY) -lpthread clean: rm -rf *.o a.out core foo *~ $(PROGS) $(LIBISY)