3 ECHO "PDCLIB_TOP: " $(PDCLIB_TOP) ;
5 if ! $(PDCLIB_HAVE_PLATFORM) && ! $(PDCLIB_PLATFORM) {
7 PDCLIB_PLATFORM = "win32" ;
9 PDCLIB_PLATFORM = "posix" ;
11 ECHO PDCLIB_PLATFORM not set and platform not automatically detected ;
12 ECHO Set PDCLIB_PLATFORM to the platform to be built for ;
15 PDCLIB_HAVE_PLATFORM = 1 ;
18 if $(PDCLIB_TOOLCHAIN) = "" {
19 local __ccparts = [ SPLIT $(CC) : "-" ] ;
20 if $(JAM_TOOLSET) = "MINGW" || "gcc" in $(__ccparts)
21 || "clang" in $(__ccparts) {
23 PDCLIB_TOOLCHAIN = "gcc" ;
24 } else if $(JAM_TOOLSET) != "" {
25 PDCLIB_TOOLCHAIN = $(JAM_TOOLSET) ;
27 ECHO PDCLIB_TOOLCHAIN is unset and I can't glean what toolset is being ;
28 ECHO used from your environment. Please set it. ;
33 if $(PDCLIB_TOOLCHAIN) = "gcc" {
35 -Wall -Wextra -pedantic -Wno-unused-parameter -Wshadow
36 -Wpointer-arith -Wwrite-strings -Wmissing-declarations -Wno-long-long
37 -Wuninitialized -Wno-deprecated-declarations -Wredundant-decls -Winline
38 -Wcast-align -Wno-format
41 -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes ;
62 # ld64 does automatic repeated searches of archives
63 # and doesn't accept --start-group/--end-group
65 #actions Link bind NEEDLIBS
67 # $(LINK) $(LINKFLAGS) -o $(<) $(UNDEFS) $(>) $(NEEDLIBS) $(LINKLIBS)
70 PDCLIB_TEST_LINKFLAGS += -Wl,--gc-sections ;
71 actions Link bind NEEDLIBS
73 $(LINK) $(LINKFLAGS) -o $(<) $(UNDEFS) $(>) -Wl,--start-group $(NEEDLIBS) $(LINKLIBS) -Wl,--end-group
76 } else if $(PDCLIB_TOOLCHAIN) = "WATCOM" {
78 CCFLAGS = /zq /DWIN32 /zls ;
79 C++FLAGS = /zq /DWIN32 /zls ;
80 STDHDRS = $(WATCOM)\\h\\nt ;
81 PDCLIB_CCFLAGS = "-za99 -zl -s" ;
83 ECHO The value of PDCLIB_TOOLCHAIN is not recognized ;
84 ECHO Currently set to $(PDCLIB_TOOLCHAIN) ;
88 if $(PDCLIB_PLATFORM) {
89 include [ FDirName $(PDCLIB_TOP) platform $(PDCLIB_PLATFORM) Config.jam ] ;
93 SubDirHdrs $(PDCLIB_TOP) includes ;
94 SubDirHdrs $(PDCLIB_TOP) internals ;
95 SubDirHdrs $(PDCLIB_TOP) testing ;
96 for opt in $(PDCLIB_OPTIONS) {
97 SubDirHdrs $(PDCLIB_TOP) opt $(opt) ;
103 SubDirCcFlags $(PDCLIB_CCFLAGS) ;
104 SubDirC++Flags $(PDCLIB_C++FLAGS) ;
109 # MinGW needs appropriate prodding to cretae executables
110 if $(TOOLSET) = MINGW {
111 PDCLIB_TEST_LINKFLAGS += -mconsole ;
112 PDCLIB_REGTEST_LINKFLAGS += -mconsole ;
116 ALWAYS regtest test ;
119 DEPENDS $(<) : $(>) ;
121 DEPENDS test : $(<) ;
125 DEPENDS $(<) : $(>) ;
127 DEPENDS regtest : $(<) ;
138 # list all files in a directory, except ., ..
139 # [ ListDir base : dirname ]
141 # start with empty list
144 # for each file in the directory
145 local _dirlist = [ GLOB [ FDirName $(1) $(2) ] : * ] ;
146 for _subdir in $(_dirlist) {
148 # if it is not . or ..
150 case *\\. : _dummy = "" ; # is there some no-op statement?
151 case *\\.. : _dummy = "" ; # is there some no-op statement?
154 _result += $(_subdir:D=$(2)) ;
158 # return resulting list
162 # same as glob, but recurses into subdirs
164 # initially use the files in the current directory
166 local _path = [ FDirName $(1) $(2) ] ;
167 local _result = [ GLOB $(_path) : $(3) ] ;
168 _result = $(_result:D=$(_dir)) ;
170 # list all subdirectories (and files, but it doesn't hurt)
171 local _subdirlist = [ ListDir $(1) : $(2) ] ;
173 # for each subdir/file
174 for _subdir in $(_subdirlist) {
176 _result += [ RecursiveGlob $(1) : $(_subdir) : $(3) ] ;
179 # return the resulting list
183 # Fix to work on targets in subdirs
186 # Note we grist the directory name with 'dir',
187 # so that directory path components and other
188 # targets don't conflict.
192 local _rev = [ FReverse $(>) ] ;
193 if $(_rev[1]) = "." {
196 local _dir = [ FDirName [ FReverse $(_rev) ] $(<[0]:D) ] ;
198 LOCATE on $(<) = [ FDirName $(>) ] ;
199 Depends $(<) : $(_dir:G=dir) ;
200 MkDir $(_dir:G=dir) ;