# ****************************************************************************** # * Makefile.common : This is the community makefile for the CDEV 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 CDEVINCLUDES = -I$(CDEV)/include CDEVLIB = $(CDEV)/lib/$(TARGETDIR) CDEVBIN = $(CDEV)/bin/$(TARGETDIR) # ****************************************************************************** # * Set the CDEV Version if it has not been specified. # ****************************************************************************** ifeq ($(CDEVVERSION), ) CDEVVERSION = 1.7.2 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), YES) OBJDIR = .shobj/$(TARGETDIR) else SHOBJ = NO OBJDIR = .obj/$(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) .exec/$(TARGETDIR) *.?.? TC.Cache $(BINARIES) $(TARGETS) ./ptrepository @echo "<= Done...\n" purge: @echo "=> Purging $(APPNAME)" @rm -rf .shobj .obj .exec $(BINARIES) $(TARGETS) $(TEMPLINKS) .o .a core *.?.? TC.Cache ./ptrepository @echo "<= Done...\n"