Annotation of sbbs/src/build/common.bmake, revision 1.1

1.1     ! root        1: # build/Common.bmake
        !             2: #
        !             3: # Global build system setup file for Borland Make/BCC
        !             4: #
        !             5: # $Id: Common.bmake,v 1.47 2006/12/29 02:54:32 rswindell Exp $
        !             6: #
        !             7: #############################################################################
        !             8: #                                                                                                                                                      #
        !             9: # Common macro setup for Borland make                                                                          #
        !            10: #                                                                                                                                                      #
        !            11: # Common Build Macros REQUIRED:                                                                                                #
        !            12: #  SRC_ROOT                    - *MUST* be set to the src dir                                                  #
        !            13: #                                                                                                                                                      #
        !            14: # Common Build Macros Used:                                                                                                    #
        !            15: #  DEBUG                       - Create a debug build                                                                  #
        !            16: #  RELEASE                     - Create a release build                                                                #
        !            17: #                                        (Mutually exclusive, if both are set, RELEASE                 #
        !            18: #                                              is cleared)                                                                                     #
        !            19: #  DONT_CLOBBER_CC     - Do not change the default setting of CC                               #
        !            20: #  OBJPATH_SUFFIX      - Suffix appended to OBJPATH usefull for compiling              #
        !            21: #                                        different options of the same source file                             #
        !            22: #                                                                                                                                                      #
        !            23: # Common Build Macros Defined:                                                                                         #
        !            24: #  DELETE                      - Delete files (Preferrably verbose)                                    #
        !            25: #  OBJODIR                     - Object output dir                                                                             #
        !            26: #  LIBODIR                     - Library output dir                                                                    #
        !            27: #  EXEODIR                     - Executable output dir                                                                 #
        !            28: #  DEBUG                       - Set for debug builds                                                                  #
        !            29: #  RELEASE                     - Set for release builds                                                                #
        !            30: #                                        One of DEBUG or RELEASE is always set!                                #
        !            31: #  QUIET                       - Target command prefix to show/not show commands               #
        !            32: #                                        (Toggled off by setting VERBOSE)                                              #
        !            33: #  CFLAGS                      - Common C and C++ compiler flags                                               #
        !            34: #  CCFLAGS                     - C specific compiler flags                                                             #
        !            35: #  CXXFLAGS                    - C++ specific compiler flags                                                   #
        !            36: #  LDFLAGS                     - Linker flags                                                                                  #
        !            37: #  CC                          - C compiler                                                                                    #
        !            38: #  CXX                         - C++ compiler                                                                                  #
        !            39: #  EXEFILE                     - Executable file extension (Includes .)                                #
        !            40: #  OFILE                       - Object file extension (Includes .)                                    #
        !            41: #  SOFILE                      - Shared object (DLL) file extension (Includes .)               #
        !            42: #  LIBFILE                     - Static library file extension (Include .)                             #
        !            43: #  LIBPREFIX           - Prefix to library filename                                                    #
        !            44: #  LIBS                                - Library names (Appropriate for dependencies)                  #
        !            45: #  LIB_LDFLAGS         - Libraries appropriate for link command-line usage             #
        !            46: #  COMPILE_MSG         - Message saying a target is being compiled                             #
        !            47: #  DIRSEP                      - The directory seperator this system likes most                #
        !            48: #  VERSION                     - Synchronet version number in MAJOR.MINOR format               #
        !            49: #                                        (Numeric ONLY)                                                                                #
        !            50: #  OUTPUT                      - Compiler flag specifying output filename                              #
        !            51: #  LOUTPUT                     - Linker flag specifying output filename                                #
        !            52: #  XPDEV_SRC           - Path to xpdev                                                                                 #
        !            53: #  UIFC_SRC                    - Path to uifc                                                                                  #
        !            54: #  CIOLIB_SRC          - Path to ciolib                                                                                #
        !            55: #  SMBLIB_SRC          - Path to smblib                                                                                #
        !            56: #  MT_CFLAGS           - CFLAGS for building MT objects                                                #
        !            57: #  MT_LDFLAGS          - LDFLAGS for linking MT targets                                                #
        !            58: #  UL_PRE           - Use Library prefix (*nix is -l)                       #
        !            59: #  UL_SUF           - Use Library siffix (bcc is .lib)                      #
        !            60: #                                                                                                                                                      #
        !            61: # Common Targets Defined:                                                                                                      #
        !            62: #  Implicit C and C++ targets                                                                                          #
        !            63: #  "clean" target                                                                                                                      # 
        !            64: #  Output directory targets                                                                                                    #
        !            65: #                                                                                                                                                      #
        !            66: #############################################################################
        !            67: 
        !            68: .autodepend
        !            69: .cacheautodepend
        !            70: 
        !            71: # Macros
        !            72: # Set VERSION
        !            73: !ifndef VERSION
        !            74:  VERSION       =       3.14
        !            75: !endif
        !            76: 
        !            77: # Set DEBUG
        !            78: !ifdef DEBUG
        !            79: ! ifdef RELEASE
        !            80: !  undef RELEASE
        !            81: ! endif
        !            82: !endif
        !            83: 
        !            84: !ifndef DEBUG
        !            85: ! ifndef RELEASE
        !            86:   DEBUG        =       1
        !            87: ! endif
        !            88: !endif
        !            89: 
        !            90: # VERBOSE/QUIET
        !            91: !ifndef VERBOSE
        !            92:  QUIET =       @
        !            93: !endif
        !            94: 
        !            95: # OS-specific
        !            96: DIRSEP =       \       # This comment is necessary
        !            97: EXEFILE        =       .exe
        !            98: OFILE  =       .obj
        !            99: SOFILE =       .dll
        !           100: LIBFILE        =       .lib
        !           101: DELETE =       echo y | del 
        !           102: IFNOTEXIST = if not exist $@
        !           103: UL_PRE =       
        !           104: UL_SUF =       $(LIBFILE)
        !           105: 
        !           106: # Compiler-specific
        !           107: !ifdef msc     # Microsoft Visual C++
        !           108: CC             =       cl
        !           109: LD             =       link
        !           110: CCPRE  =       msvc.win32
        !           111: OUTPUT =       -Fo
        !           112: LOUTPUT        =       -Fe
        !           113: CFLAGS  =      -nologo -MTd
        !           114: LDFLAGS        =       $(CFLAGS)
        !           115: !ifdef DEBUG
        !           116:  CFLAGS        =       $(CFLAGS) -Yd
        !           117: !endif
        !           118: 
        !           119: !else          # Borland C++
        !           120: 
        !           121: CC             =       bcc32
        !           122: CCPRE  =       bcc
        !           123: LD             =       ilink32
        !           124: OUTPUT =       -o
        !           125: LOUTPUT        =       $(OUTPUT)
        !           126: CFLAGS =       -q 
        !           127: LDFLAGS        =       $(CFLAGS)
        !           128: CFLAGS  =      $(CFLAGS) -M -X-
        !           129: MT_CFLAGS = -WM 
        !           130: MT_LDFLAGS = -WM 
        !           131: !ifdef DEBUG
        !           132:  CFLAGS        =       $(CFLAGS) -v
        !           133: !endif
        !           134: !endif
        !           135: MKSHLIB =       $(CC) -WD
        !           136: 
        !           137: # Common compiler flags
        !           138: !ifdef DEBUG
        !           139: CFLAGS =       $(CFLAGS) -Od -D_DEBUG 
        !           140: !endif
        !           141: 
        !           142: # Debug or release build?
        !           143: !ifdef DEBUG
        !           144: BUILD  =       debug
        !           145: !else
        !           146: BUILD  =       release
        !           147: !endif
        !           148: !ifndef BUILDPATH
        !           149: BUILDPATH      =       $(BUILD)
        !           150: !endif
        !           151: 
        !           152: OBJODIR =      $(CCPRE).win32.obj.$(BUILDPATH)
        !           153: MTOBJODIR =    $(CCPRE).win32.obj.$(BUILDPATH)_mt
        !           154: LIBODIR =      $(CCPRE).win32.lib.$(BUILDPATH)
        !           155: EXEODIR =      $(CCPRE).win32.exe.$(BUILDPATH)
        !           156: 
        !           157: # Paths
        !           158: XPDEV_SRC      =       $(SRC_ROOT)$(DIRSEP)xpdev
        !           159: CIOLIB_SRC     =       $(SRC_ROOT)$(DIRSEP)conio
        !           160: SMBLIB_SRC     =       $(SRC_ROOT)$(DIRSEP)smblib
        !           161: UIFC_SRC       =       $(SRC_ROOT)$(DIRSEP)uifc
        !           162: 
        !           163: # Pull in lib-specific flags
        !           164: !include     $(XPDEV_SRC)$(DIRSEP)Common.make
        !           165: !include     $(XPDEV_SRC)$(DIRSEP)Common.bmake
        !           166: !include     $(SMBLIB_SRC)$(DIRSEP)Common.make
        !           167: !include     $(CIOLIB_SRC)$(DIRSEP)Common.make
        !           168: !include     $(UIFC_SRC)$(DIRSEP)Common.make
        !           169: 
        !           170: .path.c                =       .
        !           171: .path.cpp      =       .
        !           172: 
        !           173: !include targets.mk
        !           174: !include $(SRC_ROOT)/build/rules.mk
        !           175: !include objects.mk            # defines $(OBJS)
        !           176: 
        !           177: .SUFFIXES
        !           178: .SUFFIXES .cpp .c
        !           179: # Implicit C Compile Rule
        !           180: .c{$(OBJODIR)}$(OFILE):
        !           181:        $(QUIET)$(CC) $(CFLAGS) $(CCFLAGS) -n$(OBJODIR) -c $< $(OUTPUT)$@
        !           182: 
        !           183: # Implicit C++ Compile Rule
        !           184: .cpp{$(OBJODIR)}$(OFILE):
        !           185:        $(QUIET)$(CC) $(CFLAGS) $(CXXFLAGS) -n$(OBJODIR) -c $< $(OUTPUT)$@
        !           186: 
        !           187: # Implicit MT C Compile Rule
        !           188: .c{$(MTOBJODIR)}$(OFILE):
        !           189:        $(QUIET)$(CC) $(CFLAGS) $(CCFLAGS) -n$(MTOBJODIR) $(MT_CFLAGS) -c $< $(OUTPUT)$@
        !           190: 
        !           191: # Implicit MT C++ Compile Rule
        !           192: .cpp{$(MTOBJODIR)}$(OFILE):
        !           193:        $(QUIET)$(CC) $(CFLAGS) $(CXXFLAGS) -n$(MTOBJODIR) $(MT_CFLAGS) -c $< $(OUTPUT)$@
        !           194: 
        !           195: $(XPDEV_LIB): xpdev
        !           196: xpdev:
        !           197:        $(COMSPEC) <<|
        !           198:        set VERSION=$(VERSION)
        !           199:        set DEBUG=$(DEBUG)
        !           200:        set RELEASE=$(RELEASE)
        !           201:        set VERBOSE=$(VERBOSE)
        !           202:        set BUILDPATH=$(BUILDPATH)
        !           203:        set USE_SDL=$(USE_SDL)
        !           204:        cd $(XPDEV_SRC)
        !           205:        $(MAKE) -$(MAKEFLAGS) lib
        !           206:        exit
        !           207: |
        !           208: 
        !           209: $(XPDEV-MT_LIB): xpdev-mt
        !           210: xpdev-mt:
        !           211:        $(COMSPEC) <<|
        !           212:        set VERSION=$(VERSION)
        !           213:        set DEBUG=$(DEBUG)
        !           214:        set RELEASE=$(RELEASE)
        !           215:        set VERBOSE=$(VERBOSE)
        !           216:        set BUILDPATH=$(BUILDPATH)
        !           217:        set USE_SDL=$(USE_SDL)
        !           218:        cd $(XPDEV_SRC)
        !           219:        $(MAKE) -$(MAKEFLAGS) mtlib
        !           220:        exit
        !           221: |
        !           222: 
        !           223: $(SMBLIB): smblib
        !           224: smblib:
        !           225:        $(COMSPEC) <<|
        !           226:        set VERSION=$(VERSION)
        !           227:        set DEBUG=$(DEBUG)
        !           228:        set RELEASE=$(RELEASE)
        !           229:        set VERBOSE=$(VERBOSE)
        !           230:        set BUILDPATH=$(BUILDPATH)
        !           231:        cd $(SMBLIB_SRC)
        !           232:        $(MAKE) -$(MAKEFLAGS) lib
        !           233:        exit
        !           234: |
        !           235: 
        !           236: $(CIOLIB-MT): ciolib-mt
        !           237: ciolib-mt:
        !           238:        $(COMSPEC) <<|
        !           239:        set VERSION=$(VERSION)
        !           240:        set DEBUG=$(DEBUG)
        !           241:        set RELEASE=$(RELEASE)
        !           242:        set VERBOSE=$(VERBOSE)
        !           243:        set BUILDPATH=$(BUILDPATH)
        !           244:        set USE_SDL=$(USE_SDL)
        !           245:        set STATIC_SDL=$(STATIC_SDL)
        !           246:        cd $(CIOLIB_SRC)
        !           247:        $(MAKE) -$(MAKEFLAGS) mtlib
        !           248:        exit
        !           249: |
        !           250: 
        !           251: $(UIFCLIB): uifc
        !           252: uifc:
        !           253:        $(COMSPEC) <<|
        !           254:        set VERSION=$(VERSION)
        !           255:        set DEBUG=$(DEBUG)
        !           256:        set RELEASE=$(RELEASE)
        !           257:        set VERBOSE=$(VERBOSE)
        !           258:        set BUILDPATH=$(BUILDPATH)
        !           259:        set USE_SDL=$(USE_SDL)
        !           260:        cd $(UIFC_SRC)
        !           261:        $(MAKE) -$(MAKEFLAGS) lib
        !           262:        exit
        !           263: |
        !           264: 
        !           265: $(UIFCLIB-MT): uifc-mt
        !           266: uifc-mt:
        !           267:        $(COMSPEC) <<|
        !           268:        set VERSION=$(VERSION)
        !           269:        set DEBUG=$(DEBUG)
        !           270:        set RELEASE=$(RELEASE)
        !           271:        set VERBOSE=$(VERBOSE)
        !           272:        set BUILDPATH=$(BUILDPATH)
        !           273:        set USE_SDL=$(USE_SDL)
        !           274:        set STATIC_SDL=$(STATIC_SDL)
        !           275:        cd $(UIFC_SRC)
        !           276:        $(MAKE) -$(MAKEFLAGS) mtlib
        !           277:        exit
        !           278: |

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.