Build ntdll as a real dll, including everything that was previously in

libwine.so. Created a new (mostly empty) libwine.so in library/ subdir.
This commit is contained in:
Alexandre Julliard 2000-10-31 00:20:51 +00:00
parent 4efd28ce1a
commit 2fa4f767aa
16 changed files with 124 additions and 170 deletions

View File

@ -3,5 +3,4 @@ Makefile
config.cache
config.log
config.status
libwine.so.1.0
wine

View File

@ -34,6 +34,8 @@ LIBS = @LIBS@
YACC = @YACC@
LEX = @LEX@
LEXLIB = @LEXLIB@
LIBEXT = @LIBEXT@
LDSHARED = @LDSHARED@
RANLIB = @RANLIB@
LN_S = @LN_S@
DIVINCL = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include

View File

@ -17,11 +17,9 @@ TOPOBJDIR = .
SRCDIR = @srcdir@
VPATH = @srcdir@
LIBEXT = @LIBEXT@
LDSHARED = @LDSHARED@
LDCONFIG = @LDCONFIG@
MODULE = wine
SOVERSION = 1.0
SONAME = libwine.so
IMPORTS = ntdll
# Stand-alone programs
PROGRAMS = \
@ -34,35 +32,22 @@ LIBPROGRAMS = \
# Libraries (not dlls) to build
LIBRARIES = \
library/libwine.$(LIBEXT) \
unicode/libwine_unicode.$(LIBEXT)
# Sub-directories to run make depend/clean into
SUBDIRS = \
console \
debugger \
dlls \
dlls/ntdll \
documentation \
files \
if1632 \
include \
library \
libtest \
loader \
loader/dos \
loader/ne \
memory \
misc \
miscemu \
msdos \
ole \
programs \
relay32 \
scheduler \
server \
tools \
unicode \
win32
unicode
# Sub-directories to run make install into
INSTALLSUBDIRS = \
@ -70,42 +55,19 @@ INSTALLSUBDIRS = \
dlls \
documentation \
include \
library \
server \
tools \
unicode
LIBOBJS = \
console/console.o \
dlls/ntdll/ntdll.o \
files/files.o \
if1632/if1632.o \
loader/loader.o \
loader/ne/ne.o \
loader/dos/dos.o \
memory/memory.o \
misc/misc.o \
msdos/msdos.o \
ole/ole.o \
relay32/relay32.o \
scheduler/scheduler.o \
win32/win32.o
EMUOBJS = \
miscemu/miscemu.o
DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@)
EXTRA_OBJS = $(LIBOBJS)
all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) wine
@echo "Wine build complete."
LIBLINTS = $(LIBOBJS:.o=.ln)
EMULINTS = $(EMUOBJS:.o=.ln)
lint:: llib-lwine.ln $(EMULINTS)
$(LINT) $(ALLLINTFLAGS) -L. -lwine $(EMULINTS)
WINAPI_CHECK_EXTRA_FLAGS = --global
@MAKE_RULES@
@ -117,55 +79,33 @@ Make.rules: Make.rules.in configure
wine: libwine.$(LIBEXT) libwine_unicode.$(LIBEXT) dlls $(EMUOBJS)
$(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LIBS) $(LDFLAGS)
llib-lwine.ln : $(LIBLINTS)
$(LINT) $(ALLLINTFLAGS) -owine $(LIBLINTS)
install_so: libwine.so.$(SOVERSION)
[ -d $(libdir) ] || $(MKDIR) $(libdir)
$(INSTALL_PROGRAM) libwine.so.$(SOVERSION) $(libdir)/libwine.so.$(SOVERSION)
cd $(libdir) && $(RM) libwine.so && $(LN_S) libwine.so.$(SOVERSION) libwine.so
install_a: libwine.a
[ -d $(libdir) ] || $(MKDIR) $(libdir)
$(INSTALL_DATA) libwine.a $(libdir)/libwine.a
install:: all $(LIBEXT:%=install_%) $(INSTALLSUBDIRS:%=%/__install__)
install:: all $(INSTALLSUBDIRS:%=%/__install__)
[ -d $(bindir) ] || $(MKDIR) $(bindir)
$(INSTALL_PROGRAM) wine $(bindir)/wine
$(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
-$(LDCONFIG)
uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__)
cd $(libdir) && $(RM) libwine.a libwine.so libwine.so.$(SOVERSION)
cd $(bindir) && $(RM) wine dosmod
libwine.so.$(SOVERSION): $(OBJS) Makefile.in Make.rules.in
$(LDSHARED) $(OBJS) -o $@
libwine.so: libwine.so.$(SOVERSION)
$(RM) $@ && $(LN_S) libwine.so.$(SOVERSION) $@
libwine.a: $(OBJS) Makefile.in Make.rules.in
$(RM) $@
$(AR) $@ $(OBJS)
$(RANLIB) $@
$(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS) $(LIBPROGRAMS) $(LIBRARIES): dummy
$(EMUOBJS) $(DLLOBJS) $(PROGRAMS) $(LIBPROGRAMS) $(LIBRARIES): dummy
@cd `dirname $@` && $(MAKE) `basename $@`
# Dependencies between directories
$(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS) dlls: tools
$(LIBPROGRAMS): tools dlls libwine.$(LIBEXT) libwine_unicode.$(LIBEXT)
server tools dlls: libwine_unicode.$(LIBEXT)
libwine.$(LIBEXT): library/libwine.$(LIBEXT)
$(RM) $@ && $(LN_S) library/libwine.$(LIBEXT) $@
libwine_unicode.$(LIBEXT): unicode/libwine_unicode.$(LIBEXT)
$(RM) $@ && $(LN_S) unicode/libwine_unicode.$(LIBEXT) $@
$(LIBLINTS) $(EMULINTS): dummy
@cd `dirname $@` && $(MAKE) lint
# Dependencies between directories
$(EMUOBJS) $(DLLOBJS) $(PROGRAMS): tools
$(LIBPROGRAMS): tools dlls libwine.$(LIBEXT) libwine_unicode.$(LIBEXT)
server tools: libwine_unicode.$(LIBEXT)
dlls: tools libwine.$(LIBEXT) libwine_unicode.$(LIBEXT)
checklink::
$(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -lwine -lwine_unicode $(LIBS) && $(RM) checklink
@ -191,10 +131,10 @@ htmlpages:
for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done
clean::
$(RM) wine libwine.so.$(SOVERSION) TAGS
$(RM) wine
distclean: clean
$(RM) config.* Make.rules dlls/Makedll.rules include/config.h documentation/wine.man documentation/wine.conf.man
$(RM) config.* TAGS Make.rules dlls/Makedll.rules include/config.h documentation/wine.man documentation/wine.conf.man
$(RM) `find . \( -name Makefile -o -size 0 \) -print`
# We depend on configure above for checks, so we better don't use this rule.

View File

@ -12,7 +12,6 @@
DEFS = @DLLFLAGS@ -D__WINE__
LIBEXT = @LIBEXT@
LDSHARED = @LDSHARED@
SONAME = lib$(MODULE).so
IMPORTLIBS = $(IMPORTS:%=$(DLLDIR)/lib%.$(LIBEXT))
ALLNAMES = lib$(MODULE).so $(ALTNAMES:%=lib%.so)
@ -25,7 +24,7 @@ all: lib$(MODULE).$(LIBEXT) $(ALTNAMES:%=lib%.$(LIBEXT))
# Rules for .so files
lib$(MODULE).so.$(SOVERSION): $(OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in
$(LDSHARED) $(OBJS) -o $@ -L$(DLLDIR) $(IMPORTS:%=-l%) $(EXTRALIBS)
$(LDSHARED) $(OBJS) -o $@ -L$(DLLDIR) $(IMPORTS:%=-l%) -L$(TOPOBJDIR) -lwine -lwine_unicode $(EXTRALIBS)
$(ALLNAMES): lib$(MODULE).so.$(SOVERSION)
$(RM) $@ && $(LN_S) lib$(MODULE).so.$(SOVERSION) $@

View File

@ -33,6 +33,7 @@ DLLFILES = \
msacm/libmsacm32.@LIBEXT@ \
msnet32/libmsnet32.@LIBEXT@ \
msvideo/libmsvfw32.@LIBEXT@ \
ntdll/libntdll.@LIBEXT@ \
odbc32/libodbc32.@LIBEXT@ \
ole32/libole32.@LIBEXT@ \
oleaut32/liboleaut32.@LIBEXT@ \
@ -141,6 +142,7 @@ SUBDIRS = \
msacm \
msnet32 \
msvideo \
ntdll \
odbc32 \
ole32 \
oleaut32 \
@ -269,6 +271,9 @@ libmsnet32.@LIBEXT@: msnet32/libmsnet32.@LIBEXT@
libmsvfw32.@LIBEXT@ libmsvideo.@LIBEXT@: msvideo/libmsvfw32.@LIBEXT@
$(RM) $@ && $(LN_S) msvideo/libmsvfw32.@LIBEXT@ $@
libntdll.@LIBEXT@: ntdll/libntdll.@LIBEXT@
$(RM) $@ && $(LN_S) ntdll/libntdll.@LIBEXT@ $@
libodbc32.@LIBEXT@: odbc32/libodbc32.@LIBEXT@
$(RM) $@ && $(LN_S) odbc32/libodbc32.@LIBEXT@ $@
@ -372,11 +377,12 @@ libx11drv.@LIBEXT@: x11drv/libx11drv.@LIBEXT@
# Inter-dll dependencies (only necessary for .so)
advapi32/libadvapi32.so: libkernel32.so
advapi32/libadvapi32.so: libkernel32.so libntdll.so
avifil32/libavifil32.so: libmsvfw32.so libkernel32.so
comctl32/libcomctl32.so: libuser32.so libgdi32.so libadvapi32.so libkernel32.so
commdlg/libcomdlg32.so: libshell32.so libshlwapi.so libcomctl32.so libuser32.so libwinspool.drv.so libgdi32.so libkernel32.so
crtdll/libcrtdll.so: libkernel32.so
commdlg/libcomdlg32.so: libshell32.so libshlwapi.so libcomctl32.so libuser32.so libwinspool.drv.so libgdi32.so libkernel32.so libntdll.so
crtdll/libcrtdll.so: libkernel32.so libntdll.so
dciman32/libdciman32.so: libntdll.so
ddraw/libddraw.so: libole32.so libuser32.so libx11drv.so libgdi32.so libkernel32.so
dinput/libdinput.so: libuser32.so libkernel32.so
dplay/libdplay.so: libdplayx.so
@ -386,17 +392,24 @@ gdi/libgdi32.so: libadvapi32.so libkernel32.so
icmp/libicmp.so: libkernel32.so
imagehlp/libimagehlp.so: libkernel32.so
imm32/libimm32.so: libkernel32.so
kernel/libkernel32.so: libntdll.so
lzexpand/liblz32.so: libkernel32.so
mpr/libmpr.so: libkernel32.so
msacm/libmsacm32.so: libwinmm.so libuser32.so libkernel32.so
msnet32/libmsnet32.so: libntdll.so
msvideo/libmsvfw32.so: libwinmm.so libuser32.so libgdi32.so libkernel32.so
ole32/libole32.so: libadvapi32.so libuser32.so libgdi32.so librpcrt4.so libkernel32.so
odbc32/libodbc32.so: libntdll.so
ole32/libole32.so: libadvapi32.so libuser32.so libgdi32.so librpcrt4.so libkernel32.so libntdll.so
oleaut32/liboleaut32.so: libole32.so libuser32.so libgdi32.so libkernel32.so
olecli/libolecli32.so: libole32.so libolesvr32.so libgdi32.so
oledlg/liboledlg.so: libntdll.so
olepro32/libolepro32.so: liboleaut32.so
olesvr/libolesvr32.so: libntdll.so
opengl32/libopengl32.so: libx11drv.so libkernel32.so
psapi/libpsapi.so: libkernel32.so
rasapi32/librasapi32.so: libntdll.so
richedit/libriched32.so: libuser32.so libkernel32.so
rpcrt4/librpcrt4.so: libntdll.so
serialui/libserialui.so: libuser32.so libadvapi32.so libkernel32.so
setupapi/libsetupapi.so: libadvapi32.so libkernel32.so
shell32/libshell32.so: libole32.so libshlwapi.so libcomctl32.so libadvapi32.so libuser32.so libgdi32.so libkernel32.so
@ -405,7 +418,7 @@ shlwapi/libshlwapi.so: libadvapi32.so libuser32.so libgdi32.so libkernel32.so
tapi32/libtapi32.so: libkernel32.so
ttydrv/libttydrv.so: libuser32.so libgdi32.so libkernel32.so
urlmon/liburlmon.so: libole32.so
user/libuser32.so: libgdi32.so libadvapi32.so libkernel32.so
user/libuser32.so: libgdi32.so libadvapi32.so libkernel32.so libntdll.so
version/libversion.so: liblz32.so libkernel32.so
win32s/libw32skrnl.so: libkernel32.so
winaspi/libwnaspi32.so: libadvapi32.so libkernel32.so
@ -421,7 +434,7 @@ winmm/mciwave/libmciwave.drv.so: libwinmm.so libuser32.so libkernel32.so
winmm/midimap/libmidimap.drv.so: libwinmm.so libuser32.so libkernel32.so
winmm/wavemap/libmsacm.drv.so: libwinmm.so libuser32.so libkernel32.so
winmm/wineoss/libwineoss.drv.so: libwinmm.so libuser32.so libkernel32.so
winsock/libws2_32.so: libuser32.so libkernel32.so
winsock/libws2_32.so: libuser32.so libkernel32.so libntdll.so
winspool/libwinspool.drv.so: libgdi32.so libadvapi32.so libkernel32.so
wow32/libwow32.so: libkernel32.so
wsock32/libwsock32.so: libws2_32.so

View File

@ -1,2 +1,3 @@
Makefile
libntdll.so.1.0
ntdll.spec.c

View File

@ -1,11 +1,9 @@
DEFS = @DLLFLAGS@ -D__WINE__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = ntdll
SPEC_SRCS = ntdll.spec
SOVERSION = 1.0
C_SRCS = \
critsection.c \
@ -27,11 +25,39 @@ C_SRCS = \
time.c \
wcstring.c
all: $(MODULE).o
EXTRA_OBJS = \
$(TOPOBJDIR)/console/console.o \
$(TOPOBJDIR)/files/files.o \
$(TOPOBJDIR)/if1632/if1632.o \
$(TOPOBJDIR)/loader/loader.o \
$(TOPOBJDIR)/loader/ne/ne.o \
$(TOPOBJDIR)/loader/dos/dos.o \
$(TOPOBJDIR)/memory/memory.o \
$(TOPOBJDIR)/misc/misc.o \
$(TOPOBJDIR)/msdos/msdos.o \
$(TOPOBJDIR)/ole/ole.o \
$(TOPOBJDIR)/relay32/relay32.o \
$(TOPOBJDIR)/scheduler/scheduler.o \
$(TOPOBJDIR)/win32/win32.o
@MAKE_RULES@
SUBDIRS = \
$(TOPOBJDIR)/console \
$(TOPOBJDIR)/files \
$(TOPOBJDIR)/if1632 \
$(TOPOBJDIR)/loader \
$(TOPOBJDIR)/loader/ne \
$(TOPOBJDIR)/loader/dos \
$(TOPOBJDIR)/memory \
$(TOPOBJDIR)/misc \
$(TOPOBJDIR)/msdos \
$(TOPOBJDIR)/ole \
$(TOPOBJDIR)/relay32 \
$(TOPOBJDIR)/scheduler \
$(TOPOBJDIR)/win32
$(MODULE).o: $(OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in
$(LDCOMBINE) $(OBJS) -o $@
@MAKE_DLL_RULES@
$(EXTRA_OBJS): dummy
@cd `dirname $@` && $(MAKE) `basename $@`
### Dependencies:

View File

@ -1 +1,2 @@
Makefile
libwine.so.1.0

View File

@ -1,14 +1,46 @@
DEFS = -D__WINE__
DEFS = @DLLFLAGS@ -D__WINE__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ..
SRCDIR = @srcdir@
VPATH = @srcdir@
LIBEXT = @LIBEXT@
MODULE = none
SOVERSION = 1.0
SONAME = libwine.so
C_SRCS = winestub.c
C_SRCS = \
port.c
all: $(C_SRCS:.c=.o)
all: libwine.$(LIBEXT)
@MAKE_RULES@
libwine.so.$(SOVERSION): $(OBJS)
$(LDSHARED) $(OBJS) -o $@
libwine.so: libwine.so.$(SOVERSION)
$(RM) $@ && $(LN_S) libwine.so.$(SOVERSION) $@
libwine.a: $(OBJS)
$(RM) $@
$(AR) $@ $(OBJS)
$(RANLIB) $@
install_so: libwine.so.$(SOVERSION)
[ -d $(libdir) ] || $(MKDIR) $(libdir)
$(INSTALL_PROGRAM) libwine.so.$(SOVERSION) $(libdir)/libwine.so.$(SOVERSION)
cd $(libdir) && $(RM) libwine.so && $(LN_S) libwine.so.$(SOVERSION) libwine.so
install_a: libwine.a
[ -d $(libdir) ] || $(MKDIR) $(libdir)
$(INSTALL_DATA) libwine.a $(libdir)/libwine.a
install:: all $(LIBEXT:%=install_%)
uninstall::
cd $(libdir) && $(RM) libwine.a libwine.so libwine.so.$(SOVERSION)
clean::
$(RM) libwine.so.$(SOVERSION)
### Dependencies:

View File

@ -52,8 +52,8 @@ unsigned int usleep (unsigned int useconds)
#elif defined(HAVE_SELECT)
struct timeval delay;
delay.tv_sec = 0;
delay.tv_usec = useconds;
delay.tv_sec = useconds / 1000000;
delay.tv_usec = useconds % 1000000;
select( 0, 0, 0, 0, &delay );
return 0;
@ -171,8 +171,8 @@ int strncasecmp( const char *str1, const char *str2, size_t n )
* FIXME
* We should have a autoconf check for this.
*/
int wine_openpty(int *master, int *slave, char *name,
struct termios *term, struct winsize *winsize)
int wine_openpty(int *master, int *slave, char *name,
struct termios *term, struct winsize *winsize)
{
#ifdef HAVE_OPENPTY
return openpty(master,slave,name,term,winsize);
@ -200,11 +200,11 @@ int wine_openpty(int *master, int *slave, char *name,
}
if (term != NULL)
tcsetattr(*slave, TCSANOW, term);
if (winsize != NULL)
ioctl(*slave, TIOCSWINSZ, winsize);
if (name != NULL)
strcpy(name, pts_name);
tcsetattr(*slave, TCSANOW, term);
if (winsize != NULL)
ioctl(*slave, TIOCSWINSZ, winsize);
if (name != NULL)
strcpy(name, pts_name);
return *slave;
}
}
@ -272,7 +272,7 @@ struct servent *getservbyport(int port, const char *proto)
*/
#ifndef HAVE_GETSOCKOPT
int getsockopt(int socket, int level, int option_name,
void *option_value, size_t *option_len)
void *option_value, size_t *option_len)
{
errno = ENOSYS;
return -1;
@ -313,7 +313,7 @@ int statfs(const char *name, struct statfs *info)
#ifdef __BEOS__
dev_t mydev;
fs_info fsinfo;
if(!info) {
errno = ENOSYS;
return -1;
@ -321,18 +321,17 @@ int statfs(const char *name, struct statfs *info)
if ((mydev = dev_for_path(name)) < 0) {
errno = ENOSYS;
return -1;
return -1;
}
if (fs_stat_dev(mydev,&fsinfo) < 0) {
errno = ENOSYS;
return -1;
return -1;
}
info->f_bsize = fsinfo.block_size;
info->f_blocks = fsinfo.total_blocks;
info->f_bfree = fsinfo.free_blocks;
return 0;
#else /* defined(__BEOS__) */
errno = ENOSYS;

View File

@ -1,53 +0,0 @@
/* Sample winestub.c file for compiling programs with libwine.so. */
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "debugtools.h"
extern int PASCAL WinMain(HINSTANCE,HINSTANCE,LPSTR,int);
/* external declaration here because we don't want to depend on Wine headers */
#ifdef __cplusplus
extern "C" HINSTANCE MAIN_WinelibInit( int *argc, char *argv[] );
#else
extern HINSTANCE MAIN_WinelibInit( int *argc, char *argv[] );
#endif
/* Most Windows C/C++ compilers use something like this to */
/* access argc and argv globally: */
int _ARGC;
char **_ARGV;
int main( int argc, char *argv [] )
{
HINSTANCE hInstance;
LPSTR lpszCmdParam;
int i, len = 0, retv;
_ARGC = argc;
_ARGV = (char **)argv;
if (!(hInstance = MAIN_WinelibInit( &argc, argv ))) return 0;
/* Alloc szCmdParam */
for (i = 1; i < argc; i++) len += strlen(argv[i]) + 1;
lpszCmdParam = (LPSTR) malloc(len + 1);
if(lpszCmdParam == NULL) {
MESSAGE("Not enough memory to store command parameters!");
return 1;
}
/* Concatenate arguments */
if (argc > 1) strcpy(lpszCmdParam, argv[1]);
else lpszCmdParam[0] = '\0';
for (i = 2; i < argc; i++) strcat(strcat(lpszCmdParam, " "), argv[i]);
retv = WinMain (hInstance, /* hInstance */
0, /* hPrevInstance */
lpszCmdParam, /* lpszCmdParam */
SW_NORMAL); /* nCmdShow */
ExitProcess( retv );
return retv;
}

View File

@ -15,7 +15,6 @@ C_SRCS = \
lstr.c \
main.c \
options.c \
port.c \
registry.c \
system.c \
tweak.c \

View File

@ -3,7 +3,6 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
LIBEXT = @LIBEXT@
PROGRAMS = winebuild
MODULE = none

View File

@ -4,7 +4,6 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
YACCOPT = #-v
LIBEXT = @LIBEXT@
PROGRAMS = wmc
MODULE = none

View File

@ -3,7 +3,6 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
LIBEXT = @LIBEXT@
LEXOPT = -Cf #-w -b
YACCOPT = #-v

View File

@ -4,7 +4,6 @@ TOPOBJDIR = ..
SRCDIR = @srcdir@
VPATH = @srcdir@
LIBEXT = @LIBEXT@
LDSHARED = @LDSHARED@
MODULE = none
SOVERSION = 1.0
SONAME = libwine_unicode.so