# Universal Makefile for building EasySQL drivers # You do not need to modify it # .include "Driver" .include ".config" .include "../../Config" D_SHAREABLE = $(DRIVERNAME).so D_OBJECTS = $(D_SOURCES:.C=.o) D_RSO = $(D_SOURCES:.C=.rso) # CFLAGS += $(DC_INCPATH) $(DC_FLAGS) DEPFLAGS += $(DC_INCPATH) $(DC_FLAGS) LDFLAGS = $(DC_LIBPATH) LIBS += $(DC_LIBRARIES) # CFLDYN += -DDYNAMIC_DRV # Library to place static driver to # DRVLIB = ../../src/lib$(PROJECT).a # For standard (MakeRules) rules # CSRC = $(D_SOURCES) COBJ = $(D_OBJECTS) $(D_RSO) CPRG = $(D_SHAREABLE) FILELIST = Driver $(D_FILES) $(CSRC) # Building rules # default: all .include "../../MakeRules" all drivers: .config DrvHeader.h $(DRVLIB) $(D_SHAREABLE) depend: DrvHeader.h mkdep $(DEPFLAGS) $(CSRC) sed 's/\.o:/.rso:/' .depend > .depend-rso cat .depend-rso >> .depend rm -f .depend-rso clean: .clean rm -f DrvHeader.h install: $(D_SHAREABLE) $(INSTALL) -m 444 -s -c $> $(INSTDIR)/drivers/ dist: $(D_SHAREABLE) $(INSTALL) -m 444 -s -c $> $(DISTDIR)/drivers/ $(DRVLIB): $(D_OBJECTS) ar -ru $@ $> $(RANLIB) $@ DrvHeader.h: ../hdrprepare ../DrvHeader.h.proto @sleep 1 # otherwise drivers are not linked into library on very fast computers if ! ../hdrprepare $(DRIVERNAME) ../DrvHeader.h.proto > $@; \ then \ rm -f $@; \ exit 1; \ fi