cdev-1.7.2n
This commit is contained in:
123
extensions/cdevGenericServer/include/makeinclude/Makefile.common
Executable file
123
extensions/cdevGenericServer/include/makeinclude/Makefile.common
Executable file
@@ -0,0 +1,123 @@
|
||||
# ******************************************************************************
|
||||
# * 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
|
||||
# * CDEVVERSION : The version of cdev being used
|
||||
# * TARGET : The name of the target platform
|
||||
# * OS_MAJOR : The major version number of the target OS
|
||||
# ******************************************************************************
|
||||
ifdef OS_MAJOR
|
||||
TARGETDIR = $(TARGET)-$(OS_MAJOR).$(OS_MINOR)
|
||||
else
|
||||
TARGETDIR = $(TARGET)
|
||||
endif
|
||||
|
||||
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)
|
||||
|
||||
# ******************************************************************************
|
||||
# * This is the compressed command echo mechanism
|
||||
# ******************************************************************************
|
||||
ifeq ("$(VERBOSE)", "")
|
||||
VERBOSE = NO
|
||||
MAKE := $(MAKE) -s VERBOSE=NO
|
||||
endif
|
||||
|
||||
ifeq ("$(VERBOSE)", "NO")
|
||||
QUIET = @
|
||||
CXX_CMD_ECHO = @echo " => $(CXX) -c $(<F) -o $(@F)";
|
||||
CC_CMD_ECHO = @echo " => $(CC) -c $(<F) -o $(@F)";
|
||||
AR_CMD_ECHO = @echo " => $(AR) $(@F)";
|
||||
SO_CMD_ECHO = @echo " => $(DLD) -o $(@F)";
|
||||
LINK_CMD_ECHO = @echo " => $(CXX) -o $(@F)";
|
||||
COPY_CMD_ECHO = @echo " => Copying $(@F) to $^";
|
||||
LEX_CMD_ECHO = @echo " => lex -o $(@F) $(^F)";
|
||||
YACC_CMD_ECHO = @echo " => yacc -o $(@F) $(^F)";
|
||||
else
|
||||
EMPTY_ECHO =
|
||||
CXX_CMD_ECHO = $(EMPTY_ECHO)
|
||||
CC_CMD_ECHO = $(EMPTY_ECHO)
|
||||
AR_CMD_ECHO = $(EMPTY_ECHO)
|
||||
SO_CMD_ECHO = $(EMPTY_ECHO)
|
||||
LINK_CMD_ECHO = $(EMPTY_ECHO)
|
||||
COPY_CMD_ECHO = $(EMPTY_ECHO)
|
||||
LEX_CMD_ECHO = $(EMPTY_ECHO)
|
||||
YACC_CMD_ECHO = $(EMPTY_ECHO)
|
||||
endif
|
||||
|
||||
# ******************************************************************************
|
||||
# * 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
|
||||
$(COMPILE.cc)
|
||||
|
||||
|
||||
# ******************************************************************************
|
||||
# * Rule for compiling shared C++ files.
|
||||
# ******************************************************************************
|
||||
.shobj/$(TARGETDIR)/%.o : %.cc
|
||||
$(COMPILE.cc.so)
|
||||
|
||||
# ******************************************************************************
|
||||
# * Rule for compiling archive C files.
|
||||
# ******************************************************************************
|
||||
.obj/$(TARGETDIR)/%.o : %.c
|
||||
$(COMPILE.c)
|
||||
|
||||
|
||||
# ******************************************************************************
|
||||
# * Rule for compiling shared C files.
|
||||
# ******************************************************************************
|
||||
.shobj/$(TARGETDIR)/%.o : %.c
|
||||
$(COMPILE.c.so)
|
||||
|
||||
# ******************************************************************************
|
||||
# * Generic rules for makefiles.
|
||||
# ******************************************************************************
|
||||
all: hail targets fairwell
|
||||
|
||||
hail:
|
||||
@echo " => Building [$(TARGETDIR)] in $(APPNAME)"
|
||||
|
||||
fairwell:
|
||||
@echo " Done..."
|
||||
|
||||
clean:
|
||||
@echo " => Cleaning [$(TARGETDIR)] in $(APPNAME)"
|
||||
@rm -rf .o .a core .obj/$(TARGETDIR) .shobj/$(TARGETDIR) *.?.? TC.Cache $(BINARIES) $(TARGETS) ./ptrepository
|
||||
@echo " Done..."
|
||||
purge:
|
||||
@echo " => Purging [All] in $(APPNAME)"
|
||||
@rm -rf .shobj .obj .exec $(BINARIES) $(TARGETS) $(TEMPLINKS) .o .a core *.?.? TC.Cache ./ptrepository
|
||||
@echo " Done..."
|
||||
Reference in New Issue
Block a user