Annotation of embedaddon/php/ext/xml/xml.mak, revision 1.1

1.1     ! misho       1: # Temporarily here -- later may go into some batch file
        !             2: # which will set this as an environment variable
        !             3: PROJECT_ROOT = ..\..
        !             4: 
        !             5: # Module details
        !             6: MODULE_NAME = php_xml
        !             7: MODULE_DESC = "PHP 5 - XML Extension"
        !             8: VMAJ = 3
        !             9: VMIN = 0
        !            10: VREV = 0
        !            11: 
        !            12: #include the common settings
        !            13: include $(PROJECT_ROOT)/netware/common.mif
        !            14: 
        !            15: # Extensions of all input and output files
        !            16: .SUFFIXES:
        !            17: .SUFFIXES: .nlm .lib .obj .cpp .c .msg .mlc .mdb .xdc .d
        !            18: 
        !            19: # Source files
        !            20: C_SRC = xml.c \
        !            21:         start.c
        !            22: 
        !            23: CPP_SRC_NODIR = $(notdir $(CPP_SRC))
        !            24: C_SRC_NODIR = $(notdir $(C_SRC))
        !            25: SRC_DIR = $(dir $(CPP_SRC) $(C_SRC))
        !            26: 
        !            27: # Library files
        !            28: LIBRARY = 
        !            29: 
        !            30: # Destination directories and files
        !            31: OBJ_DIR = $(BUILD)
        !            32: FINAL_DIR = $(BUILD)
        !            33: MAP_FILE = $(FINAL_DIR)\$(MODULE_NAME).map
        !            34: OBJECTS  = $(addprefix $(OBJ_DIR)/,$(CPP_SRC_NODIR:.c=.obj) $(C_SRC_NODIR:.c=.obj))
        !            35: DEPDS  = $(addprefix $(OBJ_DIR)/,$(CPP_SRC_NODIR:.c=.d) $(C_SRC_NODIR:.c=.d))
        !            36: 
        !            37: # Binary file
        !            38: ifndef BINARY
        !            39:        BINARY=$(FINAL_DIR)\$(MODULE_NAME).nlm
        !            40: endif
        !            41: 
        !            42: # Compile flags
        !            43: C_FLAGS += -c -maxerrors 25 -msgstyle gcc
        !            44: C_FLAGS += -wchar_t on -bool on
        !            45: C_FLAGS += -processor Pentium
        !            46: C_FLAGS += -nostdinc -nosyspath
        !            47: C_FLAGS += -relax_pointers             # To remove type-casting errors
        !            48: C_FLAGS += -DNETWARE -DZTS
        !            49: C_FLAGS += -DNEW_LIBC
        !            50: C_FLAGS += -DCOMPILE_DL_XML -DHAVE_LIBEXPAT=1
        !            51: C_FLAGS += -I. -I- -I$(PROJECT_ROOT) -I$(PROJECT_ROOT)/main
        !            52: C_FLAGS += -I$(PROJECT_ROOT)/ext/standard -I$(PROJECT_ROOT)/netware
        !            53: C_FLAGS += -I$(PROJECT_ROOT)/zend -I$(PROJECT_ROOT)/tsrm
        !            54: C_FLAGS += -I$(SDK_DIR)/include -I$(MWCIncludes)
        !            55: C_FLAGS += -I$(EXPAT_DIR)/include
        !            56: 
        !            57: ifndef STACK_SIZE
        !            58: STACK_SIZE=8192
        !            59: endif
        !            60: 
        !            61: # Extra stuff based on debug / release builds
        !            62: ifeq '$(BUILD)' 'debug'
        !            63:        SYM_FILE = $(FINAL_DIR)\$(MODULE_NAME).sym
        !            64:        C_FLAGS  += -inline smart -sym on -sym codeview4 -opt off -opt intrinsics -sym internal -DDEBUGGING -DDKFBPON
        !            65:        C_FLAGS += -exc cw -DZEND_DEBUG=1
        !            66:        LD_FLAGS += -sym on -sym codeview4 -osym $(SYM_FILE)
        !            67:        export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtld.lib
        !            68: else
        !            69:        C_FLAGS  += -opt speed -inline on -inline smart -inline auto -sym off
        !            70:        C_FLAGS += -opt intrinsics
        !            71:        C_FLAGS += -opt level=4 -DZEND_DEBUG=0
        !            72:        LD_FLAGS += -sym off
        !            73:        export MWLibraryFiles=$(SDK_DIR)/imports/libcpre.o;mwcrtl.lib
        !            74: endif
        !            75: 
        !            76: # Dependencies
        !            77: MODULE = LibC     \
        !            78:          expatlbc \
        !            79:          phplib
        !            80: IMPORT = @$(SDK_DIR)/imports/libc.imp        \
        !            81:          @$(SDK_DIR)/imports/ws2nlm.imp      \
        !            82:          @$(MPK_DIR)/import/mpkOrg.imp       \
        !            83:          @$(EXPAT_DIR)/imports/expatlbc.imp             \
        !            84:          @$(PROJECT_ROOT)/netware/phplib.imp
        !            85: EXPORT = ($(MODULE_NAME)) get_module
        !            86: API =  OutputToScreen
        !            87: 
        !            88: 
        !            89: # Virtual paths
        !            90: vpath %.cpp .
        !            91: vpath %.c . ..\..\netware
        !            92: vpath %.obj $(OBJ_DIR)
        !            93: 
        !            94: 
        !            95: all: prebuild project
        !            96: 
        !            97: .PHONY: all
        !            98: 
        !            99: prebuild:
        !           100:        @if not exist $(OBJ_DIR) md $(OBJ_DIR)
        !           101: 
        !           102: project: $(BINARY)
        !           103:        @echo Build complete.
        !           104: 
        !           105: $(OBJ_DIR)/%.d: %.cpp
        !           106:        @echo Building Dependencies for $(<F)
        !           107:        @$(CC) -M $< $(C_FLAGS) -o $@
        !           108: 
        !           109: $(OBJ_DIR)/%.d: %.c
        !           110:        @echo Building Dependencies for $(<F)
        !           111:        @$(CC) -M $< $(C_FLAGS) -o $@
        !           112: 
        !           113: $(OBJ_DIR)/%.obj: %.cpp
        !           114:        @echo Compiling $?...
        !           115:        @$(CC) $< $(C_FLAGS) -o $@
        !           116:        
        !           117: $(OBJ_DIR)/%.obj: %.c
        !           118:        @echo Compiling $?...
        !           119:        @$(CC) $< $(C_FLAGS) -o $@
        !           120: 
        !           121: 
        !           122: $(BINARY): $(OBJECTS)
        !           123:        @echo Import $(IMPORT) > $(basename $@).def
        !           124: ifdef API
        !           125:        @echo Import $(API) >> $(basename $@).def
        !           126: endif
        !           127:        @echo Module $(MODULE) >> $(basename $@).def
        !           128: ifdef EXPORT
        !           129:        @echo Export $(EXPORT) >> $(basename $@).def
        !           130: endif
        !           131:        @echo AutoUnload >> $(basename $@).def
        !           132: ifeq '$(BUILD)' 'debug'
        !           133:        @echo Debug >> $(basename $@).def
        !           134: endif
        !           135:        @echo Flag_On 0x00000008 >> $(basename $@).def
        !           136:        @echo Start _LibCPrelude >> $(basename $@).def
        !           137:        @echo Exit _LibCPostlude >> $(basename $@).def
        !           138: 
        !           139:        $(MPKTOOL) $(XDCFLAGS) $(basename $@).xdc
        !           140:        @echo xdcdata $(basename $@).xdc >> $(basename $@).def
        !           141: 
        !           142:        @echo Linking $@...
        !           143:        @echo $(LD_FLAGS) -commandfile $(basename $@).def > $(basename $@).link
        !           144:        @echo $(LIBRARY) $(OBJECTS) >> $(basename $@).link
        !           145: 
        !           146:        @$(LINK) @$(basename $@).link
        !           147: 
        !           148: 
        !           149: .PHONY: clean
        !           150: clean: cleanobj cleanbin
        !           151: 
        !           152: .PHONY: cleand
        !           153: cleand:
        !           154:        @echo Deleting all dependency files...
        !           155:        -@del "$(OBJ_DIR)\*.d"
        !           156: 
        !           157: .PHONY: cleanobj
        !           158: cleanobj:
        !           159:        @echo Deleting all object files...
        !           160:        -@del "$(OBJ_DIR)\*.obj"
        !           161: 
        !           162: .PHONY: cleanbin
        !           163: cleanbin:
        !           164:        @echo Deleting binary files...
        !           165:        -@del "$(FINAL_DIR)\$(MODULE_NAME).nlm"
        !           166:        @echo Deleting MAP, DEF files, etc....
        !           167:        -@del "$(FINAL_DIR)\$(MODULE_NAME).map"
        !           168:        -@del "$(FINAL_DIR)\$(MODULE_NAME).def"
        !           169:        -@del "$(FINAL_DIR)\$(MODULE_NAME).link"
        !           170: ifeq '$(BUILD)' 'debug'
        !           171:        -@del $(FINAL_DIR)\$(MODULE_NAME).sym
        !           172: endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>