Subversion Repositories DevTools

Rev

Rev 227 | Rev 303 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 227 Rev 255
Line 20... Line 20...
20
USE_WALL	= 1
20
USE_WALL	= 1
21
endif
21
endif
22
 
22
 
23
endif
23
endif
24
 
24
 
25
 
-
 
26
###############################################################################
25
###############################################################################
27
#   Standard library paths
26
#   Standard library paths
28
#   Export LIB as this is used by the library generation process to determine
27
#   Export CS_LIB as this is used by the library generation process to determine
29
#   the locations of libraries. cmdfile will use 'LIB" for vglob resolving
28
#   the locations of libraries. cmdfile will use 'CS_LIB" for vglob resolving
-
 
29
#   process.
30
#
30
#
-
 
31
#	VC_LIB	    - Lib paths from Compiler toolkit
-
 
32
#		    - ';' seperated path list
-
 
33
#		    - Uses \ or / as a dir sep
-
 
34
#		    - Uses real spaces in pathnames
-
 
35
#		    - Should be Absolute Paths
-
 
36
#                   
-
 
37
#	LIBDIRS	    - Lib paths from JATS
-
 
38
#		    - Space seperated path list
-
 
39
#		    - Uses / as dir sep
31
#   Take care of spaces
40
#		    - Must not contain spaces
-
 
41
#		    - Will be Relative
-
 
42
#
-
 
43
#	ALL_LIBDIRS and LIB
-
 
44
#		    - Only contain valid paths
-
 
45
#		      VS2005 will complain about bad LIB entries
-
 
46
#		      Use $(wildcard ...) to limit to test for existence
-
 
47
#		    - Contain absolute paths
-
 
48
#		      msdev/devenv don't work with relative paths
-
 
49
#		      Use $(abspath ...) to convert
32
#
50
#
-
 
51
#	ALL_LIBDIRS - Used internally
-
 
52
#		    - Space seperated path list
-
 
53
#		    - Uses / as dir sep
-
 
54
#		    - Uses %20 as a altspace in pathnames
-
 
55
#                   
-
 
56
#	LIB         - Exported to tools
-
 
57
#		    - ';' seperated path list
-
 
58
#		    - Uses \ as a dir sep
-
 
59
#		    - Uses real spaces in pathnames
33
#..
60
#..
34
vc_libs		=\
-
 
35
		$(subst ;,$(space),$(subst \,/,$(subst $(space),$(spacealt),$(VC_LIB))))
-
 
36
 
61
 
-
 
62
#
-
 
63
#   Work around for a bug in make 3.81 where abspath assumes that the input
-
 
64
#   is a relative path. The work around checks for paths that have a : or start
37
ALL_LIBDIRS = $(LIBDIRS);$(vc_libs)
65
#   with a '/ - and assumes these are absolute.
-
 
66
#   It will only call makes 'abspath' for relative paths.
38
LIB		=\
67
#
-
 
68
myabspath = $(foreach dir,$1,$(call myabs1path,$(dir)))
-
 
69
myabs1path = $(if $(or $(findstring :,$1),$(filter /%,$1)),$1,$(abspath $1))
-
 
70
 
-
 
71
vc_libs     := $(subst ;,$(space),$(subst \,/,$(subst $(space),$(spacealt),$(VC_LIB))))
-
 
72
ALL_LIBDIRS := $(wildcard $(call myabspath,$(LIBDIRS))) $(vc_libs)
39
		$(subst $(spacealt),$(space),$(subst $(space),$(empty),$(patsubst %,%;,$(subst /,\,$(ALL_LIBDIRS)))))
73
CS_LIB      := $(subst $(spacealt),$(space),$(subst $(space),$(empty),$(patsubst %,%;,$(subst /,\,$(ALL_LIBDIRS)))))
40
export LIB
74
export CS_LIB
-
 
75
 
-
 
76
#one_per_line = $(foreach aa,$2,$(info $1 :: $(subst $(spacealt),$(space),$(aa))))
-
 
77
#$(call one_per_line,Good LIBDIRS,$(ALL_LIBDIRS))
41
 
78
 
42
###############################################################################
79
###############################################################################
43
#
80
#
44
#.. Resource Genorator
81
#.. Resource Generator
45
#
82
#
46
define RESGEN
83
define RESGEN
47
	@$(echo) [$@] Compile Resource ..
84
	@$(echo) [$@] Compile Resource ..
48
	@$(show_environment)
85
	@$(show_environment)
49
	$(XX_PRE) resgen $(subst /,\\,$(filter %.resx,$^)) $(subst /,\\,$@)
86
	$(XX_PRE) resgen $(subst /,\\,$(filter %.resx,$^)) $(subst /,\\,$@)
Line 71... Line 108...
71
#       csc_defines             - Local definitions will be placed on cmd line
108
#       csc_defines             - Local definitions will be placed on cmd line
72
#
109
#
73
csc_pre =
110
csc_pre =
74
csc = $(CC_PRE) csc
111
csc = $(CC_PRE) csc
75
csc_flags =
112
csc_flags =
76
csc_o_switch = $(csc_flags) @$(csc_cmdfile)
113
csc_o_switch = @$(csc_cmdfile)
77
csc_post =
114
csc_post =
78
csc_cmdfile	= $(basename $@).ld
115
csc_cmdfile	= $(basename $@).ld
79
csc_defines =
116
csc_defines =
80
 
117
 
81
define csc_pre
118
define csc_pre
Line 142... Line 179...
142
csc_flags += $(patsubst -D%,/define:%,$(CFLAGS)$(csc_defines))
179
csc_flags += $(patsubst -D%,/define:%,$(CFLAGS)$(csc_defines))
143
 
180
 
144
 
181
 
145
#
182
#
146
#   Insert the library search paths into the start of the command file
183
#   Insert the library search paths into the start of the command file
-
 
184
#   Create lines of the form: "/lib:<pathname>"
-
 
185
#       Put all in quotes to allow for paths with spaces
147
#
186
#
148
vc_ldflags	= \
-
 
149
		$(subst $(spacealt),$(space),$(patsubst %,/lib:\"%\"\\n,$(subst /,\\\\,$(LIBDIRS))))\
187
vc_ldflags	= $(subst $(spacealt),$(space),$(patsubst %,\"/lib:%\"\\n,$(subst /,\\\\,$(ALL_LIBDIRS))))
150
		$(subst $(spacealt),$(space),$(patsubst %,/lib:\"%\"\\n,$(subst /,\\\\,$(vc_libs))))
-
 
151
 
-
 
152
 
188
 
153
#
189
#
154
#   Cleanup definitions
190
#   Cleanup definitions
155
#
191
#
156
ifndef LEAVETMP
192
ifndef LEAVETMP