diff --git a/Make.rules.in b/Make.rules.in index 94bb8834a97..456180d169c 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -107,7 +107,7 @@ prog_manext = 1 api_manext = 3w conf_manext = 5 CLEAN_FILES = *.o *.a *.so *.ln *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \ - *.flc *.dbg.c *.tab.c *.tab.h @LEX_OUTPUT_ROOT@.c core + *.flc *.tab.c *.tab.h @LEX_OUTPUT_ROOT@.c core OBJS = $(C_SRCS:.c=.o) $(EXTRA_OBJS) @@ -167,11 +167,6 @@ $(RC_BINARIES): $(BIN2RES) $(RC_BINSRC) $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res): $(WRC) $(RC_BINARIES) $(RC_TLB) -# Rule for main module debug channels - -$(MODULE).dbg.c: $(C_SRCS) $(C_SRCS16) $(WINEBUILD) - $(WINEBUILD) $(DEFS) -o $@ --debug -C$(SRCDIR) $(C_SRCS) $(C_SRCS16) - # Rules for makefile Makefile: Makefile.in $(TOPSRCDIR)/configure diff --git a/Makefile.in b/Makefile.in index c2e260caf71..64c7298922b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -136,10 +136,10 @@ $(TESTSUBDIRS:%=%/__crosstest__): tools include # Misc rules TAGS etags: - find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.dbg.c' -print | etags - + find $(TOPSRCDIR) -name '*.[ch]' -print | etags - tags ctags: - find $(TOPSRCDIR) -name '*.[ch]' -a -not -name '*.dbg.c' -print | ctags --c-types=+px -L - + find $(TOPSRCDIR) -name '*.[ch]' -print | ctags --c-types=+px -L - manpages htmlpages sgmlpages: cd documentation && $(MAKE) $@ diff --git a/dlls/Makedll.rules.in b/dlls/Makedll.rules.in index 6fa914d925e..ebdc2f11261 100644 --- a/dlls/Makedll.rules.in +++ b/dlls/Makedll.rules.in @@ -18,7 +18,7 @@ BASEMODULE = $(MODULE:%.dll=%) MAINSPEC = $(BASEMODULE).spec SPEC_DEF = lib$(BASEMODULE).def WIN16_FILES = $(SPEC_SRCS16:.spec=.spec.o) $(C_SRCS16:.c=.o) $(EXTRA_OBJS16) -ALL_OBJS = @WIN16_FILES@ $(OBJS) $(MODULE).dbg.o $(RC_SRCS:.rc=.res) +ALL_OBJS = @WIN16_FILES@ $(OBJS) $(RC_SRCS:.rc=.res) ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS) ALL_IMPORTS = $(DELAYIMPORTS) $(IMPORTS) IMPLIB_OBJS = $(IMPLIB_SRCS:.c=.o) @@ -36,8 +36,8 @@ $(MODULE).so: $(MAINSPEC) $(ALL_OBJS) Makefile.in # Rules for .dll files -$(MODULE): $(RCOBJS) $(OBJS) $(MODULE).dbg.o $(SPEC_DEF) Makefile.in - $(DLLWRAP) -k --def $(SPEC_DEF) -o $@ $(RCOBJS) $(OBJS) $(MODULE).dbg.o $(DLL_LDPATH) $(ALL_IMPORTS:%=-l%) $(ALL_LIBS) +$(MODULE): $(RCOBJS) $(OBJS) $(SPEC_DEF) Makefile.in + $(DLLWRAP) -k --def $(SPEC_DEF) -o $@ $(RCOBJS) $(OBJS) $(DLL_LDPATH) $(ALL_IMPORTS:%=-l%) $(ALL_LIBS) # Rules for import libraries @@ -68,8 +68,8 @@ $(SUBDIRS): implib $(WIN16_FILES:%=__checklink16__%): checklink16 -checklink16:: $(MAINSPEC).o $(OBJS) $(MODULE).dbg.o dummy - $(CC) -o checklink -Wl,-rpath,$(TOPOBJDIR)/libs $(TOPSRCDIR)/dlls/checklink.c $(MAINSPEC).o $(OBJS) $(MODULE).dbg.o -L$(DLLDIR) $(ALL_LIBS) -lwinecrt0 -lm && $(RM) checklink $(MAINSPEC).o +checklink16:: $(MAINSPEC).o $(OBJS) dummy + $(CC) -o checklink -Wl,-rpath,$(TOPOBJDIR)/libs $(TOPSRCDIR)/dlls/checklink.c $(MAINSPEC).o $(OBJS) -L$(DLLDIR) $(ALL_LIBS) -lwinecrt0 -lm && $(RM) checklink $(MAINSPEC).o checklink:: $(WIN16_FILES:%=__checklink16__%) diff --git a/dlls/dxerr8/Makefile.in b/dlls/dxerr8/Makefile.in index d1eb28c79c4..4167db2c353 100644 --- a/dlls/dxerr8/Makefile.in +++ b/dlls/dxerr8/Makefile.in @@ -7,8 +7,6 @@ MODULE = libdxerr8.a C_SRCS = \ dxerr8.c -EXTRA_OBJS = $(MODULE).dbg.o - @MAKE_IMPLIB_RULES@ ### Dependencies: diff --git a/dlls/dxerr9/Makefile.in b/dlls/dxerr9/Makefile.in index 7a8f2fa6708..0a2a0051535 100644 --- a/dlls/dxerr9/Makefile.in +++ b/dlls/dxerr9/Makefile.in @@ -7,8 +7,6 @@ MODULE = libdxerr9.a C_SRCS = \ dxerr9.c -EXTRA_OBJS = $(MODULE).dbg.o - @MAKE_IMPLIB_RULES@ ### Dependencies: diff --git a/dlls/kernel/process.c b/dlls/kernel/process.c index f599729660e..fcfeb7c22da 100644 --- a/dlls/kernel/process.c +++ b/dlls/kernel/process.c @@ -933,12 +933,9 @@ static BOOL process_init(void) { static const WCHAR kernel32W[] = {'k','e','r','n','e','l','3','2',0}; PEB *peb = NtCurrentTeb()->Peb; - extern void __wine_dbg_kernel32_init(void); PTHREAD_Init(); - __wine_dbg_kernel32_init(); /* hack: register debug channels early */ - setbuf(stdout,NULL); setbuf(stderr,NULL); setlocale(LC_CTYPE,""); diff --git a/dlls/ntdll/debugtools.c b/dlls/ntdll/debugtools.c index 2f0be3dcad7..ce2e65bed08 100644 --- a/dlls/ntdll/debugtools.c +++ b/dlls/ntdll/debugtools.c @@ -200,8 +200,5 @@ static const struct __wine_debug_functions funcs = */ void debug_init(void) { - extern void __wine_dbg_ntdll_init(void); - __wine_dbg_set_functions( &funcs, &default_funcs, sizeof(funcs) ); - __wine_dbg_ntdll_init(); /* hack: register debug channels early */ } diff --git a/include/wine/debug.h b/include/wine/debug.h index 4393b3b4211..aca055fec5b 100644 --- a/include/wine/debug.h +++ b/include/wine/debug.h @@ -234,9 +234,9 @@ static inline const char *wine_dbgstr_longlong( ULONGLONG ll ) #define WINE_ERR_ON(ch) __WINE_IS_DEBUG_ON(_ERR,&__wine_dbch_##ch) #define WINE_DECLARE_DEBUG_CHANNEL(ch) \ - extern struct __wine_debug_channel __wine_dbch_##ch + static struct __wine_debug_channel __wine_dbch_##ch = { ~0, #ch } #define WINE_DEFAULT_DEBUG_CHANNEL(ch) \ - extern struct __wine_debug_channel __wine_dbch_##ch; \ + static struct __wine_debug_channel __wine_dbch_##ch = { ~0, #ch }; \ static struct __wine_debug_channel * const __wine_dbch___default = &__wine_dbch_##ch #define WINE_DPRINTF wine_dbg_printf diff --git a/programs/Makeprog.rules.in b/programs/Makeprog.rules.in index c001cfc61e0..308ea278105 100644 --- a/programs/Makeprog.rules.in +++ b/programs/Makeprog.rules.in @@ -12,7 +12,6 @@ DLLDEFS = @DLLDEFS@ DLLFLAGS = @DLLFLAGS@ DEFS = $(DLLDEFS) $(EXTRADEFS) -ALL_OBJS = $(OBJS) $(MODULE).dbg.o ALL_IMPORTS = $(DELAYIMPORTS) $(IMPORTS) ALL_LIBS = $(ALL_IMPORTS:%=-l%) $(LIBWINE) $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS) DLL_LDPATH = -L$(DLLDIR) $(ALL_IMPORTS:%=-L$(DLLDIR)/%) @@ -25,16 +24,16 @@ all: $(MODULE)$(DLLEXT) $(BASEMODULE)$(EXEEXT) # Rules for .so main module -$(MODULE).so: $(ALL_OBJS) $(RC_SRCS:.rc=.res) Makefile.in - $(WINEGCC) -B$(TOOLSDIR)/tools/winebuild $(APPMODE) $(ALL_OBJS) $(RC_SRCS:.rc=.res) -o $@ $(DLL_LDPATH) $(ALL_LIBS) $(DELAYIMPORTS:%=-Wb,-d%) +$(MODULE).so: $(OBJS) $(RC_SRCS:.rc=.res) Makefile.in + $(WINEGCC) -B$(TOOLSDIR)/tools/winebuild $(APPMODE) $(OBJS) $(RC_SRCS:.rc=.res) -o $@ $(DLL_LDPATH) $(ALL_LIBS) $(DELAYIMPORTS:%=-Wb,-d%) $(BASEMODULE): $(WINEWRAPPER) $(RM) $@ && $(LN_S) $(WINEWRAPPER) $@ # Rules for .exe main module -$(MODULE): $(ALL_OBJS) $(RCOBJS) Makefile.in - $(CC) $(APPMODE) $(ALL_OBJS) $(RCOBJS) -o $@ $(ALL_LIBS) +$(MODULE): $(OBJS) $(RCOBJS) Makefile.in + $(CC) $(APPMODE) $(OBJS) $(RCOBJS) -o $@ $(ALL_LIBS) # Rules for testing