2121# email: TouchStone222@runbox.com <David Lindauer>
2222#
2323
24- SHELL =cmd.exe
25- export SHELL
26-
2724ifeq "$(COMPILER ) " "gcc-linux"
28- MKDIR := mdkdir -p
25+ MKDIR := mkdir -p
2926DEL := rm
3027COPY := cp
3128else
@@ -40,8 +37,8 @@ export COPY
4037
4138all : mkapps
4239
43- BASEDIRS = ALLOC cmath COMPLIB IO locale MATH PROCONT stdbit stdlib STRING strings \
44- threads TIME uio wc uchar
40+ BASEDIRS = alloc cmath complib io locale math procont stdbit stdlib string strings \
41+ threads time uio wc uchar
4542CLIBDIRS = $(BASEDIRS ) cpp
4643DLLDIRS = $(BASEDIRS ) cpp
4744DIRS = $(CLIBDIRS )
@@ -54,65 +51,65 @@ C_CLIBS:= $(call SUFFIXDIRS,$(DIRS),.clibs)
5451C_DLLS: = $(call SUFFIXDIRS,$(DLLDIRS ) ,.dlls)
5552C_FORMAT = $(call SUFFIXDIRS,$(DIRS ) ,.formats)
5653
57- MAKEFILES := $(MAKEFILES ) $(subst /,\ ,$(realpath maker.mak) )
54+ MAKEFILES := $(MAKEFILES ) $(subst /,$( PATHEXT2 ) ,$(realpath maker.mak) )
5855export MAKEFILES
5956include maker.mak
6057
6158ifneq ($(shell type makefile) ,)
6259B = /b
6360endif
6461
65- THISPATH: =$(subst /,\ ,$(CURDIR ) \)
62+ THISPATH: =$(subst /,$( PATHEXT2 ) ,$(CURDIR ) \)
6663
6764# DOSOBJECT:=$(THISPATH)object\dos
6865# export DOSOBJECT
69- WINOBJECT: =$(THISPATH ) object\ windows
66+ WINOBJECT: =$(THISPATH ) object$( PATHEXT2 ) windows
7067export WINOBJECT
7168
72- SYSOBJECT: =$(THISPATH ) object\ startup
69+ SYSOBJECT: =$(THISPATH ) object$( PATHEXT2 ) startup
7370export SYSOBJECT
7471
75- LSCRTLOBJECT: =$(THISPATH ) object\ startup
72+ LSCRTLOBJECT: =$(THISPATH ) object$( PATHEXT2 ) startup
7673export LSCRTLOBJECT
7774
78- CLIBOBJECT: =$(THISPATH ) object\ clib
75+ CLIBOBJECT: =$(THISPATH ) object$( PATHEXT2 ) clib
7976export CLIBOBJECT
8077
81- CILOBJECT: =$(THISPATH ) object\ cil
78+ CILOBJECT: =$(THISPATH ) object$( PATHEXT2 ) cil
8279export CILOBJECT
8380
84- LIBOBJS = $(subst $(CLIBOBJECT ) \,,$(shell dir $(B ) $(CLIBOBJECT ) \ * .o) )
81+ LIBOBJS = $(subst $(CLIBOBJECT ) \,,$(shell dir $(B ) $(CLIBOBJECT )$( PATHEXT2 ) * .o) )
8582# DOSOBJS1 = $(subst $(CLIBOBJECT)\,,$(shell dir $(B) $(DOSOBJECT)\*.o))
8683# DOSOBJS = $(DOSOBJS1:.OBJ=.o)
87- WINOBJS = $(subst $(CLIBOBJECT ) \,,$(shell dir $(B ) $(WINOBJECT ) \ * .o) )
88- CILOBJS = $(subst $(CLIBOBJECT ) \,,$(shell dir $(B ) $(CILOBJECT ) \ * .ilo) )
84+ WINOBJS = $(subst $(CLIBOBJECT ) \,,$(shell dir $(B ) $(WINOBJECT )$( PATHEXT2 ) * .o) )
85+ CILOBJS = $(subst $(CLIBOBJECT ) \,,$(shell dir $(B ) $(CILOBJECT )$( PATHEXT2 ) * .ilo) )
8986
9087$(MKDIR ) :
91- -$(MKDIR ) object 2> NUL
92- # -$(MKDIR) object\ dos 2> NUL
93- -$(MKDIR) object\ windows 2> NUL
94- -$(MKDIR) object\ startup 2> NUL
95- -$(MKDIR) object\ cil 2> NUL
96- -$(MKDIR) object\ clib 2> NUL
88+ -$(MKDIR ) object 2> $( NULLDEV )
89+ # -$(MKDIR) object$(PATHEXT2) dos 2> $(NULLDEV)
90+ -$(MKDIR) object$(PATHEXT2) windows 2> $(NULLDEV)
91+ -$(MKDIR) object$(PATHEXT2) startup 2> $(NULLDEV)
92+ -$(MKDIR) object$(PATHEXT2) cil 2> $(NULLDEV)
93+ -$(MKDIR) object$(PATHEXT2) clib 2> $(NULLDEV)
9794
9895copyfiles : $(MKDIR )
99- -$(MKDIR ) ..\. . \ i nclude 2> NUL
100- -$(MKDIR ) ..\. . \ i nclude\ c 2> NUL
101- -$(MKDIR ) ..\. . \ i nclude\c\ s ys 2> NUL
102- -$(MKDIR ) ..\. . \ i nclude\c\ w in32 2> NUL
103- -$(MKDIR ) ..\. . \ i nclude\c\ w in32\ g l 2> NUL
104- -$(MKDIR ) ..\. . \ i nclude\ s upport 2> NUL
105- -$(MKDIR ) ..\. . \ i nclude\ s upport\ w in32 2> NUL
106- -$(MKDIR ) ..\. . \ i nclude\ s upport\ o rangec 2> NUL
107- -$(COPY ) cpp\ l ibcxx\ i nclude ..\. . \ i nclude 2> NUL
108- -$(COPY ) cpp\ l ibcxx\ i nclude\ s upport\ w in32 ..\. . \ i nclude\ s upport\ w in32 2> NUL
109- -$(COPY ) cpp\ l ibcxx\ i nclude\ s upport\ o rangec ..\. . \ i nclude\ s upport\ o rangec 2> NUL
110- -$(COPY ) cpp\ s tdinc_libcxx ..\. . \ i nclude 2> NUL
111- -$(COPY ) stdinc ..\. . \ i nclude\ c 2> NUL
112- -$(COPY ) stdinc\ s ys ..\. . \ i nclude\c\ s ys 2> NUL
113- -$(COPY ) platform\ w in32\ i nc ..\. . \ i nclude\c\ w in32 2> NUL
114- -$(COPY ) platform\ w in32\ i nc\ g diplus ..\. . \ i nclude\c\ w in32 2> NUL
115- -$(COPY ) platform\ w in32\ i nc\ g l ..\. . \ i nclude\c\ w in32\ g l 2> NUL
96+ -$(MKDIR ) ..$( PATHEXT2 ) .. $( PATHEXT2 ) include 2> $( NULLDEV )
97+ -$(MKDIR ) ..$( PATHEXT2 ) .. $( PATHEXT2 ) include$( PATHEXT2 ) c 2> $( NULLDEV )
98+ -$(MKDIR ) ..$( PATHEXT2 ) .. $( PATHEXT2 ) include$( PATHEXT2 ) c $( PATHEXT2 ) sys 2> $( NULLDEV )
99+ -$(MKDIR ) ..$( PATHEXT2 ) .. $( PATHEXT2 ) include$( PATHEXT2 ) c $( PATHEXT2 ) win32 2> $( NULLDEV )
100+ -$(MKDIR ) ..$( PATHEXT2 ) .. $( PATHEXT2 ) include$( PATHEXT2 ) c $( PATHEXT2 ) win32$( PATHEXT2 ) gl 2> $( NULLDEV )
101+ -$(MKDIR ) ..$( PATHEXT2 ) .. $( PATHEXT2 ) include$( PATHEXT2 ) support 2> $( NULLDEV )
102+ -$(MKDIR ) ..$( PATHEXT2 ) .. $( PATHEXT2 ) include$( PATHEXT2 ) support$( PATHEXT2 ) win32 2> $( NULLDEV )
103+ -$(MKDIR ) ..$( PATHEXT2 ) .. $( PATHEXT2 ) include$( PATHEXT2 ) support$( PATHEXT2 ) orangec 2> $( NULLDEV )
104+ -$(COPY ) cpp$( PATHEXT2 ) libcxx$( PATHEXT2 ) include ..$( PATHEXT2 ) .. $( PATHEXT2 ) include 2> $( NULLDEV )
105+ -$(COPY ) cpp$( PATHEXT2 ) libcxx$( PATHEXT2 ) include$( PATHEXT2 ) support$( PATHEXT2 ) win32 ..$( PATHEXT2 ) .. $( PATHEXT2 ) include$( PATHEXT2 ) support$( PATHEXT2 ) win32 2> $( NULLDEV )
106+ -$(COPY ) cpp$( PATHEXT2 ) libcxx$( PATHEXT2 ) include$( PATHEXT2 ) support$( PATHEXT2 ) orangec ..$( PATHEXT2 ) .. $( PATHEXT2 ) include$( PATHEXT2 ) support$( PATHEXT2 ) orangec 2> $( NULLDEV )
107+ -$(COPY ) cpp$( PATHEXT2 ) stdinc_libcxx ..$( PATHEXT2 ) .. $( PATHEXT2 ) include 2> $( NULLDEV )
108+ -$(COPY ) stdinc ..$( PATHEXT2 ) .. $( PATHEXT2 ) include$( PATHEXT2 ) c 2> $( NULLDEV )
109+ -$(COPY ) stdinc$( PATHEXT2 ) sys ..$( PATHEXT2 ) .. $( PATHEXT2 ) include$( PATHEXT2 ) c $( PATHEXT2 ) sys 2> $( NULLDEV )
110+ -$(COPY ) platform$( PATHEXT2 ) win32$( PATHEXT2 ) inc ..$( PATHEXT2 ) .. $( PATHEXT2 ) include$( PATHEXT2 ) c $( PATHEXT2 ) win32 2> $( NULLDEV )
111+ -$(COPY ) platform$( PATHEXT2 ) win32$( PATHEXT2 ) inc$( PATHEXT2 ) gdiplus ..$( PATHEXT2 ) .. $( PATHEXT2 ) include$( PATHEXT2 ) c $( PATHEXT2 ) win32 2> $( NULLDEV )
112+ -$(COPY ) platform$( PATHEXT2 ) win32$( PATHEXT2 ) inc$( PATHEXT2 ) gl ..$( PATHEXT2 ) .. $( PATHEXT2 ) include$( PATHEXT2 ) c $( PATHEXT2 ) win32$( PATHEXT2 ) gl 2> $( NULLDEV )
116113
117114$(C_CLIBS ) : % .clibs :
118115 $(MAKE ) -C$* --eval=" OBJECT=$( CLIBOBJECT) " --eval=" $( BUILDING_DLL) "
@@ -128,17 +125,17 @@ ifneq "$(ORANGEC_ONLY)" "YES"
128125# -$(DEL) $(SYSOBJECT)\cldos.l
129126# $(LIB) $(LIBFLAGS) $(SYSOBJECT)\cldos.l $(foreach dir, $(LIBOBJS), $(CLIBOBJECT)\$(dir)) $(foreach dir, $(DOSOBJS), $(DOSOBJECT)\$(dir))
130127endif
131- -$(DEL) $(SYSOBJECT)\ clwin.l
132- $(LIB) $(LIBFLAGS) $(SYSOBJECT)\ clwin.l $(foreach dir, $(LIBOBJS), $(CLIBOBJECT)\ $(dir))
133- $(LIB) $(LIBFLAGS) $(SYSOBJECT)\ clwin.l $(foreach dir, $(WINOBJS), $(WINOBJECT)\ $(dir))
128+ -$(DEL) $(SYSOBJECT)$(PATHEXT2) clwin.l
129+ $(LIB) $(LIBFLAGS) $(SYSOBJECT)$(PATHEXT2) clwin.l $(foreach dir, $(LIBOBJS), $(CLIBOBJECT)$(PATHEXT2) $(dir))
130+ $(LIB) $(LIBFLAGS) $(SYSOBJECT)$(PATHEXT2) clwin.l $(foreach dir, $(WINOBJS), $(WINOBJECT)$(PATHEXT2) $(dir))
134131
135132mkapps :
136133 $(MAKE ) copyfiles
137134 $(MAKE ) mklibs
138135 $(MAKE ) -Cplatform --eval=" OBJECT=$( CLIBOBJECT) " final
139136
140137test :
141- $(MAKE ) -Ccpp\ l ibcxx\ t est current
138+ $(MAKE ) -Ccpp$( PATHEXT2 ) libcxx$( PATHEXT2 ) test current
142139BUILDING_DLL = BUILDING_DLL=-D__BUILDING_LSCRTL_DLL
143140
144141FORMAT : $(C_FORMAT )
@@ -149,49 +146,47 @@ ifdef DISTMAKE
149146 include $(DISTMAKE)
150147
151148DISTRIBUTE :
152- $(COPYDIR ) cpp\l ibcxx\i nclude\% . $(DISTINC )
153- $(COPYDIR ) cpp\l ibcxx\i nclude\% .h $(DISTINC )
154- $(COPYDIR ) cpp\l ibcxx\i nclude\s upport\w in32\% . $(DISTINC ) \s upport\w in32
155- $(COPYDIR ) cpp\l ibcxx\i nclude\s upport\w in32\% .h $(DISTINC ) \s upport\w in32
156- $(COPYDIR ) cpp\s tdinc_libcxx\% . $(DISTINC )
157- $(COPYDIR ) cpp\s tdinc_libcxx\% .h $(DISTINC )
158- $(COPYDIR ) stdinc\% .h $(DISTINC ) \c
159- $(COPYDIR ) stdinc\s ys\% .h $(DISTINC ) \c\s ys
160- $(COPYDIR ) platform\w in32\i nc\% .h $(DISTINC ) \c\w in32
149+ $(COPYDIR ) cpp$(PATHEXT2 ) libcxx$(PATHEXT2 ) include$(PATHEXT2 ) % $(DISTINC )
150+ $(COPYDIR ) cpp$(PATHEXT2 ) libcxx$(PATHEXT2 ) include$(PATHEXT2 ) %.h $(DISTINC )
151+ $(COPYDIR ) cpp$(PATHEXT2 ) libcxx$(PATHEXT2 ) include$(PATHEXT2 ) support$(PATHEXT2 ) win32$(PATHEXT2 ) % $(DISTINC )$(PATHEXT2 ) support$(PATHEXT2 ) win32
152+ $(COPYDIR ) cpp$(PATHEXT2 ) stdinc_libcxx$(PATHEXT2 ) % $(DISTINC )
153+ $(COPYDIR ) stdinc$(PATHEXT2 ) %.h $(DISTINC )$(PATHEXT2 ) c
154+ $(COPYDIR ) stdinc$(PATHEXT2 ) sys$(PATHEXT2 ) %.h $(DISTINC )$(PATHEXT2 ) c$(PATHEXT2 ) sys
155+ $(COPYDIR ) platform$(PATHEXT2 ) win32$(PATHEXT2 ) inc$(PATHEXT2 ) %.h $(DISTINC )$(PATHEXT2 ) c$(PATHEXT2 ) win32
161156ifndef BUILDENV
162- $(COPYDIR) object\ startup\ %.l $(DISTLIB)
163- $(COPYDIR) object\ startup\ %.o $(DISTLIB)
157+ $(COPYDIR) object$(PATHEXT2) startup$(PATHEXT2) %.l $(DISTLIB)
158+ $(COPYDIR) object$(PATHEXT2) startup$(PATHEXT2) %.o $(DISTLIB)
164159ifneq "$(ORANGEC_ONLY ) " "YES"
165- # $(COPYDIR) object\ startup\ %.exe $(DISTLIB)
160+ # $(COPYDIR) object$(PATHEXT2) startup$(PATHEXT2) %.exe $(DISTLIB)
166161endif
167- $(COPYDIR) object\ startup\ %.dll $(DISTBIN)
162+ $(COPYDIR) object$(PATHEXT2) startup$(PATHEXT2) %.dll $(DISTBIN)
168163 $(MAKE) -Cplatform DISTRIBUTE
169164endif
170165endif
171166
172167clean :
173- # -$(DEL) $(DOSOBJECT) 2> NUL
174- -$(DEL) $(WINOBJECT) 2> NUL
175- -$(DEL) $(SYSOBJECT) 2> NUL
176- -$(DEL) $(CILOBJECT) 2> NUL
177- -$(DEL) $(CLIBOBJECT) 2> NUL
178- -$(DEL) platform\ win32\ crtdmain\ *.o 2>NUL
179- -$(DEL) platform\ win32\ lscrtl\ *.o 2>NUL
180- -$(DEL) platform\ win32\ lscrtl\ *.dll 2>NUL
181- -$(DEL) platform\ win32\ lsdbghelper\ *.o 2>NUL
182- -$(DEL) platform\ win32\ msvcrdm\ *.o 2>NUL
183- -$(DEL) platform\ win32\ occil\ *.o 2>NUL
184- -$(DEL) platform\ win32\ occil\ occmsil.dll 2>NUL
185- -$(DEL) platform\ win32\pe\ *.o 2>NUL
186- -$(DEL) platform\ win32\ pels\ *.o 2>NUL
187- -$(DEL) platform\ win32\ rtl\ *.o 2>NUL
188- # -$(DEL) platform\ dos32\ debug\ *.o 2>NUL
189- # -$(DEL) platform\ dos32\le\ *.o 2>NUL
190- # -$(DEL) platform\ dos32\pm\ *.o 2>NUL
191- # -$(DEL) platform\ dos32\ rtl\ *.o 2>NUL
192- # -rmdir $(DOSOBJECT) 2> NUL
193- -rmdir $(WINOBJECT) 2> NUL
194- -rmdir $(SYSOBJECT) 2> NUL
195- -rmdir $(CILOBJECT) 2> NUL
196- -rmdir $(CLIBOBJECT) 2> NUL
197- -rmdir object 2> NUL
168+ # -$(DEL) $(DOSOBJECT) 2> $(NULLDEV)
169+ -$(DEL) $(WINOBJECT) 2> $(NULLDEV)
170+ -$(DEL) $(SYSOBJECT) 2> $(NULLDEV)
171+ -$(DEL) $(CILOBJECT) 2> $(NULLDEV)
172+ -$(DEL) $(CLIBOBJECT) 2> $(NULLDEV)
173+ -$(DEL) platform$(PATHEXT2) win32$(PATHEXT2) crtdmain$(PATHEXT2) *.o 2>$(NULLDEV)
174+ -$(DEL) platform$(PATHEXT2) win32$(PATHEXT2) lscrtl$(PATHEXT2) *.o 2>$(NULLDEV)
175+ -$(DEL) platform$(PATHEXT2) win32$(PATHEXT2) lscrtl$(PATHEXT2) *.dll 2>$(NULLDEV)
176+ -$(DEL) platform$(PATHEXT2) win32$(PATHEXT2) lsdbghelper$(PATHEXT2) *.o 2>$(NULLDEV)
177+ -$(DEL) platform$(PATHEXT2) win32$(PATHEXT2) msvcrdm$(PATHEXT2) *.o 2>$(NULLDEV)
178+ -$(DEL) platform$(PATHEXT2) win32$(PATHEXT2) occil$(PATHEXT2) *.o 2>$(NULLDEV)
179+ -$(DEL) platform$(PATHEXT2) win32$(PATHEXT2) occil$(PATHEXT2) occmsil.dll 2>$(NULLDEV)
180+ -$(DEL) platform$(PATHEXT2) win32$(PATHEXT2)pe$(PATHEXT2) *.o 2>$(NULLDEV)
181+ -$(DEL) platform$(PATHEXT2) win32$(PATHEXT2) pels$(PATHEXT2) *.o 2>$(NULLDEV)
182+ -$(DEL) platform$(PATHEXT2) win32$(PATHEXT2) rtl$(PATHEXT2) *.o 2>$(NULLDEV)
183+ # -$(DEL) platform$(PATHEXT2) dos32$(PATHEXT2) debug$(PATHEXT2) *.o 2>$(NULLDEV)
184+ # -$(DEL) platform$(PATHEXT2) dos32$(PATHEXT2)le$(PATHEXT2) *.o 2>$(NULLDEV)
185+ # -$(DEL) platform$(PATHEXT2) dos32$(PATHEXT2)pm$(PATHEXT2) *.o 2>$(NULLDEV)
186+ # -$(DEL) platform$(PATHEXT2) dos32$(PATHEXT2) rtl$(PATHEXT2) *.o 2>$(NULLDEV)
187+ # -rmdir $(DOSOBJECT) 2> $(NULLDEV)
188+ -rmdir $(WINOBJECT) 2> $(NULLDEV)
189+ -rmdir $(SYSOBJECT) 2> $(NULLDEV)
190+ -rmdir $(CILOBJECT) 2> $(NULLDEV)
191+ -rmdir $(CLIBOBJECT) 2> $(NULLDEV)
192+ -rmdir object 2> $(NULLDEV)
0 commit comments