diff --git a/Make.rules.in b/Make.rules.in index c4b70ac0947..68a591d4b84 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -54,8 +54,9 @@ LINT = @LINT@ LINTFLAGS = @LINTFLAGS@ INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL) EXTRACFLAGS = @EXTRACFLAGS@ -ALLCFLAGS = $(INCLUDES) $(DEFS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) +ALLCFLAGS = $(INCLUDES) $(DEFS) $(DLLFLAGS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) ALLLINTFLAGS = $(INCLUDES) $(DEFS) $(LINTFLAGS) +IDLFLAGS = $(INCLUDES) $(DEFS) $(EXTRAIDLFLAGS) MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs -m 755 WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi_check/winapi_check WINEWRAPPER = $(TOPSRCDIR)/tools/winewrapper diff --git a/dlls/Makedll.rules.in b/dlls/Makedll.rules.in index 933d1a8859c..a6b783caaab 100644 --- a/dlls/Makedll.rules.in +++ b/dlls/Makedll.rules.in @@ -9,7 +9,8 @@ # plus all variables required by the global Make.rules.in # -DEFS = @DLLFLAGS@ -D__WINESRC__ $(EXTRADEFS) +DEFS = -D__WINESRC__ $(EXTRADEFS) +DLLFLAGS = @DLLFLAGS@ DLLEXT = @DLLEXT@ MAINSPEC = $(MODULE:%.dll=%).spec SPEC_DEF = $(MAINSPEC).def @@ -25,7 +26,7 @@ all: $(MODULE)$(DLLEXT) $(SUBDIRS) # Rules for .so files $(MAINSPEC).c: $(MAINSPEC) $(RC_SRCS:.rc=.res) $(SYMBOLFILE) $(IMPORTLIBS) $(WINEBUILD) - $(WINEBUILD) $(DEFS) -o $@ --spec $(SRCDIR)/$(MAINSPEC) $(RC_SRCS:.rc=.res) $(SYMBOLFILE) $(DLLMAIN:%=--entry %) -L$(DLLDIR) $(DELAYIMPORTS:%=-d%) $(IMPORTS:%=-l%) + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --spec $(SRCDIR)/$(MAINSPEC) $(RC_SRCS:.rc=.res) $(SYMBOLFILE) $(DLLMAIN:%=--entry %) -L$(DLLDIR) $(DELAYIMPORTS:%=-d%) $(IMPORTS:%=-l%) $(MODULE).so: $(MAINSPEC).o $(ALL_OBJS) Makefile.in $(LDSHARED) $(LDDLLFLAGS) $(MAINSPEC).o $(ALL_OBJS) -o $@ -L$(DLLDIR) $(LDIMPORTS:%=-l%) $(ALL_LIBS) -lc diff --git a/dlls/Maketest.rules.in b/dlls/Maketest.rules.in index fb6dc35cf0a..53971fb4671 100644 --- a/dlls/Maketest.rules.in +++ b/dlls/Maketest.rules.in @@ -9,7 +9,8 @@ # plus all variables required by the global Make.rules.in # -DEFS = @DLLFLAGS@ $(EXTRADEFS) +DEFS = $(EXTRADEFS) +DLLFLAGS = @DLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@ MODULE = $(TESTDLL:%.dll=%)_test.exe @@ -36,7 +37,7 @@ all: $(TESTPROGRAM) # Rule for main module spec file $(MODULE).spec.c: $(RC_SRCS:.rc=.res) $(OBJS) $(IMPORTLIBS) $(WINEBUILD) - $(WINEBUILD) $(DEFS) -o $@ --exe $(MODULE) --exe-mode cui $(RC_SRCS:.rc=.res) $(OBJS) -L$(DLLDIR) $(IMPORTS:%=-l%) + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --exe $(MODULE) --exe-mode cui $(RC_SRCS:.rc=.res) $(OBJS) -L$(DLLDIR) $(IMPORTS:%=-l%) # Rules for .so main module diff --git a/dlls/gdi/Makefile.in b/dlls/gdi/Makefile.in index f4692ff2811..ac9310a932b 100644 --- a/dlls/gdi/Makefile.in +++ b/dlls/gdi/Makefile.in @@ -81,7 +81,7 @@ EXTRASUBDIRS = \ # Special rules for 16-bit resource and spec files gdi.exe.spec.c: gdi.exe.spec version16.res - $(WINEBUILD) $(DEFS) -o $@ --heap 65520 --main-module $(MODULE) --res version16.res --spec $(SRCDIR)/gdi.exe.spec + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --heap 65520 --main-module $(MODULE) --res version16.res --spec $(SRCDIR)/gdi.exe.spec version16.res: version16.rc $(LDPATH) $(RC16) $(RC16FLAGS) -fo$@ $(SRCDIR)/version16.rc diff --git a/dlls/kernel/Makefile.in b/dlls/kernel/Makefile.in index d3cc40cffe2..78db68eaef8 100644 --- a/dlls/kernel/Makefile.in +++ b/dlls/kernel/Makefile.in @@ -93,12 +93,12 @@ EXTRASUBDIRS = messages nls kernel.res: $(MC_SRCS:.mc=.mc.rc) relay16asm.s: $(WINEBUILD) - $(WINEBUILD) $(DEFS) -o $@ --relay16 + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --relay16 # Special rules for 16-bit resource and spec files krnl386.exe.spec.c: krnl386.exe.spec version16.res - $(WINEBUILD) $(DEFS) -o $@ --dll-name kernel --main-module $(MODULE) --res version16.res --spec $(SRCDIR)/krnl386.exe.spec + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --dll-name kernel --main-module $(MODULE) --res version16.res --spec $(SRCDIR)/krnl386.exe.spec version16.res: version16.rc $(LDPATH) $(RC16) $(RC16FLAGS) -fo$@ $(SRCDIR)/version16.rc diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in index 607ee97ae76..67c59179941 100644 --- a/dlls/ntdll/Makefile.in +++ b/dlls/ntdll/Makefile.in @@ -86,7 +86,7 @@ EXTRASUBDIRS = \ @MAKE_DLL_RULES@ relay32.s: $(WINEBUILD) - $(WINEBUILD) $(DEFS) -o $@ --relay32 + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --relay32 clean:: $(RM) $(ASM_SRCS) diff --git a/dlls/shell32/Makefile.in b/dlls/shell32/Makefile.in index 0aed6d7e786..f23b264293c 100644 --- a/dlls/shell32/Makefile.in +++ b/dlls/shell32/Makefile.in @@ -66,6 +66,6 @@ version16.res: version16.rc $(LDPATH) $(RC16) $(RC16FLAGS) -fo$@ $(SRCDIR)/version16.rc shell.spec.c: shell.spec version16.res - $(WINEBUILD) $(DEFS) -o $@ --main-module $(MODULE) --res version16.res --spec $(SRCDIR)/shell.spec + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --main-module $(MODULE) --res version16.res --spec $(SRCDIR)/shell.spec ### Dependencies: diff --git a/dlls/user/Makefile.in b/dlls/user/Makefile.in index a8e2c09d6a4..ba4b7069c50 100644 --- a/dlls/user/Makefile.in +++ b/dlls/user/Makefile.in @@ -111,13 +111,13 @@ EXTRASUBDIRS = \ # Special rules for 16-bit resource and spec files user.exe.spec.c: user.exe.spec resources/version16.res - $(WINEBUILD) $(DEFS) -o $@ --heap 65520 --main-module $(MODULE) --res resources/version16.res --spec $(SRCDIR)/user.exe.spec + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --heap 65520 --main-module $(MODULE) --res resources/version16.res --spec $(SRCDIR)/user.exe.spec display.spec.c: display.spec resources/display.res - $(WINEBUILD) $(DEFS) -o $@ --main-module $(MODULE) --res resources/display.res --spec $(SRCDIR)/display.spec + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --main-module $(MODULE) --res resources/display.res --spec $(SRCDIR)/display.spec mouse.spec.c: mouse.spec resources/mouse.res - $(WINEBUILD) $(DEFS) -o $@ --main-module $(MODULE) --res resources/mouse.res --spec $(SRCDIR)/mouse.spec + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --main-module $(MODULE) --res resources/mouse.res --spec $(SRCDIR)/mouse.spec resources/display.res: resources/display.rc $(LDPATH) $(RC16) $(RC16FLAGS) -fo$@ $(SRCDIR)/resources/display.rc diff --git a/include/Makefile.in b/include/Makefile.in index b7dcd81ebc0..e4c365164a7 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -254,7 +254,7 @@ EXTRASUBDIRS = bitmaps msvcrt msvcrt/sys wine .SUFFIXES: .idl .h .idl.h: - $(WIDL) $(DEFS) -b -h -H $@ $< + $(WIDL) $(IDLFLAGS) -b -h -H $@ $< .PHONY: idl diff --git a/libs/Makelib.rules.in b/libs/Makelib.rules.in index 712af0d9546..87dfb9f447a 100644 --- a/libs/Makelib.rules.in +++ b/libs/Makelib.rules.in @@ -7,7 +7,8 @@ # plus all variables required by the global Make.rules.in # -DEFS = @DLLFLAGS@ $(EXTRADEFS) +DEFS = $(EXTRADEFS) +DLLFLAGS = @DLLFLAGS@ LIBEXT = @LIBEXT@ LIBNAME = lib$(LIBRARY) DEFNAME = $(LIBRARY).def diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in index 11eecc838ee..2fcfd0552b8 100644 --- a/libs/port/Makefile.in +++ b/libs/port/Makefile.in @@ -1,4 +1,5 @@ -DEFS = @DLLFLAGS@ -D__WINESRC__ +DEFS = -D__WINESRC__ +DLLFLAGS = @DLLFLAGS@ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ diff --git a/libs/uuid/Makefile.in b/libs/uuid/Makefile.in index 43dbb1bafa4..53241bc1c86 100644 --- a/libs/uuid/Makefile.in +++ b/libs/uuid/Makefile.in @@ -1,4 +1,5 @@ -DEFS = @DLLFLAGS@ -D__WINESRC__ +DEFS = -D__WINESRC__ +DLLFLAGS = @DLLFLAGS@ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ diff --git a/programs/Makeprog.rules.in b/programs/Makeprog.rules.in index 47441834a61..d632fe701b8 100644 --- a/programs/Makeprog.rules.in +++ b/programs/Makeprog.rules.in @@ -9,7 +9,8 @@ # plus all variables required by the global Make.rules.in # -DEFS = @DLLFLAGS@ $(EXTRADEFS) +DEFS = $(EXTRADEFS) +DLLFLAGS = @DLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@ ALL_OBJS = $(OBJS) $(MODULE).dbg.o ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS) @@ -24,7 +25,7 @@ all: $(MODULE)$(DLLEXT) $(BASEMODULE)$(EXEEXT) # Rule for main module spec file $(MODULE).spec.c: $(RC_SRCS:.rc=.res) $(ALL_OBJS) $(WINEBUILD) - $(WINEBUILD) $(DEFS) -o $@ --exe $(MODULE) $(APPMODE:%=--exe-mode %) $(RC_SRCS:.rc=.res) $(ALL_OBJS) -L$(DLLDIR) $(DELAYIMPORTS:%=-d%) $(IMPORTS:%=-l%) + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --exe $(MODULE) $(APPMODE:%=--exe-mode %) $(RC_SRCS:.rc=.res) $(ALL_OBJS) -L$(DLLDIR) $(DELAYIMPORTS:%=-d%) $(IMPORTS:%=-l%) # Rules for .so main module diff --git a/programs/avitools/Makefile.in b/programs/avitools/Makefile.in index 82d6ce2ec71..7bb536728ea 100644 --- a/programs/avitools/Makefile.in +++ b/programs/avitools/Makefile.in @@ -1,4 +1,5 @@ -DEFS = @DLLFLAGS@ $(EXTRADEFS) +DEFS = $(EXTRADEFS) +DLLFLAGS = @DLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = ../.. @@ -18,13 +19,13 @@ C_SRCS = \ all: $(PROGRAMS:%=%$(DLLEXT)) $(PROGRAMS:.exe=$(EXEEXT)) aviinfo.exe.spec.c: aviinfo.o $(WINEBUILD) - $(WINEBUILD) $(DEFS) -o $@ --exe aviinfo.exe --exe-mode gui aviinfo.o -L$(DLLDIR) -lkernel32 + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --exe aviinfo.exe --exe-mode gui aviinfo.o -L$(DLLDIR) -lkernel32 aviplay.exe.spec.c: aviplay.o $(WINEBUILD) - $(WINEBUILD) $(DEFS) -o $@ --exe aviplay.exe --exe-mode gui aviplay.o -L$(DLLDIR) -lddraw -lkernel32 + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --exe aviplay.exe --exe-mode gui aviplay.o -L$(DLLDIR) -lddraw -lkernel32 icinfo.exe.spec.c: icinfo.o $(WINEBUILD) - $(WINEBUILD) $(DEFS) -o $@ --exe icinfo.exe --exe-mode gui icinfo.o -L$(DLLDIR) -lmsvfw32 -lkernel32 + $(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --exe icinfo.exe --exe-mode gui icinfo.o -L$(DLLDIR) -lmsvfw32 -lkernel32 aviinfo.exe.so: aviinfo.o aviinfo.exe.spec.o $(LDSHARED) $(LDDLLFLAGS) -o $@ aviinfo.o aviinfo.exe.spec.o $(ALL_LIBS) -lc