Commit ad53383f authored by Alexandre Julliard's avatar Alexandre Julliard

Added winebuild support for generating a .dbg.c file containing the

debug channels definitions. Made win32 the default type for spec files. Ignore C compiler in winebuild so we can simply pass it $(DEFS). Removed type win32 and debug_channels from spec files. Fixed winebuild to always generate correct C identifiers (reported by Vincent Béron).
parent ec329ab3
......@@ -107,7 +107,7 @@ dlldir = @libdir@/wine
prog_manext = 1
conf_manext = 5
CLEAN_FILES = *.o *.a *.so *.ln *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \
*.flc *.spec.c *.spec.def *.glue.c y.tab.c y.tab.h @LEX_OUTPUT_ROOT@.c core
*.flc *.spec.c *.spec.def *.glue.c *.dbg.c y.tab.c y.tab.h @LEX_OUTPUT_ROOT@.c core
OBJS = $(C_SRCS:.c=.o) $(GEN_C_SRCS:.c=.o) $(GEN_ASM_SRCS:.s=.o) \
$(ASM_SRCS:.S=.o) $(GLUE:.c=.glue.o) $(EXTRA_OBJS)
......@@ -137,13 +137,13 @@ LINTS = $(C_SRCS:.c=.ln)
$(WINDRES) -i $< -o $@
.spec.spec.c:
$(LDPATH) $(WINEBUILD) @DLLFLAGS@ -o $@ -spec $<
$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -spec $<
.spec.spec.def:
$(LDPATH) $(WINEBUILD) @DLLFLAGS@ -o $@ -def $<
$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -def $<
.c.glue.c:
$(LDPATH) $(WINEBUILD) @DLLFLAGS@ -o $@ -glue $<
$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -glue $<
.c.ln:
$(LINT) -c $(ALLLINTFLAGS) $< || ( $(RM) $@ && exit 1 )
......@@ -169,6 +169,11 @@ $(MODULE).tmp.o: $(SPEC_SRCS:.spec=.spec.o) $(OBJS) Makefile.in
$(LDCOMBINE) $(SPEC_SRCS:.spec=.spec.o) $(OBJS) -o $@
-$(STRIP) --strip-unneeded $@
# Rule for main module debug channels
$(MODULE).dbg.c: $(C_SRCS) $(WINEBUILD)
$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -debug -C$(SRCDIR) $(C_SRCS)
# Rule to rebuild the resource compiler
$(WRC):
......@@ -232,8 +237,8 @@ winapi_check::
$(SUBDIRS:%=%/__depend__): $(MAKEDEP) dummy
cd `dirname $@` && $(MAKE) depend
depend: $(MAKEDEP) $(GEN_C_SRCS) $(SUBDIRS:%=%/__depend__)
$(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(EXTRA_SRCS) $(CTESTS) -C. $(GEN_C_SRCS)
depend: $(MAKEDEP) $(SUBDIRS:%=%/__depend__)
$(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(EXTRA_SRCS) $(CTESTS)
# Rules for cleaning
......@@ -290,7 +295,7 @@ $(TESTPROGRAM).tmp.o: $(TESTOBJS)
-$(STRIP) --strip-unneeded $@
$(TESTPROGRAM).spec.c: $(TESTPROGRAM).tmp.o $(WINEBUILD)
$(LDPATH) $(WINEBUILD) @DLLFLAGS@ -sym $(TESTPROGRAM).tmp.o -o $@ -exe $(TESTPROGRAM) -mcui -L$(DLLDIR) $(TESTIMPORTS:%=-l%)
$(LDPATH) $(WINEBUILD) $(DEFS) -sym $(TESTPROGRAM).tmp.o -o $@ -exe $(TESTPROGRAM) -mcui -L$(DLLDIR) $(TESTIMPORTS:%=-l%)
$(TESTPROGRAM).exe: $(TESTOBJS)
$(CC) $(TESTOBJS) -o $@ $(TESTIMPORTS:%=-l%) $(LIBWINE) $(LIBS)
......
Makefile
lex.yy.c
winedbg
winedbg.dbg.c
winedbg.spec.c
y.tab.c
y.tab.h
......@@ -14,7 +14,7 @@ ALTSPECS = $(ALTNAMES:%.dll=%)
SPEC_SRCS = $(ALTSPECS:%=%.spec)
MAINSPEC = $(MODULE:%.dll=%).spec
SPEC_DEF = $(MAINSPEC).def
ALL_OBJS = $(MAINSPEC).o $(SPEC_SRCS:.spec=.spec.o) $(OBJS)
ALL_OBJS = $(MAINSPEC).o $(SPEC_SRCS:.spec=.spec.o) $(OBJS) $(MODULE).dbg.o
ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBS)
TESTIMPORTS = $(MODULE) $(DELAYIMPORTS) $(IMPORTS)
......@@ -25,7 +25,7 @@ all: $(MODULE)$(DLLEXT)
# Rule for main module spec file
$(MAINSPEC).c: $(MAINSPEC) $(RC_SRCS:.rc=.res) $(SYMBOLFILE) $(WINEBUILD)
$(LDPATH) $(WINEBUILD) @DLLFLAGS@ $(SYMBOLFILE:%=-sym %) -o $@ -spec $(SRCDIR)/$(MAINSPEC) $(RC_SRCS:%.rc=-res %.res) -L$(DLLDIR) $(DELAYIMPORTS:%=-dl%) $(IMPORTS:%=-l%)
$(LDPATH) $(WINEBUILD) $(DEFS) $(SYMBOLFILE:%=-sym %) -o $@ -spec $(SRCDIR)/$(MAINSPEC) $(RC_SRCS:%.rc=-res %.res) -L$(DLLDIR) $(DELAYIMPORTS:%=-dl%) $(IMPORTS:%=-l%)
# Rules for .so files
......@@ -34,8 +34,8 @@ $(MODULE).so: $(ALL_OBJS) Makefile.in
# Rules for .dll files
$(MODULE): $(OBJS) $(SPEC_DEF) Makefile.in
$(DLLWRAP) $(DLLWRAPFLAGS) --def $(SPEC_DEF) --implib $(MODULE:.dll=.a) -o $(MODULE) $(OBJS) -L$(DLLDIR) $(IMPORTS:%=-l%) $(ALL_LIBS)
$(MODULE): $(OBJS) $(MODULE).dbg.o $(SPEC_DEF) Makefile.in
$(DLLWRAP) $(DLLWRAPFLAGS) --def $(SPEC_DEF) --implib $(MODULE:.dll=.a) -o $(MODULE) $(OBJS) $(MODULE).dbg.o -L$(DLLDIR) $(IMPORTS:%=-l%) $(ALL_LIBS)
$(SPEC_DEF): $(WINEBUILD)
......@@ -48,11 +48,6 @@ checklink:: $(MODULE)$(DLLEXT)
$(TESTRESULTS): $(MODULE)$(DLLEXT)
# Rules for debug channels
debug_channels: dummy
$(TOPSRCDIR)/tools/make_debug $(MAINSPEC) $(C_SRCS) $(SUBDIRS:%=%/*.c)
# Sanity check
Makedll.rules: $(TOPSRCDIR)/Makedll.rules.in $(TOPSRCDIR)/configure
......
Makefile
advapi32.dll.dbg.c
advapi32.spec.c
name advapi32
type win32
debug_channels (advapi crypt reg)
@ stdcall AbortSystemShutdownA(ptr) AbortSystemShutdownA
@ stdcall AbortSystemShutdownW(ptr) AbortSystemShutdownW
......
Makefile
avicap32.dll.dbg.c
avicap32.spec.c
name avicap32
type win32
debug_channels ()
Makefile
avifil32.dll.dbg.c
avifil32.spec.c
avifile.spec.c
name avifil32
type win32
debug_channels (avifile)
@ stub AVIBuildFilter
@ stub AVIBuildFilterA
......
Makefile
comctl32.dll.dbg.c
comctl32.spec.c
rsrc.res
name comctl32
type win32
init COMCTL32_LibMain
debug_channels (animate comboex commctrl datetime header hotkey imagelist ipaddress
listview message monthcal nativefont pager progress propsheet
rebar statusbar tab toolbar tooltips trackbar treeview updown)
# Functions exported by the Win95 comctl32.dll
# (these need to have these exact ordinals, because some win95 dlls
# import comctl32.dll by ordinal)
......
Makefile
comdlg32.dll.dbg.c
comdlg32.spec.c
commdlg.spec.c
rsrc.res
name comdlg32
type win32
init COMDLG32_DllEntryPoint
debug_channels (commdlg)
@ stdcall ChooseColorA(ptr) ChooseColorA
@ stdcall ChooseColorW(ptr) ChooseColorW
@ stdcall ChooseFontA(ptr) ChooseFontA
......
Makefile
crtdll.dll.dbg.c
crtdll.spec.c
# Old C runtime library. All functions provided by msvcrt
name crtdll
type win32
init CRTDLL_Init
debug_channels (crtdll)
@ forward ??2@YAPAXI@Z msvcrt.??2@YAPAXI@Z
@ forward ??3@YAXPAX@Z msvcrt.??3@YAXPAX@Z
@ forward ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z msvcrt.?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z
......
Makefile
crypt32.dll.dbg.c
crypt32.spec.c
name crypt32
type win32
debug_channels ()
@ stub CertAddCRLContextToStore
@ stub CertAddCTLContextToStore
......
Makefile
dciman32.dll.dbg.c
dciman32.spec.c
name dciman32
type win32
@ stub DCIBeginAccess
@ stdcall DCICloseProvider(long) DCICloseProvider
......
Makefile
ddraw.dll.dbg.c
ddraw.spec.c
version.res
name ddraw
type win32
init DDRAW_DllMain
debug_channels (ddraw)
@ stub DDHAL32_VidMemAlloc
@ stub DDHAL32_VidMemFree
@ stub DDInternalLock
......
Makefile
devenum.dll.dbg.c
devenum.spec.c
name devenum
type win32
debug_channels()
@ stub DllCanUnloadNow
@ stub DllGetClassObject
......
Makefile
dinput.dll.dbg.c
dinput.spec.c
name dinput
type win32
debug_channels (dinput)
@ stdcall DirectInputCreateA(long long ptr ptr) DirectInputCreateA
@ stub DirectInputCreateW
......
Makefile
dplay.dll.dbg.c
dplay.spec.c
# First DirectPlay dll. Replaced by dplayx.dll.
name dplay
type win32
@ forward DirectPlayCreate dplayx.DirectPlayCreate
@ forward DirectPlayEnumerate dplayx.DirectPlayEnumerate
Makefile
dplayx.dll.dbg.c
dplayx.spec.c
version.res
name dplayx
type win32
init DPLAYX_LibMain
debug_channels (dplay)
1 stdcall DirectPlayCreate(ptr ptr ptr) DirectPlayCreate
2 stdcall DirectPlayEnumerateA(ptr ptr) DirectPlayEnumerateA
3 stdcall DirectPlayEnumerateW(ptr ptr) DirectPlayEnumerateW
......
Makefile
dsound.dll.dbg.c
dsound.spec.c
name dsound
type win32
debug_channels (dsound)
0 stub DirectSoundUnknown
1 stdcall DirectSoundCreate(ptr ptr ptr) DirectSoundCreate
......
Makefile
dispdib.spec.c
gdi.exe.spec.c
gdi32.dll.dbg.c
gdi32.spec.c
printdrv.glue.c
version.res
......
name gdi32
type win32
init MAIN_GdiInit
debug_channels (bitblt bitmap clipping dc ddraw driver enhmetafile font gdi
metafile palette print region text win16drv wing)
# ordinal exports
100 stdcall @(long long str str str) GDI_CallDevInstall16
101 stdcall @(long str str ptr) GDI_CallExtDeviceModePropSheet16
......
Makefile
glu32.dll.dbg.c
glu32.spec.c
name glu32
type win32
@ stdcall gluLookAt(double double double double double double double double double) wine_gluLookAt
@ stdcall gluOrtho2D(double double double double) wine_gluOrtho2D
......
Makefile
icmp.dll.dbg.c
icmp.spec.c
name icmp
type win32
debug_channels (icmp)
@ stdcall IcmpCloseHandle(ptr) IcmpCloseHandle
@ stdcall IcmpCreateFile() IcmpCreateFile
......
Makefile
imagehlp.dll.dbg.c
imagehlp.spec.c
name imagehlp
type win32
init IMAGEHLP_LibMain
debug_channels (imagehlp)
@ stdcall BindImage(str str str) BindImage
@ stdcall BindImageEx(long str str str ptr) BindImageEx
@ stdcall CheckSumMappedFile(ptr long ptr ptr) CheckSumMappedFile
......
Makefile
imm.spec.c
imm32.dll.dbg.c
imm32.spec.c
name imm32
type win32
debug_channels (imm)
@ stdcall ImmAssociateContext(long long) ImmAssociateContext
@ stdcall ImmConfigureIMEA(long long long ptr) ImmConfigureIMEA
......
Makefile
comm.spec.c
kernel.res
kernel32.dll.dbg.c
kernel32.spec.c
krnl386.exe.spec.c
stress.spec.c
......
name kernel32
type win32
init MAIN_KernelInit
debug_channels (comm console debugstr dll int resource stress thunk toolhelp
win32)
# Functions exported by the Win95 kernel32.dll
# (these need to have these exact ordinals, for some win95 dlls
# import kernel32.dll by ordinal)
......
Makefile
lz32.dll.dbg.c
lz32.spec.c
lzexpand.spec.c
name lz32
type win32
debug_channels (file)
@ stdcall CopyLZFile(long long) CopyLZFile
@ stdcall GetExpandedNameA(str ptr) GetExpandedNameA
......
Makefile
mapi32.dll.dbg.c
mapi32.spec.c
name mapi32
type win32
debug_channels (mapi)
@ stub BMAPIAddress
@ stub BMAPIDetails
......
Makefile
mpr.dll.dbg.c
mpr.spec.c
name mpr
type win32
debug_channels (mpr)
# ordinal exports
1 stub @
......
Makefile
msacm.res
msacm.spec.c
msacm32.dll.dbg.c
msacm32.spec.c
Makefile
imaadp32.acm.dbg.c
imaadp32.acm.spec.c
name imaadp32
file imaadp32.acm
type win32
debug_channels (adpcm)
@ stdcall DriverProc (long long long long long) ADPCM_DriverProc
name msacm32
type win32
init MSACM32_LibMain
debug_channels (msacm)
@ stdcall acmDriverAddA(ptr long long long long) acmDriverAddA
@ stdcall acmDriverAddW(ptr long long long long) acmDriverAddW
@ stdcall acmDriverClose(long long) acmDriverClose
......
Makefile
msg711.drv.dbg.c
msg711.drv.spec.c
name msg711
file msg711.drv
type win32
debug_channels ()
@ stub DriverProc #(long long long long long)
Makefile
msdmo.dll.dbg.c
msdmo.spec.c
name msdmo
type win32
debug_channels ()
@ stub DMOEnum
@ stub DMOGetName
......
Makefile
msimg32.dll.dbg.c
msimg32.spec.c
name msimg32
type win32
debug_channels (msimg32)
@ stdcall AlphaBlend(long long long long long long long long long long long) AlphaBlend
@ stub DllInitialize
......
Makefile
msisys.ocx.dbg.c
msisys.ocx.spec.c
name msisys
file msisys.ocx
type win32
init MSISYS_DllMain
debug_channels (msisys)
@ stdcall DllCanUnloadNow() MSISYS_DllCanUnloadNow
@ stdcall DllGetClassObject(ptr ptr ptr) MSISYS_DllGetClassObject
@ stdcall DllRegisterServer() MSISYS_DllRegisterServer
......
Makefile
msnet32.dll.dbg.c
msnet32.spec.c
name msnet32
type win32
1 stub @
2 stub @
......
Makefile
msrle32.dll.dbg.c
msrle32.spec.c
name msrle32
type win32
debug_channels()
@ stub DriverProc #(long long long long long)
Makefile
msvcrt.dll.dbg.c
msvcrt.spec.c
# msvcrt.dll - MS VC++ Run Time Library
name msvcrt
type win32
init MSVCRT_Init
debug_channels (msvcrt)
@ cdecl $I10_OUTPUT() MSVCRT_I10_OUTPUT
@ cdecl ??0__non_rtti_object@@QAE@ABV0@@Z(ptr ptr) MSVCRT___non_rtti_object_copy_ctor
@ cdecl ??0__non_rtti_object@@QAE@PBD@Z(ptr ptr) MSVCRT___non_rtti_object_ctor
......
Makefile
msvcrt20.dll.dbg.c
msvcrt20.spec.c
# msvcrt20.dll - MS VC++ Run Time Library
name msvcrt20
type win32
debug_channels (msvcrt)
@ stub ??0Iostream_init@@QAE@AAVios@@H@Z #
@ stub ??0Iostream_init@@QAE@XZ #
......
Makefile
msvfw32.dll.dbg.c
msvfw32.spec.c
msvideo.spec.c
msvideo_main.glue.c
name msvfw32
type win32
debug_channels (mci msvideo)
# Yes, ICCompress,ICDecompress,MCIWnd* and ICDraw* are cdecl (VFWAPIV).
# The rest is stdcall (VFWAPI) however. -Marcus Meissner, 990124
......
Makefile
netapi32.dll.dbg.c
netapi32.spec.c
name netapi32
type win32
init NETAPI32_LibMain
debug_channels (netbios)
1 stdcall Netbios(ptr) Netbios
Makefile
ntdll.dll.dbg.c
ntdll.spec.c
relay16.s
relay32.s
......@@ -142,10 +142,10 @@ EXTRASUBDIRS = \
@MAKE_DLL_RULES@
relay16.s: $(WINEBUILD)
$(LDPATH) $(WINEBUILD) @DLLFLAGS@ -o $@ -relay16
$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -relay16
relay32.s: $(WINEBUILD)
$(LDPATH) $(WINEBUILD) @DLLFLAGS@ -o $@ -relay32
$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -relay32
install:: install_libdir
uninstall:: uninstall_libdir
......
name ntdll
type win32
debug_channels (atom cdrom console debug delayhlp dll dosfs dosmem file fixup
global heap int int21 int31 io loaddll local module ntdll process
profile reg relay resource segment seh selector server snoop
string system tape task thread tid timer toolhelp ver virtual
vxd win32)
#note that the Zw... functions are alternate names for the
#Nt... functions. (see www.sysinternals.com for details)
......
Makefile
odbc32.dll.dbg.c
odbc32.spec.c
name odbc32
type win32
init MAIN_OdbcInit
debug_channels (odbc)
001 stdcall SQLAllocConnect(long ptr) SQLAllocConnect
002 stdcall SQLAllocEnv(ptr) SQLAllocEnv
003 stdcall SQLAllocStmt(long ptr) SQLAllocStmt
......
......@@ -5,6 +5,7 @@ ole2conv.spec.c
ole2nls.spec.c
ole2prox.spec.c
ole2thk.spec.c
ole32.dll.dbg.c
ole32.spec.c
ole32res.res
storage.spec.c
name ole32
type win32
init OLE32_DllEntryPoint
debug_channels (accel ole relay storage)
1 stub BindMoniker # stdcall (ptr long ptr ptr) return 0,ERR_NOTIMPLEMENTED
2 stdcall CLSIDFromProgID(wstr ptr) CLSIDFromProgID
3 stdcall CLSIDFromString(wstr ptr) CLSIDFromString
......
Makefile
ole2disp.spec.c
oleaut32.dll.dbg.c
oleaut32.spec.c
typelib.spec.c
version.res
name oleaut32
type win32
debug_channels (ole olerelay typelib)
1 stdcall DllGetClassObject(ptr ptr ptr) OLEAUT32_DllGetClassObject
2 stdcall SysAllocString(wstr) SysAllocString
......
Makefile
olecli.spec.c
olecli32.dll.dbg.c
olecli32.spec.c
name olecli32
type win32
debug_channels (ole)
1 stub WEP
2 stub OleDelete
......
Makefile
oledlg.dll.dbg.c
oledlg.spec.c
name oledlg
type win32
debug_channels (ole)
1 stdcall OleUIAddVerbMenuA(ptr str long long long long long long ptr) OleUIAddVerbMenuA
2 stdcall OleUICanConvertOrActivateAs(ptr long long) OleUICanConvertOrActivateAs
......
Makefile
olepro32.dll.dbg.c
olepro32.spec.c
name olepro32
type win32
debug_channels (ole)
248 forward OleIconToCursor OLEAUT32.OleIconToCursor
249 forward OleCreatePropertyFrameIndirect OLEAUT32.OleCreatePropertyFrameIndirect
......
Makefile
olesvr.spec.c
olesvr32.dll.dbg.c
olesvr32.spec.c
name olesvr32
type win32
debug_channels (ole)
1 stub WEP
2 stdcall OleRegisterServer(str ptr ptr long long) OleRegisterServer
......
Makefile
opengl32.dll.dbg.c
opengl32.spec.c
name opengl32
type win32
init OpenGL32_Init
debug_channels (opengl)
@ stdcall wglCreateContext(long) wglCreateContext
@ stdcall wglCreateLayerContext(long long) wglCreateLayerContext
@ stdcall wglCopyContext(long long long) wglCopyContext
......
Makefile
psapi.dll.dbg.c
psapi.spec.c
name psapi
type win32
debug_channels (psapi)
@ stdcall EmptyWorkingSet(long) EmptyWorkingSet
@ stdcall EnumDeviceDrivers(ptr long ptr) EnumDeviceDrivers
......
Makefile
qcap.dll.dbg.c
qcap.spec.c
name qcap
type win32
debug_channels()
@ stub DllCanUnloadNow
@ stub DllGetClassObject
......
Makefile
quartz.dll.dbg.c
quartz.spec.c
name quartz
type win32
debug_channels (quartz)
@ stub AMGetErrorTextA
@ stub AMGetErrorTextW
......
Makefile
rasapi16.spec.c
rasapi32.dll.dbg.c
rasapi32.spec.c
name rasapi32
type win32
debug_channels (ras)
1 stub RasAutodialAddressToNetwork
2 stub RasAutodialEntryToNetwork
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment