crossroads

Git mirror of https://crossroads.e-tunity.com/
git clone git://git.finwo.net/app/crossroads
Log | Files | Refs | LICENSE

Makefile.class (1477B)


      1 SRC = $(wildcard *.cc)
      2 OBJ = $(patsubst %.cc, $(BASE)/xr/$(BUILDDIR)/$(DIR)_%.o, $(SRC))
      3 DIR = $(shell pwd | sed 's:.*/::')
      4 SYS = $(shell uname)
      5 HST = $(shell hostname)
      6 
      7 # How many times should XR check a back end using plain TCP connects?
      8 # Just once fails on some systems. Twice seems to do the job.
      9 CONNCHECKS = 2
     10 
     11 # When connecting to a back end with the socket in nonblocking mode, is
     12 # the connection alive when the socket is just writable? When commented out,
     13 # the socket must also be non-readable (which should be the standard, but on
     14 # some systems appears not to work). Leave this commented out unless you are
     15 # experimenting or really know what you are doing.
     16 # CCC = -DCONNECTCHECK_ONLY_WRITABLE
     17 
     18 # On my dev system, I want warnings to stop the compilation. Does not apply to
     19 # others where warnings won't stop the build.
     20 ifeq ($(HST), Kostunrix.local)
     21     ERRFLAG = -Werror
     22 endif    
     23 
     24 class-compile: $(OBJ)
     25 
     26 $(BASE)/xr/$(BUILDDIR)/$(DIR)_%.o: %.cc
     27 	@echo "Compiling: " `pwd`/$<
     28 	@$(CONF_CC) $(PROF) $(PROFILER) $(CONF_OPTFLAGS) \
     29 	  -DVER='"$(VER)"' -DAUTHOR='"$(AUTHOR)"' -DHST='"$(HST)"' \
     30 	  -DMAINTAINER='"$(MAINTAINER)"' -DDISTSITE='"$(DISTSITE)"' \
     31 	  -DSYS='"$(SYS)"' -D$(SYS) $(MEMDEBUG) $(CCC) \
     32 	  -DCONF_CC='"$(CONF_CC)"' -DCONF_LIB='"$(CONF_LIB)"' \
     33 	  -DCONF_OPTFLAGS='"$(CONF_OPTFLAGS)"' $(CONF_STRNSTR) \
     34 	  -DCONNCHECKS=$(CONNCHECKS) \
     35 	  $(CONF_GETOPT) $(CONF_GETOPT_LONG) $(CONF_INET_ATON) \
     36 	  -I$(BASE)/xr \
     37 	  -c -g -Wall $(ERRFLAG) -o $@ $<