Module: wine Branch: master Commit: a58f4abc08212116e39337c745aa6b5d3a7ca212 URL: https://source.winehq.org/git/wine.git/?a=commit;h=a58f4abc08212116e39337c74...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Apr 24 11:27:39 2019 +0200
makefiles: Allow using EXTRADLLFLAGS instead of APPMODE.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
programs/notepad/Makefile.in | 3 ++- programs/reg/Makefile.in | 3 ++- programs/regedit/Makefile.in | 3 ++- programs/taskmgr/Makefile.in | 3 ++- programs/wordpad/Makefile.in | 3 ++- programs/xcopy/Makefile.in | 3 ++- tools/make_makefiles | 10 +++++++--- 7 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/programs/notepad/Makefile.in b/programs/notepad/Makefile.in index 26e977d..06c5ff0 100644 --- a/programs/notepad/Makefile.in +++ b/programs/notepad/Makefile.in @@ -1,7 +1,8 @@ MODULE = notepad.exe -APPMODE = -mwindows -mno-cygwin IMPORTS = comdlg32 shell32 shlwapi user32 gdi32 advapi32
+EXTRADLLFLAGS = -mwindows -mno-cygwin + C_SRCS = \ dialog.c \ main.c diff --git a/programs/reg/Makefile.in b/programs/reg/Makefile.in index 7c6a899..248b470 100644 --- a/programs/reg/Makefile.in +++ b/programs/reg/Makefile.in @@ -1,8 +1,9 @@ MODULE = reg.exe -APPMODE = -mconsole -municode -mno-cygwin IMPORTS = advapi32 DELAYIMPORTS = user32
+EXTRADLLFLAGS = -mconsole -municode -mno-cygwin + C_SRCS = \ export.c \ import.c \ diff --git a/programs/regedit/Makefile.in b/programs/regedit/Makefile.in index 18602ef..5b9df84 100644 --- a/programs/regedit/Makefile.in +++ b/programs/regedit/Makefile.in @@ -1,8 +1,9 @@ MODULE = regedit.exe -APPMODE = -mwindows -municode -mno-cygwin IMPORTS = advapi32 DELAYIMPORTS = shlwapi shell32 comdlg32 comctl32 user32 gdi32
+EXTRADLLFLAGS = -mwindows -municode -mno-cygwin + C_SRCS = \ about.c \ childwnd.c \ diff --git a/programs/taskmgr/Makefile.in b/programs/taskmgr/Makefile.in index 6006ac3..c385e9b 100644 --- a/programs/taskmgr/Makefile.in +++ b/programs/taskmgr/Makefile.in @@ -1,7 +1,8 @@ MODULE = taskmgr.exe -APPMODE = -mwindows -mno-cygwin IMPORTS = shell32 shlwapi comctl32 user32 gdi32 advapi32
+EXTRADLLFLAGS = -mwindows -mno-cygwin + C_SRCS = \ about.c \ affinity.c \ diff --git a/programs/wordpad/Makefile.in b/programs/wordpad/Makefile.in index 5778692..ea12d91 100644 --- a/programs/wordpad/Makefile.in +++ b/programs/wordpad/Makefile.in @@ -1,7 +1,8 @@ MODULE = wordpad.exe -APPMODE = -mwindows -mno-cygwin IMPORTS = comdlg32 uuid ole32 shell32 user32 gdi32 advapi32 comctl32
+EXTRADLLFLAGS = -mwindows -mno-cygwin + C_SRCS = \ olecallback.c \ print.c \ diff --git a/programs/xcopy/Makefile.in b/programs/xcopy/Makefile.in index 05931c5..5059e71 100644 --- a/programs/xcopy/Makefile.in +++ b/programs/xcopy/Makefile.in @@ -1,7 +1,8 @@ MODULE = xcopy.exe -APPMODE = -mconsole -municode -mno-cygwin IMPORTS = shell32 user32
+EXTRADLLFLAGS = -mconsole -municode -mno-cygwin + C_SRCS = \ xcopy.c
diff --git a/tools/make_makefiles b/tools/make_makefiles index 111bc8f..7c376ac 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -229,7 +229,7 @@ sub parse_makefile($) { die "Configure substitution is not allowed in $file" unless $file eq "Makefile"; } - if (/^\s*(MODULE|IMPORTLIB|TESTDLL|PARENTSRC|APPMODE)\s*=\s*(.*)/) + if (/^\s*(MODULE|IMPORTLIB|TESTDLL|PARENTSRC|APPMODE|EXTRADLLFLAGS)\s*=\s*(.*)/) { my $var = $1; $make{$var} = $2; @@ -438,18 +438,21 @@ sub update_makefiles(@) elsif (defined($make{"MODULE"})) # dll or program { (my $name = $file) =~ s/^(dlls|programs)/(.*)/Makefile/$2/; + my $dllflags = $make{"EXTRADLLFLAGS"} || ""; + if (defined $make{"APPMODE"}) { $dllflags .= " " . $make{"APPMODE"}; } die "MODULE should not be defined in $file" unless $file =~ /^(dlls|programs)//; die "STATICLIB should not be defined in $file" if defined $make{"STATICLIB"}; die "Invalid MODULE in $file" if $name =~ /./ && $make{"MODULE"} ne $name; if ($file =~ /^programs//) { - die "APPMODE should be defined in $file" unless defined $make{"APPMODE"} ; - die "APPMODE should contain -mconsole or -mwindows in $file" unless $make{"APPMODE"} =~ /-m(console|windows)/; + die "EXTRADLLFLAGS should be defined in $file" unless $dllflags; + die "EXTRADLLFLAGS should contain -mconsole or -mwindows in $file" unless $dllflags =~ /-m(console|windows)/; die "Invalid MODULE in $file" unless $name =~ /./ || $make{"MODULE"} eq "$name.exe"; } else { die "APPMODE should not be defined in $file" if defined $make{"APPMODE"} ; + die "EXTRADLLFLAGS should not contain -mconsole or -mwindows in $file" if $dllflags =~ /-m(console|windows)/; die "Invalid MODULE in $file" unless $name =~ /./ || $make{"MODULE"} eq "$name.dll"; } if (defined $make{"IMPORTLIB"}) @@ -462,6 +465,7 @@ sub update_makefiles(@) elsif ($file =~ /^tools.*/Makefile$/) { die "APPMODE should not be defined in $file" if defined $make{"APPMODE"}; + die "EXTRADLLFLAGS should not be defined in $file" if defined $make{"EXTRADLLFLAGS"}; die "STATICLIB should not be defined in $file" if defined $make{"STATICLIB"}; $args = ",,[test "x$enable_tools" = xno]"; }