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, version 3 of the License ONLY.
5 # This program is distributed in the hope that it will be useful,
6 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8 # GNU General Public License for more details.
10 # You should have received a copy of the GNU General Public License
11 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 rule WindozeResourceCompiler {
22 actions WindozeResourceCompiler {
23 "$(WINE)" $(MGPATH)windres.exe -i $(>) -o $(<)
28 if ! $(WINDOZE) { WINDOZE = 1 ; }
31 #WINDOZE_THREADS = -mthreads ;
34 MGPATH ?= 'c:\\mingw\\bin\\' ;
35 MGCC ?= 'mingw32-gcc.exe -static-libgcc' ;
36 MG++ ?= 'mingw32-g++.exe -static-libgcc -static-libstdc++' ;
37 CC = "$(WINE)" $(MGPATH)$(MGCC) ;
38 LINK = "$(WINE)" $(MGPATH)$(MGCC) -Wl,--enable-auto-import ;
39 AR = "$(WINE)" $(MGPATH)ar.exe -srUu ;
40 #RANLIB = "$(WINE)" $(MGPATH)ranlib.exe ;
41 C++ = "$(WINE)" $(MGPATH)$(MG++) ;
42 C++LINK = "$(WINE)" $(MGPATH)$(MG++) -Wl,--enable-auto-import ;
43 #LINKLIBS += -lkernel32 ;
44 #LINKLIBS += -luser32 ;
45 #LINKLIBS += -ladvapi32 ;
46 #LINKLIBS += -lws2_32 ;
47 #WINSUBSYS = 'windows' ;
48 #WINSUBSYS = 'console' ;
50 #LINKFLAGS += "-Wl,-subsystem,$(WINSUBSYS)" ;
55 ## if [ sys-has-command i686-pc-mingw32-gcc ] {
56 ## if ! $(MINGW32-CC) { MINGW32-CC = i686-pc-mingw32-gcc ; }
57 ## if ! $(MINGW32-C++) { MINGW32-C++ = i686-pc-mingw32-g++ ; }
58 ## CC = $(MINGW32-CC) -pipe -static-libgcc ;
59 ## C++ = $(MINGW32-C++) -pipe -static-libgcc -static-libstdc++ ;
60 ## LINK = $(MINGW32-CC) -pipe -static-libgcc -Wl,--enable-auto-import ;
61 ## C++LINK = $(MINGW32-C++) -pipe -static-libgcc -static-libstdc++ -Wl,--enable-auto-import ;
62 ## AR = i686-pc-mingw32-ar -srUu ;
63 ## #RANLIB = i686-pc-mingw32-ranlib ;
65 ## actions WindozeResourceCompiler {
66 ## i686-pc-mingw32-windres -i $(>) -o $(<)
74 if [ sys-has-command i686-w64-mingw32.static-gcc ] {
75 pfx = i686-w64-mingw32.static ;
76 actions WindozeResourceCompiler {
77 i686-w64-mingw32.static-windres -i $(>) -o $(<)
79 } else if [ sys-has-command i686-w64-mingw32-gcc ] {
80 pfx = i686-w64-mingw32 ;
81 actions WindozeResourceCompiler {
82 i686-w64-mingw32-windres -i $(>) -o $(<)
84 } else if [ sys-has-command i686-pc-mingw32-gcc ] {
85 pfx = i686-pc-mingw32 ;
86 actions WindozeResourceCompiler {
87 i686-pc-mingw32-windres -i $(>) -o $(<)
92 if ! $(MINGW32-CC) { MINGW32-CC = "$(pfx)-gcc" ; }
93 if ! $(MINGW32-C++) { MINGW32-C++ = "$(pfx)-g++" ; }
94 CC = $(MINGW32-CC) -pipe -static-libgcc ;
95 C++ = $(MINGW32-C++) -pipe -static-libgcc -static-libstdc++ ;
96 LINK = $(MINGW32-CC) -pipe -static-libgcc -Wl,--enable-auto-import ;
97 C++LINK = $(MINGW32-C++) -pipe -static-libgcc -static-libstdc++ -Wl,--enable-auto-import ;
98 AR = "$(pfx)-ar" -srUu ;
99 PKG-CONFIG = "$(pfx)-pkg-config" ;
100 #RANLIB = i686-pc-mingw32-ranlib ;
105 rule check-setup-windoze {
106 if ! $(NT) && $(WINDOZE) {
115 if $(WINDOZE_THREADS) {
119 local ss = $(WINSUBSYS) ;
120 if ! $(ss) { ss = 'console' ; }
121 LINK += "-Wl,-subsystem,$(ss)" ;
122 C++LINK += "-Wl,-subsystem,$(ss)" ;
123 if $(WINLIBS) { LINKLIBS += $(WINLIBS) ; } else { LINKLIBS += -lkernel32 ; }