source:
branches/swt/git.diff@
22073
| Last change on this file since 22073 was 22073, checked in by , 11 years ago | |
|---|---|
| File size: 25.5 KB | |
-
$/rexx-with-CRLF.cmd
diff --git a/$/rexx-with-CRLF.cmd b/$/rexx-with-CRLF.cmd index 82798b2..e64ab26 100644
a b 1 /* Rexx */ 2 3 say ''; 4 say 'This script was git-svn committed with CRLF line endings.'; 5 say 'When checked out, this should still be the case.'; 6 say ''; 1 /* Rexx */ 2 3 say ''; 4 say 'This script was git-svn committed with CRLF line endings.'; 5 say 'When checked out, this should still be the case.'; 6 say ''; -
$/rexx-with-LF.cmd
diff --git a/$/rexx-with-LF.cmd b/$/rexx-with-LF.cmd index a096cf3..269bcab 100644
a b 1 /* Rexx */ 2 3 say ''; 4 say 'This script was git-committed with only LF line endings.'; 5 say 'When checked out with git-svn it should be converted to CRLF'; 6 say 'provided that the correct .gitattributes file is present.'; 7 say 'Behavior when checking out with svn will be tested next.'; 8 say ''; 1 /* Rexx */ 2 3 say ''; 4 say 'This script was git-committed with only LF line endings.'; 5 say 'When checked out with git-svn it should be converted to CRLF'; 6 say 'provided that the correct .gitattributes file is present.'; 7 say 'Behavior when checking out with svn will be tested next.'; 8 say ''; -
Config.kmk
diff --git a/Config.kmk b/Config.kmk index 612f721..ded33f8 100644
a b 1 ## @file 2 # Global Project Configuration File 3 # 4 5 #------------------------------------------------------------------------------ 6 # Global definitions 7 #------------------------------------------------------------------------------ 8 9 # 10 # @todo kBuild forgets to do that on OS/2 11 # 12 INST_DLL = bin/ 13 14 # 15 # Watcom Linker is required because of some Watcom-specific directives (used 16 # e.g. to compensate for the lack of SEGMENTS support in .DEF in emxomfld, see 17 # svn.netlabs.org/libc/ticket/252). Besides, it's more stable than the outdated 18 # IBM linker. 19 # 20 ifn1of ($(EMXOMFLD_TYPE),WLINK wlink) 21 $(error You must use Watcom Linker and set EMXOMFLD_TYPE to WLINK (it's now $(EMXOMFLD_TYPE))) 22 endif 23 24 # 25 # TCPV40HDRS requires an alternative libsocket.lib located in a separate directory. 26 # Try to deduce it. 27 # 28 PATH_GCC_LIB_TCPIPV4 := $(dir $(shell gcc -print-file-name=libsocket.lib))/tcpipv4 29 ifeq ($(PATH_GCC_LIB_TCPIPV4),/tcpipv4) 30 $(error Could not detect the GCC TCPIPV4 socket library path.) 31 endif 32 33 ## 34 # Defines an import library target for the given DLL target. 35 # 36 # @param 1 DLL target name. 37 # @param 2 .def file (defaults to <1>.def). 38 # @param 3 .def file for debug (defaults to <2>). 39 # @param 4 list of object files containing additional exports. 40 # @param 5 non-empty to disable .def post-processing with ImpDef. 41 # 42 odin_implib = $(evalcall odin_implib_common,$(1),$(2),$(3),$(4),$(5)) 43 44 define odin_implib_common 45 local target := $(1) 46 local def := $(abspath $(PATH_SUB_CURRENT)/$(if $(2),$(2),$(1).def)) 47 local def_exp := $(notdir $(basename $(def))).exp.def 48 ifneq ($(3),) 49 #local def_debug := $(abspath $(PATH_SUB_CURRENT)/$(3)) 50 #local def_exp_debug := $(notdir $(basename $(def_debug))).exp.def 51 endif 52 local obj_list := $(4) 53 local do_def_exp := $(if $(5),,1) 54 $(eval $(def_odin_implib)) 55 endef 56 57 define def_odin_implib 58 LIBRARIES += $(target)_imp 59 $(target)_imp_TEMPLATE = OdinCxx 60 $(target)_imp_NAME = $(target) 61 $$$$($(target)_imp_0_OUTDIR)/$(def_exp): $(def) \ 62 $(addsuffix $$$$(TOOL_GXX3OMF_COBJSUFF), \ 63 $(addprefix $$$$($(target)_0_OUTDIR)/,$(obj_list))) \ 64 $$(PATH_STAGE_BIN)/impdef.exe | $$$$(dir $$$$@) 65 %$$(call MSG_TOOL,impdef,$(target)_imp,$(abspath $$<),$$@) 66 ifneq ($(do_def_exp),) 67 $(QUIET2)$$(PATH_STAGE_BIN)/impdef.exe $(def) $$@ 68 else 69 $(QUIET2)$(CP) $(def) $$@ 70 endif 71 ifneq ($(obj_list),) 72 $(QUIET2)emxexp.exe \ 73 $(addsuffix $$(TOOL_GXX3OMF_COBJSUFF), \ 74 $(addprefix $$($(target)_0_OUTDIR)/,$(obj_list))) >> $$@ 75 endif 76 ifeq ($(def_exp_debug),) 77 ifneq ($(do_def_exp)$(obj_list),) 78 $(target)_imp_SOURCES = $$($(target)_imp_0_OUTDIR)/$(def_exp) 79 $(target)_imp_CLEAN += $$($(target)_imp_0_OUTDIR)/$(def_exp) 80 else 81 $(target)_imp_SOURCES = $(def) 82 endif 83 else 84 ifneq ($(do_def_exp)$(obj_list),) 85 $(target)_imp_SOURCES.release = $$($(target)_imp_0_OUTDIR)/$(def_exp) 86 $(target)_imp_CLEAN.release += $$($(target)_imp_0_OUTDIR)/$(def_exp) 87 $$$$($(target)_imp_0_OUTDIR)/$(def_exp_debug): $(def_debug) \ 88 $(addsuffix $$$$(TOOL_GXX3OMF_COBJSUFF), \ 89 $(addprefix $$$$($(target)_0_OUTDIR)/,$(obj_list))) \ 90 $$(PATH_STAGE_BIN)/impdef.exe | $$$$(dir $$$$@) 91 %$$(call MSG_TOOL,impdef,$(target)_imp,$(abspath $$<),$$@) 92 ifneq ($(do_def_exp),) 93 $(QUIET2)$$(PATH_STAGE_BIN)/impdef.exe $(def_debug) $$@ 94 else 95 $(QUIET2)$(CP) $(def_debug) $$@ 96 endif 97 ifneq ($(obj_list),) 98 $(QUIET2)emxexp.exe \ 99 $(addsuffix $$(TOOL_GXX3OMF_COBJSUFF), \ 100 $(addprefix $$($(target)_0_OUTDIR)/,$(obj_list))) >> $$@ 101 endif 102 $(target)_imp_SOURCES.debug = $$($(target)_imp_0_OUTDIR)/$(def_exp_debug) 103 $(target)_imp_CLEAN.debug += $$($(target)_imp_0_OUTDIR)/$(def_exp_debug) 104 else 105 $(target)_imp_SOURCES.release = $(def) 106 $(target)_imp_SOURCES.debug = $(def_debug) 107 endif 108 endif 109 endef 110 111 ## 112 # Shortcut to $(call odin_implib,<1>,<2>,<3>,<4>,1) used to disable .def file 113 # post-processing with the ImpDef tool. 114 # 115 # @param 1 DLL target name. 116 # @param 2 .def file (defaults to <1>.def). 117 # @param 3 .def file for debug (defaults to <2>). 118 # @param 4 list of object files containing additional exports. 119 # 120 odin_implib_no_expdef = $(call odin_implib,$(1),$(2),$(3),$(4),1) 121 122 ## 123 # Shortcut to $(call odin_implib, <1>,<1>.def,<1>dbg.def,<2>). 124 # 125 # @param 1 DLL target name. 126 # @param 2 list of object files containing additional exports. 127 # 128 odin_implib_2 = $(call odin_implib,$(1),$(1).def,$(1)dbg.def,$(2)) 129 130 ## 131 # Shortcut to $(call odin_implib_no_expdef,<1>,<1>.def,<1>dbg.def,<2>). 132 # 133 # @param 1 DLL target name. 134 # @param 2 list of object files containing additional exports. 135 # 136 odin_implib_2_no_expdef = $(call odin_implib_no_expdef,$(1),$(1).def,$(1)dbg.def,$(2)) 137 138 # 139 # Handler for Wine RC (.orc) source files 140 # 141 KBUILD_SRC_HANDLERS += .orc:def_src_handler_wrc 142 define def_src_handler_wrc 143 local type := WRC 144 $(kb-src-one 2) 145 endef 146 PROPS_ACCUMULATE_R += WRCFLAGS 147 148 # 149 # Override handler for .asm files to compile them with the MASM-compilant tool 150 # 151 KBUILD_SRC_HANDLERS := .asm:def_src_handler_masm $(KBUILD_SRC_HANDLERS) 152 define def_src_handler_masm 153 local type := $(if $(TOOL_$(tool)_COMPILE_MASM_CMDS),MASM,AS) 154 $(kb-src-one 2) 155 endef 156 PROPS_ACCUMULATE_R += $(if $(TOOL_$(tool)_COMPILE_MASM_CMDS),MASM,AS)FLAGS 157 158 # 159 # Handler for .def files to add bldlevel info to them 160 # 161 define def_src_handler_def 162 local type := DEF 163 $(kb-src-one 2) 164 #.NOTPARALLEL: $(obj) # BldLevelInf.cmd can't open files in parallel 165 endef 166 167 #------------------------------------------------------------------------------ 168 # Tools 169 #------------------------------------------------------------------------------ 170 171 # 172 # Add support for Wine RC to the GCC compiler 173 # 174 TOOL_GXX3OMF_WRC = $(PATH_STAGE_BIN)/winerc.exe 175 TOOL_GXX3OMF_WRCOBJSUFF = .orc$(TOOL_GXX3OMF_COBJSUFF) 176 TOOL_GXX3OMF_WRCFLAGS = 177 TOOL_GXX3OMF_COMPILE_WRC_OUTPUT = $(outbase).orc.s 178 TOOL_GXX3OMF_COMPILE_WRC_DEPEND = $(TOOL_GXX3OMF_WRC) 179 TOOL_GXX3OMF_COMPILE_WRC_DEPORD = 180 define TOOL_GXX3OMF_COMPILE_WRC_CMDS 181 $(QUIET)$(TOOL_GXX3OMF_WRC) -s -I$(subst /,\\,$(abspath $(dir $(source))))\ 182 $(flags) $(addprefix -I, $(subst /,\\,$(incs))) $(addprefix -D, $(defs))\ 183 $(subst /,\\,$(abspath $(source))) \ 184 -o $(TOOL_GXX3OMF_COMPILE_WRC_OUTPUT) 185 $(QUIET)$(TOOL_GXX3OMF_CC) -E -I$(subst /,\\,$(abspath $(dir $(source))))\ 186 $(addprefix -I, $(incs)) -I . $(addprefix -D, $(defs))\ 187 -x c $(abspath $(source)) \ 188 | $(DEP_PRE) -f -s -o $(dep) -t $(obj) - 189 $(subst $(source),$(TOOL_GXX3OMF_COMPILE_WRC_OUTPUT),\ 190 $(subst $(flags),,$(TOOL_GXX3OMF_COMPILE_AS_CMDS))) 191 endef 192 193 # 194 # Add support for MASM to the GCC compiler 195 # 196 TOOL_GXX3OMF_MASM = $(PATH_TOOL_ALP) 197 TOOL_GXX3OMF_MASMFLAGS = -Mb 198 TOOL_GXX3OMF_COMPILE_MASM_OUTPUT = $(outbase).lst 199 TOOL_GXX3OMF_COMPILE_MASM_DEPEND = 200 TOOL_GXX3OMF_COMPILE_MASM_DEPORD = 201 define TOOL_GXX3OMF_COMPILE_MASM_CMDS 202 $(QUIET)$(TOOL_GXX3OMF_MASM) -D:__GNUC__ -D:__EMX__\ 203 $(flags) $(addsuffix /,$(addprefix -I:, $(incs))) $(addprefix -D:, $(defs))\ 204 $(source)\ 205 -Fl:$(outbase).lst\ 206 -Fd:$(dep)\ 207 -Fo:$(obj) 208 endef 209 210 # 211 # Add support for DEF file bldlevel info generator to the GCC compiler 212 # 213 TOOL_GXX3OMF_DEF = $(PATH_ROOT)/tools/bin/BldLevelInf.cmd 214 TOOL_GXX3OMF_DEFOBJSUFF = .bldlevel.def 215 TOOL_GXX3OMF_COMPILE_DEF_OUTPUT = 216 TOOL_GXX3OMF_COMPILE_DEF_DEPEND = $(PATH_ROOT)/include/odinbuild.h 217 TOOL_GXX3OMF_COMPILE_DEF_DEPORD = 218 define TOOL_GXX3OMF_COMPILE_DEF_CMDS 219 $(QUIET)cmd /c 'set BUILD_QUIET=1 && $(TOOL_GXX3OMF_DEF)\ 220 $(source) $(outbase).bldlevel.def\ 221 -R"$(source)"\ 222 -V"#define=ODIN32_VERSION,$(subst /,/,$(PATH_ROOT)/include/odinbuild.h)"\ 223 -M"#define=ODIN32_BUILD_NR,$(subst /,/,$(PATH_ROOT)/include/odinbuild.h)"' 224 endef 225 226 #------------------------------------------------------------------------------ 227 # Common libraries referenced by components 228 #------------------------------------------------------------------------------ 229 230 #------------------------------------------------------------------------------ 231 # General Stuff 232 #------------------------------------------------------------------------------ 233 234 KBUILD_UNIT_PATHS += $(PATH_ROOT) 235 236 TEMPLATE_OdinCxx = Odin C/C++ sources 237 TEMPLATE_OdinCxx_USES = Extra 238 TEMPLATE_OdinCxx_TOOL = GXX3OMF 239 TEMPLATE_OdinCxx_INCS = $(PATH_ROOT)/include/win $(PATH_ROOT)/include $(PATH_ROOT)/include/incl_gcc 240 TEMPLATE_OdinCxx_DEFS = USE_OS2_TOOLKIT_HEADERS OS2EMX_PLAIN_CHAR \ 241 __WIN32OS2__ __i386__ 242 TEMPLATE_OdinCxx_DEFS.debug = DEBUG 243 TEMPLATE_OdinCxx_LDFLAGS = -Zlinker '"DISABLE 1121"' 244 245 # generate .sym files but don't put them in a separate dir 246 TEMPLATE_OdinCxx_LD_DEBUG = split 247 TEMPLATE_OdinCxx_DEBUG_STAGE = nul 248 249 TEMPLATE_OdinBin = Odin DLL or EXE 250 TEMPLATE_OdinBin_EXTENDS = OdinCxx 251 252 # Override DEF handler to add bldlevel info to .DEF files 253 TEMPLATE_OdinBin_SRC_HANDLERS = .def:def_src_handler_def 254 255 TEMPLATE_OdinDLL = Odin DLL 256 TEMPLATE_OdinDLL_EXTENDS = OdinBin 257 TEMPLATE_OdinDLL_EXTENDS_BY = appending 258 TEMPLATE_OdinDLL_DEFS = $(TEMPLATE_OdinCxx_DEFS) __WINE__ COMCTL32UNDOC TCPV40HDRS __USE_LIBC_TCPIP 259 TEMPLATE_OdinDLL_LIBS = $(PATH_STAGE_LIB)/odincrt.lib \ 260 $(PATH_STAGE_LIB)/initdll.lib 261 TEMPLATE_OdinDLL_LDFLAGS = -L$(PATH_GCC_LIB_TCPIPV4) # necessary for TCPV40HDRS 262 TEMPLATE_OdinDLL_LDFLAGS += KMK_NOIMPLIB # disable automatic implib 263 TEMPLATE_OdinDLL_WRCFLAGS = -p_$(target) 264 265 TEMPLATE_OdinSimpleDLL = Odin DLL with ordinary entry point 266 TEMPLATE_OdinSimpleDLL_EXTENDS = OdinDLL 267 TEMPLATE_OdinSimpleDLL_EXTENDS_BY = overriding 268 TEMPLATE_OdinSimpleDLL_LIBS = $(PATH_STAGE_LIB)/dllentry.o $(TEMPLATE_OdinDLL_LIBS) 269 TEMPLATE_OdinSimpleDLL_WRCFLAGS = -p_Resource 270 271 TEMPLATE_OdinCRT = OdinCRT DLL 272 TEMPLATE_OdinCRT_EXTENDS = OdinBin 273 TEMPLATE_OdinCRT_EXTENDS_BY = appending 274 TEMPLATE_OdinCRT_DEFS = __WINE__ 275 TEMPLATE_OdinCRT_LIBS = $(PATH_STAGE_LIB)/initdll.lib 276 TEMPLATE_OdinCRT_LDFLAGS += KMK_NOIMPLIB # disable automatic implib 277 278 TEMPLATE_OdinApp = Odin application 279 TEMPLATE_OdinApp_EXTENDS = OdinBin 280 281 TEMPLATE_OdinTestApp = Odin application 282 TEMPLATE_OdinTestApp_EXTENDS= OdinApp 283 TEMPLATE_OdinTestApp_STAGE = tests/ 284 285 #------------------------------------------------------------------------------ 286 # GCC Stuff 287 #------------------------------------------------------------------------------ 288 289 #------------------------------------------------------------------------------ 290 # Other Stuff 291 #------------------------------------------------------------------------------ 292 293 # 294 # Include a site-specific config for local overrides 295 # 296 ifndef LOCALCFG 297 LOCALCFG := $(wildcard $(PATH_ROOT)/LocalConfig.kmk) 298 ifneq ($(LOCALCFG),) 299 include $(LOCALCFG) 300 endif 301 endif 302 303 #------------------------------------------------------------------------------ 304 # Post-processing 305 #------------------------------------------------------------------------------ 306 307 ifeq ($(PATH_TOOL_ALP),) 308 ifneq ($(PATH_SDK_OS2TK4),) 309 PATH_TOOL_ALP := $(PATH_SDK_OS2TK4)/bin/alp.exe 310 else 311 PATH_TOOL_ALP := alp.exe 312 endif 313 endif 314 315 ifneq ($(PATH_SDK_OS2TK4),) 316 # 317 # We can't add Toolkit includes in _INCS (it will casuse then to be searched 318 # before GCC headers and lead to conflicts), so use -idirafter. 319 # 320 TEMPLATE_OdinCxx_CFLAGS += -idirafter $(PATH_SDK_OS2TK4)/h 321 TEMPLATE_OdinCxx_CXXFLAGS += -idirafter $(PATH_SDK_OS2TK4)/h 322 endif 1 ## @file 2 # Global Project Configuration File 3 # 4 5 #------------------------------------------------------------------------------ 6 # Global definitions 7 #------------------------------------------------------------------------------ 8 9 # 10 # @todo kBuild forgets to do that on OS/2 11 # 12 INST_DLL = bin/ 13 14 # 15 # Watcom Linker is required because of some Watcom-specific directives (used 16 # e.g. to compensate for the lack of SEGMENTS support in .DEF in emxomfld, see 17 # svn.netlabs.org/libc/ticket/252). Besides, it's more stable than the outdated 18 # IBM linker. 19 # 20 ifn1of ($(EMXOMFLD_TYPE),WLINK wlink) 21 $(error You must use Watcom Linker and set EMXOMFLD_TYPE to WLINK (it's now $(EMXOMFLD_TYPE))) 22 endif 23 24 # 25 # TCPV40HDRS requires an alternative libsocket.lib located in a separate directory. 26 # Try to deduce it. 27 # 28 PATH_GCC_LIB_TCPIPV4 := $(dir $(shell gcc -print-file-name=libsocket.lib))/tcpipv4 29 ifeq ($(PATH_GCC_LIB_TCPIPV4),/tcpipv4) 30 $(error Could not detect the GCC TCPIPV4 socket library path.) 31 endif 32 33 ## 34 # Defines an import library target for the given DLL target. 35 # 36 # @param 1 DLL target name. 37 # @param 2 .def file (defaults to <1>.def). 38 # @param 3 .def file for debug (defaults to <2>). 39 # @param 4 list of object files containing additional exports. 40 # @param 5 non-empty to disable .def post-processing with ImpDef. 41 # 42 odin_implib = $(evalcall odin_implib_common,$(1),$(2),$(3),$(4),$(5)) 43 44 define odin_implib_common 45 local target := $(1) 46 local def := $(abspath $(PATH_SUB_CURRENT)/$(if $(2),$(2),$(1).def)) 47 local def_exp := $(notdir $(basename $(def))).exp.def 48 ifneq ($(3),) 49 #local def_debug := $(abspath $(PATH_SUB_CURRENT)/$(3)) 50 #local def_exp_debug := $(notdir $(basename $(def_debug))).exp.def 51 endif 52 local obj_list := $(4) 53 local do_def_exp := $(if $(5),,1) 54 $(eval $(def_odin_implib)) 55 endef 56 57 define def_odin_implib 58 LIBRARIES += $(target)_imp 59 $(target)_imp_TEMPLATE = OdinCxx 60 $(target)_imp_NAME = $(target) 61 $$$$($(target)_imp_0_OUTDIR)/$(def_exp): $(def) \ 62 $(addsuffix $$$$(TOOL_GXX3OMF_COBJSUFF), \ 63 $(addprefix $$$$($(target)_0_OUTDIR)/,$(obj_list))) \ 64 $$(PATH_STAGE_BIN)/impdef.exe | $$$$(dir $$$$@) 65 %$$(call MSG_TOOL,impdef,$(target)_imp,$(abspath $$<),$$@) 66 ifneq ($(do_def_exp),) 67 $(QUIET2)$$(PATH_STAGE_BIN)/impdef.exe $(def) $$@ 68 else 69 $(QUIET2)$(CP) $(def) $$@ 70 endif 71 ifneq ($(obj_list),) 72 $(QUIET2)emxexp.exe \ 73 $(addsuffix $$(TOOL_GXX3OMF_COBJSUFF), \ 74 $(addprefix $$($(target)_0_OUTDIR)/,$(obj_list))) >> $$@ 75 endif 76 ifeq ($(def_exp_debug),) 77 ifneq ($(do_def_exp)$(obj_list),) 78 $(target)_imp_SOURCES = $$($(target)_imp_0_OUTDIR)/$(def_exp) 79 $(target)_imp_CLEAN += $$($(target)_imp_0_OUTDIR)/$(def_exp) 80 else 81 $(target)_imp_SOURCES = $(def) 82 endif 83 else 84 ifneq ($(do_def_exp)$(obj_list),) 85 $(target)_imp_SOURCES.release = $$($(target)_imp_0_OUTDIR)/$(def_exp) 86 $(target)_imp_CLEAN.release += $$($(target)_imp_0_OUTDIR)/$(def_exp) 87 $$$$($(target)_imp_0_OUTDIR)/$(def_exp_debug): $(def_debug) \ 88 $(addsuffix $$$$(TOOL_GXX3OMF_COBJSUFF), \ 89 $(addprefix $$$$($(target)_0_OUTDIR)/,$(obj_list))) \ 90 $$(PATH_STAGE_BIN)/impdef.exe | $$$$(dir $$$$@) 91 %$$(call MSG_TOOL,impdef,$(target)_imp,$(abspath $$<),$$@) 92 ifneq ($(do_def_exp),) 93 $(QUIET2)$$(PATH_STAGE_BIN)/impdef.exe $(def_debug) $$@ 94 else 95 $(QUIET2)$(CP) $(def_debug) $$@ 96 endif 97 ifneq ($(obj_list),) 98 $(QUIET2)emxexp.exe \ 99 $(addsuffix $$(TOOL_GXX3OMF_COBJSUFF), \ 100 $(addprefix $$($(target)_0_OUTDIR)/,$(obj_list))) >> $$@ 101 endif 102 $(target)_imp_SOURCES.debug = $$($(target)_imp_0_OUTDIR)/$(def_exp_debug) 103 $(target)_imp_CLEAN.debug += $$($(target)_imp_0_OUTDIR)/$(def_exp_debug) 104 else 105 $(target)_imp_SOURCES.release = $(def) 106 $(target)_imp_SOURCES.debug = $(def_debug) 107 endif 108 endif 109 endef 110 111 ## 112 # Shortcut to $(call odin_implib,<1>,<2>,<3>,<4>,1) used to disable .def file 113 # post-processing with the ImpDef tool. 114 # 115 # @param 1 DLL target name. 116 # @param 2 .def file (defaults to <1>.def). 117 # @param 3 .def file for debug (defaults to <2>). 118 # @param 4 list of object files containing additional exports. 119 # 120 odin_implib_no_expdef = $(call odin_implib,$(1),$(2),$(3),$(4),1) 121 122 ## 123 # Shortcut to $(call odin_implib, <1>,<1>.def,<1>dbg.def,<2>). 124 # 125 # @param 1 DLL target name. 126 # @param 2 list of object files containing additional exports. 127 # 128 odin_implib_2 = $(call odin_implib,$(1),$(1).def,$(1)dbg.def,$(2)) 129 130 ## 131 # Shortcut to $(call odin_implib_no_expdef,<1>,<1>.def,<1>dbg.def,<2>). 132 # 133 # @param 1 DLL target name. 134 # @param 2 list of object files containing additional exports. 135 # 136 odin_implib_2_no_expdef = $(call odin_implib_no_expdef,$(1),$(1).def,$(1)dbg.def,$(2)) 137 138 # 139 # Handler for Wine RC (.orc) source files 140 # 141 KBUILD_SRC_HANDLERS += .orc:def_src_handler_wrc 142 define def_src_handler_wrc 143 local type := WRC 144 $(kb-src-one 2) 145 endef 146 PROPS_ACCUMULATE_R += WRCFLAGS 147 148 # 149 # Override handler for .asm files to compile them with the MASM-compilant tool 150 # 151 KBUILD_SRC_HANDLERS := .asm:def_src_handler_masm $(KBUILD_SRC_HANDLERS) 152 define def_src_handler_masm 153 local type := $(if $(TOOL_$(tool)_COMPILE_MASM_CMDS),MASM,AS) 154 $(kb-src-one 2) 155 endef 156 PROPS_ACCUMULATE_R += $(if $(TOOL_$(tool)_COMPILE_MASM_CMDS),MASM,AS)FLAGS 157 158 # 159 # Handler for .def files to add bldlevel info to them 160 # 161 define def_src_handler_def 162 local type := DEF 163 $(kb-src-one 2) 164 #.NOTPARALLEL: $(obj) # BldLevelInf.cmd can't open files in parallel 165 endef 166 167 #------------------------------------------------------------------------------ 168 # Tools 169 #------------------------------------------------------------------------------ 170 171 # 172 # Add support for Wine RC to the GCC compiler 173 # 174 TOOL_GXX3OMF_WRC = $(PATH_STAGE_BIN)/winerc.exe 175 TOOL_GXX3OMF_WRCOBJSUFF = .orc$(TOOL_GXX3OMF_COBJSUFF) 176 TOOL_GXX3OMF_WRCFLAGS = 177 TOOL_GXX3OMF_COMPILE_WRC_OUTPUT = $(outbase).orc.s 178 TOOL_GXX3OMF_COMPILE_WRC_DEPEND = $(TOOL_GXX3OMF_WRC) 179 TOOL_GXX3OMF_COMPILE_WRC_DEPORD = 180 define TOOL_GXX3OMF_COMPILE_WRC_CMDS 181 $(QUIET)$(TOOL_GXX3OMF_WRC) -s -I$(subst /,\\,$(abspath $(dir $(source))))\ 182 $(flags) $(addprefix -I, $(subst /,\\,$(incs))) $(addprefix -D, $(defs))\ 183 $(subst /,\\,$(abspath $(source))) \ 184 -o $(TOOL_GXX3OMF_COMPILE_WRC_OUTPUT) 185 $(QUIET)$(TOOL_GXX3OMF_CC) -E -I$(subst /,\\,$(abspath $(dir $(source))))\ 186 $(addprefix -I, $(incs)) -I . $(addprefix -D, $(defs))\ 187 -x c $(abspath $(source)) \ 188 | $(DEP_PRE) -f -s -o $(dep) -t $(obj) - 189 $(subst $(source),$(TOOL_GXX3OMF_COMPILE_WRC_OUTPUT),\ 190 $(subst $(flags),,$(TOOL_GXX3OMF_COMPILE_AS_CMDS))) 191 endef 192 193 # 194 # Add support for MASM to the GCC compiler 195 # 196 TOOL_GXX3OMF_MASM = $(PATH_TOOL_ALP) 197 TOOL_GXX3OMF_MASMFLAGS = -Mb 198 TOOL_GXX3OMF_COMPILE_MASM_OUTPUT = $(outbase).lst 199 TOOL_GXX3OMF_COMPILE_MASM_DEPEND = 200 TOOL_GXX3OMF_COMPILE_MASM_DEPORD = 201 define TOOL_GXX3OMF_COMPILE_MASM_CMDS 202 $(QUIET)$(TOOL_GXX3OMF_MASM) -D:__GNUC__ -D:__EMX__\ 203 $(flags) $(addsuffix /,$(addprefix -I:, $(incs))) $(addprefix -D:, $(defs))\ 204 $(source)\ 205 -Fl:$(outbase).lst\ 206 -Fd:$(dep)\ 207 -Fo:$(obj) 208 endef 209 210 # 211 # Add support for DEF file bldlevel info generator to the GCC compiler 212 # 213 TOOL_GXX3OMF_DEF = $(PATH_ROOT)/tools/bin/BldLevelInf.cmd 214 TOOL_GXX3OMF_DEFOBJSUFF = .bldlevel.def 215 TOOL_GXX3OMF_COMPILE_DEF_OUTPUT = 216 TOOL_GXX3OMF_COMPILE_DEF_DEPEND = $(PATH_ROOT)/include/odinbuild.h 217 TOOL_GXX3OMF_COMPILE_DEF_DEPORD = 218 define TOOL_GXX3OMF_COMPILE_DEF_CMDS 219 $(QUIET)cmd /c 'set BUILD_QUIET=1 && $(TOOL_GXX3OMF_DEF)\ 220 $(source) $(outbase).bldlevel.def\ 221 -R"$(source)"\ 222 -V"#define=ODIN32_VERSION,$(subst /,/,$(PATH_ROOT)/include/odinbuild.h)"\ 223 -M"#define=ODIN32_BUILD_NR,$(subst /,/,$(PATH_ROOT)/include/odinbuild.h)"' 224 endef 225 226 #------------------------------------------------------------------------------ 227 # Common libraries referenced by components 228 #------------------------------------------------------------------------------ 229 230 #------------------------------------------------------------------------------ 231 # General Stuff 232 #------------------------------------------------------------------------------ 233 234 KBUILD_UNIT_PATHS += $(PATH_ROOT) 235 236 TEMPLATE_OdinCxx = Odin C/C++ sources 237 TEMPLATE_OdinCxx_USES = Extra 238 TEMPLATE_OdinCxx_TOOL = GXX3OMF 239 TEMPLATE_OdinCxx_INCS = $(PATH_ROOT)/include/win $(PATH_ROOT)/include $(PATH_ROOT)/include/incl_gcc 240 TEMPLATE_OdinCxx_DEFS = USE_OS2_TOOLKIT_HEADERS OS2EMX_PLAIN_CHAR \ 241 __WIN32OS2__ __i386__ 242 TEMPLATE_OdinCxx_DEFS.debug = DEBUG 243 TEMPLATE_OdinCxx_LDFLAGS = -Zlinker '"DISABLE 1121"' 244 245 # generate .sym files but don't put them in a separate dir 246 TEMPLATE_OdinCxx_LD_DEBUG = split 247 TEMPLATE_OdinCxx_DEBUG_STAGE = nul 248 249 TEMPLATE_OdinBin = Odin DLL or EXE 250 TEMPLATE_OdinBin_EXTENDS = OdinCxx 251 252 # Override DEF handler to add bldlevel info to .DEF files 253 TEMPLATE_OdinBin_SRC_HANDLERS = .def:def_src_handler_def 254 255 TEMPLATE_OdinDLL = Odin DLL 256 TEMPLATE_OdinDLL_EXTENDS = OdinBin 257 TEMPLATE_OdinDLL_EXTENDS_BY = appending 258 TEMPLATE_OdinDLL_DEFS = $(TEMPLATE_OdinCxx_DEFS) __WINE__ COMCTL32UNDOC TCPV40HDRS __USE_LIBC_TCPIP 259 TEMPLATE_OdinDLL_LIBS = $(PATH_STAGE_LIB)/odincrt.lib \ 260 $(PATH_STAGE_LIB)/initdll.lib 261 TEMPLATE_OdinDLL_LDFLAGS = -L$(PATH_GCC_LIB_TCPIPV4) # necessary for TCPV40HDRS 262 TEMPLATE_OdinDLL_LDFLAGS += KMK_NOIMPLIB # disable automatic implib 263 TEMPLATE_OdinDLL_WRCFLAGS = -p_$(target) 264 265 TEMPLATE_OdinSimpleDLL = Odin DLL with ordinary entry point 266 TEMPLATE_OdinSimpleDLL_EXTENDS = OdinDLL 267 TEMPLATE_OdinSimpleDLL_EXTENDS_BY = overriding 268 TEMPLATE_OdinSimpleDLL_LIBS = $(PATH_STAGE_LIB)/dllentry.o $(TEMPLATE_OdinDLL_LIBS) 269 TEMPLATE_OdinSimpleDLL_WRCFLAGS = -p_Resource 270 271 TEMPLATE_OdinCRT = OdinCRT DLL 272 TEMPLATE_OdinCRT_EXTENDS = OdinBin 273 TEMPLATE_OdinCRT_EXTENDS_BY = appending 274 TEMPLATE_OdinCRT_DEFS = __WINE__ 275 TEMPLATE_OdinCRT_LIBS = $(PATH_STAGE_LIB)/initdll.lib 276 TEMPLATE_OdinCRT_LDFLAGS += KMK_NOIMPLIB # disable automatic implib 277 278 TEMPLATE_OdinApp = Odin application 279 TEMPLATE_OdinApp_EXTENDS = OdinBin 280 281 TEMPLATE_OdinTestApp = Odin application 282 TEMPLATE_OdinTestApp_EXTENDS= OdinApp 283 TEMPLATE_OdinTestApp_STAGE = tests/ 284 285 #------------------------------------------------------------------------------ 286 # GCC Stuff 287 #------------------------------------------------------------------------------ 288 289 #------------------------------------------------------------------------------ 290 # Other Stuff 291 #------------------------------------------------------------------------------ 292 293 # 294 # Include a site-specific config for local overrides 295 # 296 ifndef LOCALCFG 297 LOCALCFG := $(wildcard $(PATH_ROOT)/LocalConfig.kmk) 298 ifneq ($(LOCALCFG),) 299 include $(LOCALCFG) 300 endif 301 endif 302 303 #------------------------------------------------------------------------------ 304 # Post-processing 305 #------------------------------------------------------------------------------ 306 307 ifeq ($(PATH_TOOL_ALP),) 308 ifneq ($(PATH_SDK_OS2TK4),) 309 PATH_TOOL_ALP := $(PATH_SDK_OS2TK4)/bin/alp.exe 310 else 311 PATH_TOOL_ALP := alp.exe 312 endif 313 endif 314 315 ifneq ($(PATH_SDK_OS2TK4),) 316 # 317 # We can't add Toolkit includes in _INCS (it will casuse then to be searched 318 # before GCC headers and lead to conflicts), so use -idirafter. 319 # 320 TEMPLATE_OdinCxx_CFLAGS += -idirafter $(PATH_SDK_OS2TK4)/h 321 TEMPLATE_OdinCxx_CXXFLAGS += -idirafter $(PATH_SDK_OS2TK4)/h 322 endif -
Makefile.kmk
diff --git a/Makefile.kmk b/Makefile.kmk index 196c17a..3b13f74 100644
a b 1 ## @file 2 # Top-level makefile 3 # 4 5 SUB_DEPTH = . 6 include $(KBUILD_PATH)/subheader.kmk 7 8 # 9 # Include sub-makefiles. 10 # 11 include $(PATH_SUB_CURRENT)/lib/Makefile.kmk 12 include $(PATH_SUB_CURRENT)/tools/Makefile.kmk 13 include $(PATH_SUB_CURRENT)/src/Makefile.kmk 14 15 include $(FILE_KBUILD_SUB_FOOTER) 1 ## @file 2 # Top-level makefile 3 # 4 5 SUB_DEPTH = . 6 include $(KBUILD_PATH)/subheader.kmk 7 8 # 9 # Include sub-makefiles. 10 # 11 include $(PATH_SUB_CURRENT)/lib/Makefile.kmk 12 include $(PATH_SUB_CURRENT)/tools/Makefile.kmk 13 include $(PATH_SUB_CURRENT)/src/Makefile.kmk 14 15 include $(FILE_KBUILD_SUB_FOOTER)
Note:
See TracBrowser
for help on using the repository browser.
