Added rules to build import libraries in the individual dll makefiles.

Generate import libraries with the right name right away instead of
using an intermediate .spec.def file.
This commit is contained in:
Alexandre Julliard 2005-05-07 12:39:52 +00:00
parent 16a37e1eaf
commit d62356aa1e
134 changed files with 1317 additions and 930 deletions

View File

@ -105,7 +105,7 @@ prog_manext = 1
api_manext = 3w
conf_manext = 5
CLEAN_FILES = *.o *.a *.so *.ln *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \
*.flc *.spec.c *.spec.def *.dbg.c *.tab.c *.tab.h @LEX_OUTPUT_ROOT@.c core
*.flc *.spec.c *.dbg.c *.tab.c *.tab.h @LEX_OUTPUT_ROOT@.c core
OBJS = $(C_SRCS:.c=.o) $(EXTRA_OBJS)
@ -114,7 +114,7 @@ LINTS = $(C_SRCS:.c=.ln)
# Implicit rules
.SUFFIXES: .mc .rc .mc.rc .res .res.o .spec .spec.c .spec.def .idl .tlb .h .ok .sfd .ttf
.SUFFIXES: .mc .rc .mc.rc .res .res.o .spec .spec.c .idl .tlb .h .ok .sfd .ttf
.c.o:
$(CC) -c $(ALLCFLAGS) -o $@ $<
@ -134,9 +134,6 @@ LINTS = $(C_SRCS:.c=.ln)
.spec.spec.c:
$(WINEBUILD) $(DEFS) --dll -o $@ --main-module $(MODULE) --export $<
.spec.spec.def:
$(WINEBUILD) -w $(DEFS) --def -o $@ --export $<
.idl.h:
$(WIDL) $(IDLFLAGS) -h -H $@ $<

View File

@ -12,14 +12,15 @@
DLLDEFS = @DLLDEFS@
DLLFLAGS = @DLLFLAGS@
DLLEXT = @DLLEXT@
IMPLIBEXT = @IMPLIBEXT@
DEFS = -D__WINESRC__ $(DLLDEFS) $(EXTRADEFS)
MAINSPEC = $(MODULE:%.dll=%).spec
SPEC_DEF = $(MAINSPEC).def
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_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS)
ALL_IMPORTS = $(DELAYIMPORTS) $(IMPORTS)
IMPORTLIBS = $(ALL_IMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT))
all: $(MODULE)$(DLLEXT) $(SUBDIRS)
@ -27,15 +28,19 @@ all: $(MODULE)$(DLLEXT) $(SUBDIRS)
# Rules for .so files
$(MODULE).so: $(MAINSPEC) $(ALL_OBJS) $(IMPORTLIBS) Makefile.in
$(MODULE).so: $(MAINSPEC) $(ALL_OBJS) Makefile.in
$(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -shared $(SRCDIR)/$(MAINSPEC) $(ALL_OBJS) $(SUBSYSTEM:%=-Wb,--subsystem,%) -o $@ -L$(DLLDIR) $(ALL_IMPORTS:%=-l%) $(DELAYIMPORTS:%=-Wb,-d%) $(ALL_LIBS)
$(SPEC_DEF): $(MAINSPEC)
$(WINEBUILD) -w --def -o $@ --export $(SRCDIR)/$(MAINSPEC)
# Rules for .dll files
$(MODULE): $(RCOBJS) $(OBJS) $(MODULE).dbg.o $(SPEC_DEF) $(IMPORTLIBS) Makefile.in
$(MODULE): $(RCOBJS) $(OBJS) $(MODULE).dbg.o $(SPEC_DEF) Makefile.in
$(DLLWRAP) -k --def $(SPEC_DEF) -o $@ $(RCOBJS) $(OBJS) $(MODULE).dbg.o -L$(DLLDIR) $(ALL_IMPORTS:%=-l%) $(ALL_LIBS)
$(SPEC_DEF): $(WINEBUILD)
lib$(BASEMODULE).a: $(SPEC_DEF)
$(DLLTOOL) -k -l $@ -d $(SPEC_DEF)
# Rules for checking that no imports are missing
@ -56,7 +61,7 @@ crosstest:: $(SUBDIRS:%=%/__crosstest__)
# Rule to explicitly generate the .spec.c for debugging
$(MAINSPEC).c: $(MAINSPEC) $(ALL_OBJS) $(IMPORTLIBS) $(WINEBUILD)
$(MAINSPEC).c: $(MAINSPEC) $(ALL_OBJS)
$(WINEBUILD) $(DEFS) $(DLLFLAGS) --dll -o $@ --export $(SRCDIR)/$(MAINSPEC) $(SUBSYSTEM:%=--subsystem %) $(ALL_OBJS) -L$(DLLDIR) $(ALL_IMPORTS:%=-l%) $(DELAYIMPORTS:%=-d%)
# Rules for auto documentation
@ -99,6 +104,9 @@ uninstall:: $(ALL_SPECS16:%=_uninstall_/%)
# Misc. rules
$(SPEC_SRCS16:.spec=.spec.c): $(WINEBUILD)
clean::
$(RM) $(SPEC_DEF)
$(SPEC_DEF) $(SPEC_SRCS16:.spec=.spec.c): $(WINEBUILD)
# End of global dll rules

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,6 @@ C_SRCS = $(CTESTS)
EXTRA_SRCS = $(TESTLIST)
EXTRA_OBJS = $(TESTLIST:.c=.o)
ALL_LIBS = $(IMPORTS:%=-l%) $(EXTRALIBS) $(LDFLAGS) $(LIBS)
IMPORTLIBS = $(IMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT))
CROSSTEST = $(TESTDLL:%.dll=%)_crosstest.exe
CROSSOBJS = $(C_SRCS:.c=.cross.o) $(RC_SRCS:.rc=.res.cross.o) $(TESTLIST:.c=.cross.o)
@ -36,7 +35,7 @@ all: $(TESTPROGRAM)
# Rules for .so main module
$(MODULE).so: $(OBJS) $(RC_SRCS:.rc=.res) $(IMPORTLIBS) Makefile.in
$(MODULE).so: $(OBJS) $(RC_SRCS:.rc=.res) Makefile.in
$(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -mconsole $(OBJS) $(RC_SRCS:.rc=.res) -o $@ $(LIBPORT) -L$(DLLDIR) -L$(LIBDIR) $(ALL_LIBS)
# Rules for .exe main module

View File

@ -1,3 +1,3 @@
Makefile
advapi32.dll.dbg.c
advapi32.spec.def
libadvapi32.def

View File

@ -1,3 +1,3 @@
Makefile
advpack.dll.dbg.c
advpack.spec.def
libadvpack.def

View File

@ -1,4 +1,4 @@
Makefile
amstream.dll.dbg.c
amstream.spec.def
libamstream.def
version.res

View File

@ -1,5 +1,5 @@
Makefile
atl.dll.dbg.c
atl.spec.def
atliface.h
libatl.def
rsrc.res

View File

@ -1,3 +1,3 @@
Makefile
avicap32.dll.dbg.c
avicap32.spec.def
libavicap32.def

View File

@ -1,5 +1,5 @@
Makefile
avifil32.dll.dbg.c
avifil32.spec.def
avifile.spec.c
libavifil32.def
rsrc.res

View File

@ -1,4 +1,4 @@
Makefile
cabinet.dll.dbg.c
cabinet.res
cabinet.spec.def
libcabinet.def

View File

@ -1,3 +1,3 @@
Makefile
capi2032.dll.dbg.c
capi2032.spec.def
libcapi2032.def

View File

@ -13,7 +13,6 @@ c8.bmp
c9.bmp
cards.dll.dbg.c
cards.res
cards.spec.def
cj.bmp
ck.bmp
cq.bmp
@ -44,6 +43,7 @@ h9.bmp
hj.bmp
hk.bmp
hq.bmp
libcards.def
s1.bmp
s10.bmp
s2.bmp

View File

@ -1,3 +1,3 @@
Makefile
cfgmgr32.dll.dbg.c
cfgmgr32.spec.def
libcfgmgr32.def

View File

@ -1,4 +1,4 @@
Makefile
comcat.dll.dbg.c
comcat.spec.def
libcomcat.def
version.res

View File

@ -1,7 +1,6 @@
Makefile
comctl32.dll
comctl32.dll.dbg.c
comctl32.spec.def
idb_hist_large.bmp
idb_hist_small.bmp
idb_std_large.bmp
@ -17,4 +16,5 @@ idi_tt_error_sm.ico
idi_tt_info_sm.ico
idi_tt_warn_sm.ico
idt_check.bmp
libcomctl32.def
rsrc.res

View File

@ -2,13 +2,13 @@
Makefile
cdrom.ico
comdlg32.dll.dbg.c
comdlg32.spec.def
commdlg.spec.c
floppy.ico
folder.ico
folder2.ico
fontpics.bmp
hdisk.ico
libcomdlg32.def
network.ico
pd32_collate.ico
pd32_landscape.ico

View File

@ -1,3 +1,3 @@
Makefile
crtdll.dll.dbg.c
crtdll.spec.def
libcrtdll.def

View File

@ -1,3 +1,3 @@
Makefile
crypt32.dll.dbg.c
crypt32.spec.def
libcrypt32.def

View File

@ -1,3 +1,3 @@
Makefile
cryptdll.dll.dbg.c
cryptdll.spec.def
libcryptdll.def

View File

@ -1,5 +1,5 @@
Makefile
ctl3d.spec.c
ctl3d32.dll.dbg.c
ctl3d32.spec.def
ctl3dv2.spec.c
libctl3d32.def

View File

@ -1,4 +1,4 @@
Makefile
d3d8.dll.dbg.c
d3d8.spec.def
libd3d8.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
d3d9.dll.dbg.c
d3d9.spec.def
libd3d9.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
d3dim.dll.dbg.c
d3dim.spec.def
libd3dim.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
d3drm.dll.dbg.c
d3drm.spec.def
libd3drm.def
version.res

View File

@ -1,3 +1,3 @@
Makefile
d3dx8.dll.dbg.c
d3dx8.spec.def
libd3dx8.def

View File

@ -1,4 +1,4 @@
Makefile
d3dxof.dll.dbg.c
d3dxof.spec.def
libd3dxof.def
version.res

View File

@ -1,3 +1,3 @@
Makefile
dbghelp.dll.dbg.c
dbghelp.spec.def
libdbghelp.def

View File

@ -1,3 +1,3 @@
Makefile
dciman32.dll.dbg.c
dciman32.spec.def
libdciman32.def

View File

@ -1,4 +1,4 @@
Makefile
ddraw.dll.dbg.c
ddraw.spec.def
libddraw.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
devenum.dll.dbg.c
devenum.res
devenum.spec.def
libdevenum.def

View File

@ -1,4 +1,4 @@
Makefile
dinput.dll.dbg.c
dinput.spec.def
libdinput.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dinput8.dll.dbg.c
dinput8.spec.def
libdinput8.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dmband.dll.dbg.c
dmband.spec.def
libdmband.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dmcompos.dll.dbg.c
dmcompos.spec.def
libdmcompos.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dmime.dll.dbg.c
dmime.spec.def
libdmime.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dmloader.dll.dbg.c
dmloader.spec.def
libdmloader.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dmscript.dll.dbg.c
dmscript.spec.def
libdmscript.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dmstyle.dll.dbg.c
dmstyle.spec.def
libdmstyle.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dmsynth.dll.dbg.c
dmsynth.spec.def
libdmsynth.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dmusic.dll.dbg.c
dmusic.spec.def
libdmusic.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dmusic32.dll.dbg.c
dmusic32.spec.def
libdmusic32.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dplay.dll.dbg.c
dplay.spec.def
libdplay.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dplayx.dll.dbg.c
dplayx.spec.def
libdplayx.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dpnet.dll.dbg.c
dpnet.spec.def
libdpnet.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dpnhpast.dll.dbg.c
dpnhpast.spec.def
libdpnhpast.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dsound.dll.dbg.c
dsound.spec.def
libdsound.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dswave.dll.dbg.c
dswave.spec.def
libdswave.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
dxdiagn.dll.dbg.c
dxdiagn.spec.def
libdxdiagn.def
version.res

View File

@ -2,7 +2,7 @@ Makefile
dispdib.spec.c
gdi.exe.spec.c
gdi32.dll.dbg.c
gdi32.spec.def
libgdi32.def
version.res
version16.res
wing.spec.c

View File

@ -1,3 +1,3 @@
Makefile
glu32.dll.dbg.c
glu32.spec.def
libglu32.def

View File

@ -1,3 +1,3 @@
Makefile
glut32.dll.dbg.c
glut32.spec.def
libglut32.def

View File

@ -1,3 +1,3 @@
Makefile
iccvid.dll.dbg.c
iccvid.spec.def
libiccvid.def

View File

@ -1,3 +1,3 @@
Makefile
icmp.dll.dbg.c
icmp.spec.def
libicmp.def

View File

@ -1,3 +1,3 @@
Makefile
imagehlp.dll.dbg.c
imagehlp.spec.def
libimagehlp.def

View File

@ -1,4 +1,4 @@
Makefile
imm.spec.c
imm32.dll.dbg.c
imm32.spec.def
libimm32.def

View File

@ -1,3 +1,3 @@
Makefile
iphlpapi.dll.dbg.c
iphlpapi.spec.def
libiphlpapi.def

View File

@ -1,4 +1,4 @@
Makefile
itss.dll.dbg.c
itss.h
itss.spec.def
libitss.def

View File

@ -2,8 +2,8 @@ Makefile
comm.drv.spec.c
kernel.res
kernel32.dll.dbg.c
kernel32.spec.def
krnl386.exe.spec.c
libkernel32.def
relay16asm.s
stress.spec.c
system.drv.spec.c

View File

@ -1,4 +1,4 @@
Makefile
liblz32.def
lz32.dll.dbg.c
lz32.spec.def
lzexpand.spec.c

View File

@ -251,19 +251,15 @@ foreach my $mod (sort @implibs)
my $spec = $mod;
$spec =~ s/\.dll$//;
$def =~ s/\.(dll|drv)$//;
printf NEWMAKE "lib%s.def: %s/%s.spec.def\n", $def, $dir, $spec;
printf NEWMAKE "\t\$(RM) \$@ && \$(LN_S) %s/%s.spec.def \$@\n", $dir, $spec;
printf NEWMAKE "lib%s.a: %s/%s.spec.def\n", $def, $dir, $spec;
printf NEWMAKE "\t\$(DLLTOOL) -k -l \$@ -d %s/%s.spec.def\n\n", $dir, $spec;
printf NEWMAKE "lib%s.def: %s/lib%s.def\n", $def, $dir, $spec;
printf NEWMAKE "\t\$(RM) \$@ && \$(LN_S) %s/lib%s.def \$@\n", $dir, $spec;
printf NEWMAKE "lib%s.a: %s/lib%s.a\n", $def, $dir, $spec;
printf NEWMAKE "\t\$(RM) \$@ && \$(LN_S) %s/lib%s.a \$@\n", $dir, $spec;
printf NEWMAKE "%s/lib%s.def: %s/%s.spec \$(WINEBUILD)\n", $dir, $spec, $dir, $spec;
printf NEWMAKE "\t\$(WINEBUILD) -w --def -o \$@ --export \$(SRCDIR)/%s/%s.spec\n", $dir, $spec;
printf NEWMAKE "%s/lib%s.a: %s/lib%s.def\n", $dir, $spec, $dir, $spec;
printf NEWMAKE "\t\$(DLLTOOL) -k -l \$@ -d %s/lib%s.def\n\n", $dir, $spec;
}
foreach my $mod (sort @implibs)
{
my $dir = $directories{$mod};
my $spec = $mod;
$spec =~ s/\.dll$//;
printf NEWMAKE "%s/%s.spec.def: \$(WINEBUILD)\n", $dir, $spec;
}
print NEWMAKE <<EOF;

View File

@ -1,4 +1,4 @@
Makefile
libmapi32.def
mapi32.dll
mapi32.dll.dbg.c
mapi32.spec.def

View File

@ -1,3 +1,3 @@
Makefile
libmlang.def
mlang.dll.dbg.c
mlang.spec.def

View File

@ -1,4 +1,4 @@
Makefile
libmpr.def
mpr.dll.dbg.c
mpr.res
mpr.spec.def

View File

@ -1,5 +1,5 @@
Makefile
libmsacm32.def
msacm.res
msacm.spec.c
msacm32.dll.dbg.c
msacm32.spec.def

View File

@ -1,4 +1,4 @@
Makefile
libmscms.def
mscms.dll.dbg.c
mscms.spec.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
libmsdmo.def
msdmo.dll.dbg.c
msdmo.spec.def
rsrc.res

View File

@ -1,3 +1,3 @@
Makefile
libmshtml.def
mshtml.dll.dbg.c
mshtml.spec.def

View File

@ -1,8 +1,8 @@
Makefile
cond.tab.c
cond.tab.h
libmsi.def
msi.dll.dbg.c
msi.res
msi.spec.def
sql.tab.c
sql.tab.h

View File

@ -1,3 +1,3 @@
Makefile
libmsimg32.def
msimg32.dll.dbg.c
msimg32.spec.def

View File

@ -1,3 +1,3 @@
Makefile
libmsnet32.def
msnet32.dll.dbg.c
msnet32.spec.def

View File

@ -1,4 +1,4 @@
Makefile
libmsrle32.def
msrle32.dll.dbg.c
msrle32.spec.def
rsrc.res

View File

@ -1,3 +1,3 @@
Makefile
libmsvcrt.def
msvcrt.dll.dbg.c
msvcrt.spec.def

View File

@ -1,3 +1,3 @@
Makefile
libmsvcrt20.def
msvcrt20.dll.dbg.c
msvcrt20.spec.def

View File

@ -1,3 +1,3 @@
Makefile
libmsvcrt40.def
msvcrt40.dll.dbg.c
msvcrt40.spec.def

View File

@ -1,3 +1,3 @@
Makefile
libmsvcrtd.def
msvcrtd.dll.dbg.c
msvcrtd.spec.def

View File

@ -1,3 +1,3 @@
Makefile
libmsvidc32.def
msvidc32.dll.dbg.c
msvidc32.spec.def

View File

@ -1,4 +1,4 @@
Makefile
libmsvfw32.def
msvfw32.dll.dbg.c
msvfw32.spec.def
msvideo.spec.c

View File

@ -1,4 +1,4 @@
Makefile
libmswsock.def
mswsock.dll.dbg.c
mswsock.spec.def
version.res

View File

@ -1,3 +1,3 @@
Makefile
libnetapi32.def
netapi32.dll.dbg.c
netapi32.spec.def

View File

@ -1,3 +1,3 @@
Makefile
libnewdev.def
newdev.dll.dbg.c
newdev.spec.def

View File

@ -1,4 +1,4 @@
Makefile
libntdll.def
ntdll.dll.dbg.c
ntdll.spec.def
relay32.s

View File

@ -1,3 +1,3 @@
Makefile
libodbc32.def
odbc32.dll.dbg.c
odbc32.spec.def

View File

@ -4,6 +4,7 @@ dcom.h
drag_copy.cur
drag_link.cur
drag_move.cur
libole32.def
nodrop.cur
ole2.spec.c
ole2conv.spec.c
@ -11,6 +12,5 @@ ole2nls.spec.c
ole2prox.spec.c
ole2thk.spec.c
ole32.dll.dbg.c
ole32.spec.def
ole32res.res
storage.spec.c

View File

@ -1,3 +1,3 @@
Makefile
liboleacc.def
oleacc.dll.dbg.c
oleacc.spec.def

View File

@ -1,6 +1,6 @@
Makefile
liboleaut32.def
ole2disp.spec.c
oleaut32.dll.dbg.c
oleaut32.res
oleaut32.spec.def
typelib.spec.c

View File

@ -1,4 +1,4 @@
Makefile
libolecli32.def
olecli.spec.c
olecli32.dll.dbg.c
olecli32.spec.def

View File

@ -1,4 +1,4 @@
Makefile
liboledlg.def
oledlg.dll.dbg.c
oledlg.spec.def
rsrc.res

View File

@ -1,3 +1,3 @@
Makefile
libolepro32.def
olepro32.dll.dbg.c
olepro32.spec.def

View File

@ -1,4 +1,4 @@
Makefile
libolesvr32.def
olesvr.spec.c
olesvr32.dll.dbg.c
olesvr32.spec.def

View File

@ -1,4 +1,4 @@
Makefile
libopengl32.def
opengl32.dll.dbg.c
opengl32.spec.def
version.res

View File

@ -1,3 +1,3 @@
Makefile
libpowrprof.def
powrprof.dll.dbg.c
powrprof.spec.def

View File

@ -1,3 +1,3 @@
Makefile
libpsapi.def
psapi.dll.dbg.c
psapi.spec.def

View File

@ -1,4 +1,4 @@
Makefile
libqcap.def
qcap.dll.dbg.c
qcap.spec.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
libquartz.def
quartz.dll.dbg.c
quartz.spec.def
version.res

View File

@ -1,4 +1,4 @@
Makefile
librasapi32.def
rasapi16.spec.c
rasapi32.dll.dbg.c
rasapi32.spec.def

View File

@ -1,3 +1,3 @@
Makefile
libriched20.def
riched20.dll.dbg.c
riched20.spec.def

View File

@ -1,3 +1,3 @@
Makefile
libriched32.def
riched32.dll.dbg.c
riched32.spec.def

View File

@ -1,3 +1,3 @@
Makefile
librpcrt4.def
rpcrt4.dll.dbg.c
rpcrt4.spec.def

View File

@ -1,3 +1,3 @@
Makefile
librsabase.def
rsabase.dll.dbg.c
rsabase.spec.def

Some files were not shown because too many files have changed in this diff Show More