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/>.
18 rule WindozeResourceCompiler {
23 actions WindozeResourceCompiler {
24 "$(WINE)" $(MGPATH)windres.exe -i $(>) -o $(<)
29 if ! $(WINDOZE) { WINDOZE = 1 ; }
32 #WINDOZE_THREADS = -mthreads ;
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' ;
51 #LINKFLAGS += "-Wl,-subsystem,$(WINSUBSYS)" ;
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 $(<)
73 rule check-setup-windoze {
74 if ! $(NT) && $(WINDOZE) {
83 if $(WINDOZE_THREADS) {
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 ; }