cosmetix in Jambase: use single-quoted string where appropriate
[k8jam.git] / defaults / Jambase.windoze
blob4a746c3ffc98866f6e7f81f4edd778b2a0180cd6
1 # This program is free software: you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation, either version 3 of the License, or
4 # (at your option) any later version.
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9 # GNU General Public License for more details.
11 # You should have received a copy of the GNU General Public License
12 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
15 # windoze setup
18 rule WindozeResourceCompiler {
19   Depends $(<) : $(>) ;
20   Clean clean : $(<) ;
23 actions WindozeResourceCompiler {
24   "$(WINE)" $(MGPATH)windres.exe -i $(>) -o $(<)
28 rule setup-windoze {
29   if ! $(WINDOZE) { WINDOZE = 1 ; }
30   PICFLAGS = ;
31   SUFLIBSHR = .dll ;
32   #WINDOZE_THREADS = -mthreads ;
33   #WINDOZE_THREADS = ;
34   WINE ?= 'wine' ;
35   MGPATH ?= 'c:\\mingw\\bin\\' ;
36   MGCC ?= 'mingw32-gcc.exe -static-libgcc' ;
37   MG++ ?= 'mingw32-g++.exe -static-libgcc -static-libstdc++' ;
38   CC = "$(WINE)" $(MGPATH)$(MGCC) ;
39   LINK = "$(WINE)" $(MGPATH)$(MGCC) -Wl,--enable-auto-import ;
40   AR = "$(WINE)" $(MGPATH)ar.exe -sru ;
41   #RANLIB = "$(WINE)" $(MGPATH)ranlib.exe ;
42   C++ = "$(WINE)" $(MGPATH)$(MG++) ;
43   C++LINK = "$(WINE)" $(MGPATH)$(MG++) -Wl,--enable-auto-import ;
44   #LINKLIBS += -lkernel32 ;
45   #LINKLIBS += -luser32 ;
46   #LINKLIBS += -ladvapi32 ;
47   #LINKLIBS += -lws2_32 ;
48   #WINSUBSYS = 'windows' ;
49   #WINSUBSYS = 'console' ;
50   SUFEXE = .exe ;
51   #LINKFLAGS += "-Wl,-subsystem,$(WINSUBSYS)" ;
55 rule use-mingw32 {
56   if [ sys-have-command i686-pc-mingw32-gcc ] {
57     if ! $(MINGW32-CC) { MINGW32-CC = i686-pc-mingw32-gcc ; }
58     if ! $(MINGW32-C++) { MINGW32-C++ = i686-pc-mingw32-g++ ; }
59     CC = $(MINGW32-CC) -pipe -static-libgcc ;
60     C++ = $(MINGW32-C++) -pipe -static-libgcc -static-libstdc++ ;
61     LINK = $(MINGW32-CC) -pipe -static-libgcc -Wl,--enable-auto-import ;
62     C++LINK = $(MINGW32-C++) -pipe -static-libgcc -static-libstdc++ -Wl,--enable-auto-import ;
63     AR = i686-pc-mingw32-ar -sru ;
64     #RANLIB = i686-pc-mingw32-ranlib ;
66     actions WindozeResourceCompiler {
67       i686-pc-mingw32-windres -i $(>) -o $(<)
68     }
69   }
73 rule check-setup-windoze {
74   if ! $(NT) && $(WINDOZE) {
75     setup-windoze ;
76     use-mingw32 ;
77   }
81 rule windoze-fix {
82   if $(WINDOZE) {
83     if $(WINDOZE_THREADS) {
84       CC += -mthreads ;
85       CC++ += -mthreads ;
86     }
87     local ss = $(WINSUBSYS) ;
88     if ! $(ss) { ss = 'console' ; }
89     LINK += "-Wl,-subsystem,$(ss)" ;
90     C++LINK += "-Wl,-subsystem,$(ss)" ;
91     if $(WINLIBS) { LINKLIBS += $(WINLIBS) ; } else { LINKLIBS += -lkernel32 ; }
92   }