Build the dlls with winegcc.

This commit is contained in:
Alexandre Julliard 2004-03-24 03:34:00 +00:00
parent b948778660
commit c4aacf0e81
3 changed files with 9 additions and 10 deletions

View File

@ -47,13 +47,10 @@ TOOLSDIR = @TOOLSDIR@
AS = @AS@ AS = @AS@
LD = @LD@ LD = @LD@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LDCOMBINE = $(LD) -r
RM = rm -f RM = rm -f
MV = mv MV = mv
LINT = @LINT@ LINT = @LINT@
LINTFLAGS = @LINTFLAGS@ LINTFLAGS = @LINTFLAGS@
LDDLLFLAGS = @LDDLLFLAGS@
LDDLL = $(CC) $(LDDLLFLAGS)
INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL) INCLUDES = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include $(EXTRAINCL)
EXTRACFLAGS = @EXTRACFLAGS@ EXTRACFLAGS = @EXTRACFLAGS@
ALLCFLAGS = $(INCLUDES) $(DEFS) $(DLLFLAGS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) ALLCFLAGS = $(INCLUDES) $(DEFS) $(DLLFLAGS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS)

View File

@ -26,11 +26,8 @@ all: $(MODULE)$(DLLEXT) $(SUBDIRS)
# Rules for .so files # Rules for .so files
$(MAINSPEC).c: $(MAINSPEC) $(RC_SRCS:.rc=.res) $(ALL_OBJS) $(IMPORTLIBS) $(WINEBUILD) $(MODULE).so: $(MAINSPEC) $(RC_SRCS:.rc=.res) $(ALL_OBJS) $(IMPORTLIBS) Makefile.in
$(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --dll $(SRCDIR)/$(MAINSPEC) $(DLLMODE:%=--mode %) $(RC_SRCS:.rc=.res) $(ALL_OBJS) -L$(DLLDIR) $(DELAYIMPORTS:%=-d%) $(IMPORTS:%=-l%) $(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -shared $(SRCDIR)/$(MAINSPEC) $(ALL_OBJS) $(RC_SRCS:.rc=.res) -o $@ -L$(DLLDIR) $(DELAYIMPORTS:%=-Wb,-d%) $(IMPORTS:%=-l%) $(ALL_LIBS)
$(MODULE).so: $(MAINSPEC).o $(ALL_OBJS) Makefile.in
$(LDDLL) $(MAINSPEC).o $(ALL_OBJS) -o $@ -L$(DLLDIR) $(ALL_LIBS) -lc
# Rules for .dll files # Rules for .dll files
@ -46,7 +43,7 @@ $(SPEC_DEF): $(WINEBUILD)
$(WIN16_FILES:%=__checklink16__%): checklink16 $(WIN16_FILES:%=__checklink16__%): checklink16
checklink16:: $(MAINSPEC).o $(OBJS) $(MODULE).dbg.o dummy 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) && $(RM) checklink $(CC) -o checklink -Wl,-rpath,$(TOPOBJDIR)/libs $(TOPSRCDIR)/dlls/checklink.c $(MAINSPEC).o $(OBJS) $(MODULE).dbg.o -L$(DLLDIR) $(ALL_LIBS) && $(RM) checklink $(MAINSPEC).c $(MAINSPEC).o
checklink:: $(WIN16_FILES:%=__checklink16__%) checklink:: $(WIN16_FILES:%=__checklink16__%)
@ -56,6 +53,11 @@ check test:: $(SUBDIRS:%=%/__test__)
crosstest:: $(SUBDIRS:%=%/__crosstest__) crosstest:: $(SUBDIRS:%=%/__crosstest__)
# Rule to explicitly generate the .spec.c for debugging
$(MAINSPEC).c: $(MAINSPEC) $(RC_SRCS:.rc=.res) $(ALL_OBJS) $(IMPORTLIBS) $(WINEBUILD)
$(WINEBUILD) $(DEFS) $(DLLFLAGS) -o $@ --dll $(SRCDIR)/$(MAINSPEC) $(DLLMODE:%=--mode %) $(RC_SRCS:.rc=.res) $(ALL_OBJS) -L$(DLLDIR) $(DELAYIMPORTS:%=-d%) $(IMPORTS:%=-l%)
# Rules for auto documentation # Rules for auto documentation
man: $(C_SRCS) man: $(C_SRCS)

View File

@ -3,7 +3,7 @@ DEFS = \
-DDLLDIR="\"$(dlldir)\"" \ -DDLLDIR="\"$(dlldir)\"" \
-DLIBDIR="\"$(libdir)\"" \ -DLIBDIR="\"$(libdir)\"" \
-DDLLFLAGS="\"@DLLFLAGS@\"" \ -DDLLFLAGS="\"@DLLFLAGS@\"" \
-DLDDLLFLAGS="\"$(LDDLLFLAGS)\"" \ -DLDDLLFLAGS="\"@LDDLLFLAGS@\"" \
-DCC="\"$(CC)\"" \ -DCC="\"$(CC)\"" \
-DCPP="\"@CPPBIN@\"" \ -DCPP="\"@CPPBIN@\"" \
-DCXX="\"$(CXX)\"" -DCXX="\"$(CXX)\""