Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
523e46de
Commit
523e46de
authored
Jul 11, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegcc: Automatically add the correct lib paths when building inside the Wine tree.
parent
645cd6ff
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
14 deletions
+20
-14
Make.rules.in
Make.rules.in
+0
-1
Makedll.rules.in
dlls/Makedll.rules.in
+3
-3
Maketest.rules.in
dlls/Maketest.rules.in
+1
-1
Makeprog.rules.in
programs/Makeprog.rules.in
+3
-3
winegcc.c
tools/winegcc/winegcc.c
+13
-6
No files found.
Make.rules.in
View file @
523e46de
...
...
@@ -81,7 +81,6 @@ RCFLAGS = --nostdinc $(INCLUDES) $(DEFS) $(EXTRARCFLAGS)
RC16FLAGS = -O res16 $(RCFLAGS)
LDPATH = @LDPATH@
DLLDIR = $(TOPOBJDIR)/dlls
LIBDIR = $(TOPOBJDIR)/libs
LIBPORT = $(TOPOBJDIR)/libs/port/libwine_port.a
LIBWPP = $(TOPOBJDIR)/libs/wpp/libwpp.a
LIBWINE = -L$(TOPOBJDIR)/libs/wine -lwine
...
...
dlls/Makedll.rules.in
View file @
523e46de
...
...
@@ -19,7 +19,7 @@ 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) $(RC_SRCS:.rc=.res)
ALL_LIBS =
-L$(LIBDIR) -lwine
$(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS)
ALL_LIBS = $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS)
ALL_IMPORTS = $(DELAYIMPORTS) $(IMPORTS)
IMPLIB_OBJS = $(IMPLIB_SRCS:.c=.o)
STATICIMPLIB= $(IMPORTLIB:.def=.def.a)
...
...
@@ -32,12 +32,12 @@ all: $(MODULE)$(DLLEXT) $(SUBDIRS)
# Rules for .so files
$(MODULE).so: $(MAINSPEC) $(ALL_OBJS) Makefile.in
$(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -shared $(SRCDIR)/$(MAINSPEC) $(ALL_OBJS) $(SUBSYSTEM:%=-Wb,--subsystem,%) $(BASEADDRESS:%=-Wl,--image-base,%) $(LDRPATH) -o $@
-L$(DLLDIR)
$(ALL_IMPORTS:%=-l%) $(DELAYIMPORTS:%=-Wb,-d%) $(ALL_LIBS)
$(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -shared $(SRCDIR)/$(MAINSPEC) $(ALL_OBJS) $(SUBSYSTEM:%=-Wb,--subsystem,%) $(BASEADDRESS:%=-Wl,--image-base,%) $(LDRPATH) -o $@ $(ALL_IMPORTS:%=-l%) $(DELAYIMPORTS:%=-Wb,-d%) $(ALL_LIBS)
# Rules for .dll files
$(MODULE): $(RCOBJS) $(OBJS) $(SPEC_DEF) Makefile.in
$(DLLWRAP) -k --def $(SPEC_DEF) -o $@ $(RCOBJS) $(OBJS) $(DLL_LDPATH) $(ALL_IMPORTS:%=-l%) $(ALL_LIBS)
$(DLLWRAP) -k --def $(SPEC_DEF) -o $@ $(RCOBJS) $(OBJS) $(DLL_LDPATH) $(ALL_IMPORTS:%=-l%) $(
LIBWINE) $(
ALL_LIBS)
# Rules for import libraries
...
...
dlls/Maketest.rules.in
View file @
523e46de
...
...
@@ -33,7 +33,7 @@ all: $(TESTPROGRAM)
# Rules for .so main module
$(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)
$(WINEGCC) -B$(TOOLSDIR)/tools/winebuild -mconsole $(OBJS) $(RC_SRCS:.rc=.res) -o $@ $(LIBPORT) $(ALL_LIBS)
# Rules for .exe main module
...
...
programs/Makeprog.rules.in
View file @
523e46de
...
...
@@ -13,7 +13,7 @@ DLLFLAGS = @DLLFLAGS@
LDRPATH = @LDDLLRPATH@
DEFS = $(EXTRADEFS)
ALL_IMPORTS = $(DELAYIMPORTS) $(IMPORTS)
ALL_LIBS = $(ALL_IMPORTS:%=-l%)
-L$(LIBDIR) -lwine
$(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS)
ALL_LIBS = $(ALL_IMPORTS:%=-l%) $(EXTRALIBS) $(LIBPORT) $(LDFLAGS) $(LIBS)
BASEMODULE = $(MODULE:.exe=)
RUNTESTFLAGS= -q -P wine -T $(TOPOBJDIR)
...
...
@@ -24,7 +24,7 @@ all: $(MODULE)$(DLLEXT) $(BASEMODULE)$(EXEEXT)
# Rules for .so main module
$(MODULE).so: $(OBJS) $(RC_SRCS:.rc=.res) Makefile.in
$(WINEGCC) -B$(TOOLSDIR)/tools/winebuild $(APPMODE) $(OBJS) $(RC_SRCS:.rc=.res) -o $@ $(LDRPATH)
-L$(DLLDIR)
$(ALL_LIBS) $(DELAYIMPORTS:%=-Wb,-d%)
$(WINEGCC) -B$(TOOLSDIR)/tools/winebuild $(APPMODE) $(OBJS) $(RC_SRCS:.rc=.res) -o $@ $(LDRPATH) $(ALL_LIBS) $(DELAYIMPORTS:%=-Wb,-d%)
$(BASEMODULE): $(WINEWRAPPER)
$(RM) $@ && $(LN_S) $(WINEWRAPPER) $@
...
...
@@ -32,7 +32,7 @@ $(BASEMODULE): $(WINEWRAPPER)
# Rules for .exe main module
$(MODULE): $(OBJS) $(RCOBJS) Makefile.in
$(CC) $(APPMODE) $(OBJS) $(RCOBJS) -o $@ $(ALL_LIBS)
$(CC) $(APPMODE) $(OBJS) $(RCOBJS) -o $@ $(
LIBWINE) $(
ALL_LIBS)
# Rules for testing
...
...
tools/winegcc/winegcc.c
View file @
523e46de
...
...
@@ -157,7 +157,7 @@ struct options
int
gui_app
;
int
unicode_app
;
int
compile_only
;
int
wine_mode
;
const
char
*
wine_objdir
;
const
char
*
output_name
;
const
char
*
image_base
;
strarray
*
prefix
;
...
...
@@ -260,7 +260,7 @@ static void compile(struct options* opts, const char* lang)
if
(
opts
->
processor
!=
proc_cpp
)
{
#ifdef CC_FLAG_SHORT_WCHAR
if
(
!
opts
->
wine_
mode
&&
!
opts
->
noshortwchar
)
if
(
!
opts
->
wine_
objdir
&&
!
opts
->
noshortwchar
)
{
strarray_add
(
comp_args
,
CC_FLAG_SHORT_WCHAR
);
strarray_add
(
comp_args
,
"-DWINE_UNICODE_NATIVE"
);
...
...
@@ -346,7 +346,7 @@ static void compile(struct options* opts, const char* lang)
#else
#define SYS_INCLUDE "-I"
#endif
if
(
!
opts
->
wine_
mode
&&
!
opts
->
nostdinc
)
if
(
!
opts
->
wine_
objdir
&&
!
opts
->
nostdinc
)
{
if
(
opts
->
use_msvcrt
)
{
...
...
@@ -472,11 +472,16 @@ static void build(struct options* opts)
/* prepare the linking path */
lib_dirs
=
strarray_dup
(
opts
->
lib_dirs
);
if
(
!
opts
->
wine_
mode
)
if
(
!
opts
->
wine_
objdir
)
{
for
(
j
=
0
;
j
<
sizeof
(
stdlibpath
)
/
sizeof
(
stdlibpath
[
0
]);
j
++
)
strarray_add
(
lib_dirs
,
stdlibpath
[
j
]);
}
else
{
strarray_add
(
lib_dirs
,
strmake
(
"%s/dlls"
,
opts
->
wine_objdir
));
strarray_add
(
lib_dirs
,
strmake
(
"%s/libs/wine"
,
opts
->
wine_objdir
));
}
/* mark the files with their appropriate type */
spec_file
=
lang
=
0
;
...
...
@@ -530,7 +535,7 @@ static void build(struct options* opts)
/* add the default libraries, if needed */
if
(
!
opts
->
nostdlib
&&
opts
->
use_msvcrt
)
add_library
(
lib_dirs
,
files
,
"msvcrt"
);
if
(
!
opts
->
wine_
mode
&&
!
opts
->
nodefaultlibs
)
if
(
!
opts
->
wine_
objdir
&&
!
opts
->
nodefaultlibs
)
{
if
(
opts
->
gui_app
)
{
...
...
@@ -870,7 +875,9 @@ int main(int argc, char **argv)
str
=
strdup
(
option_arg
);
if
(
strendswith
(
str
,
"/tools/winebuild"
))
{
opts
.
wine_mode
=
1
;
char
*
objdir
=
strdup
(
str
);
objdir
[
strlen
(
objdir
)
-
sizeof
(
"/tools/winebuild"
)
+
1
]
=
0
;
opts
.
wine_objdir
=
objdir
;
/* don't pass it to the compiler, this generates warnings */
raw_compiler_arg
=
raw_linker_arg
=
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment