Files
cdev-1.7.2n/extensions/cdevGenericServer/liteClient/Makefile.common
2022-12-13 12:44:04 +01:00

90 lines
3.4 KiB
Makefile
Executable File

# ******************************************************************************
# * Makefile.common : This is the community makefile for the cdevGenericServer
# * distribution. It contains the definitions that are common
# * for all Makefiles in this distribution.
# *
# * Externals : This Makefile relies on the developer defining the
# * following external definitions...
# *
# * CDEV : The base directory of the CDEV distribution
# * TARGET : The name of the target platform
# * OS_MAJOR : The major version number of the target OS
# ******************************************************************************
TARGETDIR = $(TARGET)-$(OS_MAJOR).$(OS_MINOR)
CDEVVERSION = 1.7.2
CDEVINCLUDES = -I$(CDEV)/include
CDEVLIB = $(CDEV)/lib/$(TARGETDIR)
CDEVBIN = $(CDEV)/bin/$(TARGETDIR)
BASEDIR = $(CDEV)/extensions/cdevGenericServer
BASEINCLUDES = -I$(BASEDIR)/include
BASELIB = $(BASEDIR)/lib/$(TARGETDIR)
BASEBIN = $(BASEDIR)/bin/$(TARGETDIR)
# ******************************************************************************
# * Set the CDEV shared object directory to a default location if not specified.
# ******************************************************************************
ifeq ($(CDEVSHOBJ), )
CDEVSHOBJ = $(CDEVLIB)
endif
# ******************************************************************************
# * Set the object directory appropriately to the SHOBJ flag (default YES)
# ******************************************************************************
ifeq ($(SHOBJ), NO)
OBJDIR = .obj/$(TARGETDIR)
else
SHOBJ = YES
OBJDIR = .shobj/$(TARGETDIR)
endif
# ******************************************************************************
# * Rule for compiling archive C++ files.
# ******************************************************************************
.obj/$(TARGETDIR)/%.o : %.cc
@rm -f $@
@echo "=> $(CXX) -c $(^F) -o $(@F)"
@mkdir -p .obj/$(TARGETDIR)
@$(COMPILE.cc)
# ******************************************************************************
# * Rule for compiling shared C++ files.
# ******************************************************************************
.shobj/$(TARGETDIR)/%.o : %.cc
@rm -f $@
@echo "=> $(CXX) -c $(^F) -o $(@F)"
@mkdir -p .shobj/$(TARGETDIR)
@$(COMPILE.cc.so)
# ******************************************************************************
# * Generic rules for makefiles.
# ******************************************************************************
all: hail targets fairwell
hail:
@echo
@echo ----------------------------------------------------------------
@echo Building $(APPNAME) for Target: $(TARGET)
@echo ----------------------------------------------------------------
fairwell:
@echo ----------------------------------------------------------------
@echo Finished Building $(APPNAME) for Target: $(TARGET)
@echo ----------------------------------------------------------------
@echo
clean:
@echo "=> Cleaning $(APPNAME) on $(TARGETDIR)"
@rm -rf .o .a core .obj/$(TARGETDIR) .shobj/$(TARGETDIR) *.?.? TC.Cache $(BINARIES) $(TARGETS) ./ptrepository
@echo "<= Done...\n"
purge:
@echo "=> Purging $(APPNAME)"
@rm -rf .shobj .obj $(BINARIES) $(TARGETS) $(TEMPLINKS) .o .a core *.?.? TC.Cache ./ptrepository
@echo "<= Done...\n"