Commit 2fa4f767 authored by Alexandre Julliard's avatar Alexandre Julliard

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

libwine.so. Created a new (mostly empty) libwine.so in library/ subdir.
parent 4efd28ce
...@@ -3,5 +3,4 @@ Makefile ...@@ -3,5 +3,4 @@ Makefile
config.cache config.cache
config.log config.log
config.status config.status
libwine.so.1.0
wine wine
...@@ -34,6 +34,8 @@ LIBS = @LIBS@ ...@@ -34,6 +34,8 @@ LIBS = @LIBS@
YACC = @YACC@ YACC = @YACC@
LEX = @LEX@ LEX = @LEX@
LEXLIB = @LEXLIB@ LEXLIB = @LEXLIB@
LIBEXT = @LIBEXT@
LDSHARED = @LDSHARED@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
LN_S = @LN_S@ LN_S = @LN_S@
DIVINCL = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include DIVINCL = -I$(SRCDIR) -I. -I$(TOPSRCDIR)/include -I$(TOPOBJDIR)/include
......
...@@ -17,11 +17,9 @@ TOPOBJDIR = . ...@@ -17,11 +17,9 @@ TOPOBJDIR = .
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
LIBEXT = @LIBEXT@ LIBEXT = @LIBEXT@
LDSHARED = @LDSHARED@
LDCONFIG = @LDCONFIG@ LDCONFIG = @LDCONFIG@
MODULE = wine MODULE = wine
SOVERSION = 1.0 IMPORTS = ntdll
SONAME = libwine.so
# Stand-alone programs # Stand-alone programs
PROGRAMS = \ PROGRAMS = \
...@@ -34,35 +32,22 @@ LIBPROGRAMS = \ ...@@ -34,35 +32,22 @@ LIBPROGRAMS = \
# Libraries (not dlls) to build # Libraries (not dlls) to build
LIBRARIES = \ LIBRARIES = \
library/libwine.$(LIBEXT) \
unicode/libwine_unicode.$(LIBEXT) unicode/libwine_unicode.$(LIBEXT)
# Sub-directories to run make depend/clean into # Sub-directories to run make depend/clean into
SUBDIRS = \ SUBDIRS = \
console \
debugger \ debugger \
dlls \ dlls \
dlls/ntdll \
documentation \ documentation \
files \
if1632 \
include \ include \
library \ library \
libtest \ libtest \
loader \
loader/dos \
loader/ne \
memory \
misc \
miscemu \ miscemu \
msdos \
ole \
programs \ programs \
relay32 \
scheduler \
server \ server \
tools \ tools \
unicode \ unicode
win32
# Sub-directories to run make install into # Sub-directories to run make install into
INSTALLSUBDIRS = \ INSTALLSUBDIRS = \
...@@ -70,42 +55,19 @@ INSTALLSUBDIRS = \ ...@@ -70,42 +55,19 @@ INSTALLSUBDIRS = \
dlls \ dlls \
documentation \ documentation \
include \ include \
library \
server \ server \
tools \ tools \
unicode 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 = \ EMUOBJS = \
miscemu/miscemu.o miscemu/miscemu.o
DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@) DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@)
EXTRA_OBJS = $(LIBOBJS)
all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) wine all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) wine
@echo "Wine build complete." @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 WINAPI_CHECK_EXTRA_FLAGS = --global
@MAKE_RULES@ @MAKE_RULES@
...@@ -117,55 +79,33 @@ Make.rules: Make.rules.in configure ...@@ -117,55 +79,33 @@ Make.rules: Make.rules.in configure
wine: libwine.$(LIBEXT) libwine_unicode.$(LIBEXT) dlls $(EMUOBJS) wine: libwine.$(LIBEXT) libwine_unicode.$(LIBEXT) dlls $(EMUOBJS)
$(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LIBS) $(LDFLAGS) $(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LIBS) $(LDFLAGS)
llib-lwine.ln : $(LIBLINTS) install:: all $(INSTALLSUBDIRS:%=%/__install__)
$(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__)
[ -d $(bindir) ] || $(MKDIR) $(bindir) [ -d $(bindir) ] || $(MKDIR) $(bindir)
$(INSTALL_PROGRAM) wine $(bindir)/wine $(INSTALL_PROGRAM) wine $(bindir)/wine
$(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod $(INSTALL_PROGRAM) loader/dos/dosmod $(bindir)/dosmod
-$(LDCONFIG) -$(LDCONFIG)
uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__) uninstall:: $(INSTALLSUBDIRS:%=%/__uninstall__)
cd $(libdir) && $(RM) libwine.a libwine.so libwine.so.$(SOVERSION)
cd $(bindir) && $(RM) wine dosmod cd $(bindir) && $(RM) wine dosmod
libwine.so.$(SOVERSION): $(OBJS) Makefile.in Make.rules.in $(EMUOBJS) $(DLLOBJS) $(PROGRAMS) $(LIBPROGRAMS) $(LIBRARIES): dummy
$(LDSHARED) $(OBJS) -o $@ @cd `dirname $@` && $(MAKE) `basename $@`
libwine.so: libwine.so.$(SOVERSION)
$(RM) $@ && $(LN_S) libwine.so.$(SOVERSION) $@
libwine.a: $(OBJS) Makefile.in Make.rules.in libwine.$(LIBEXT): library/libwine.$(LIBEXT)
$(RM) $@ $(RM) $@ && $(LN_S) library/libwine.$(LIBEXT) $@
$(AR) $@ $(OBJS)
$(RANLIB) $@
$(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS) $(LIBPROGRAMS) $(LIBRARIES): dummy libwine_unicode.$(LIBEXT): unicode/libwine_unicode.$(LIBEXT)
@cd `dirname $@` && $(MAKE) `basename $@` $(RM) $@ && $(LN_S) unicode/libwine_unicode.$(LIBEXT) $@
# Dependencies between directories # Dependencies between directories
$(EMUOBJS) $(LIBOBJS) $(DLLOBJS) $(PROGRAMS) dlls: tools $(EMUOBJS) $(DLLOBJS) $(PROGRAMS): tools
$(LIBPROGRAMS): tools dlls libwine.$(LIBEXT) libwine_unicode.$(LIBEXT) $(LIBPROGRAMS): tools dlls libwine.$(LIBEXT) libwine_unicode.$(LIBEXT)
server tools dlls: libwine_unicode.$(LIBEXT) server tools: libwine_unicode.$(LIBEXT)
libwine_unicode.$(LIBEXT): unicode/libwine_unicode.$(LIBEXT)
$(RM) $@ && $(LN_S) unicode/libwine_unicode.$(LIBEXT) $@
$(LIBLINTS) $(EMULINTS): dummy dlls: tools libwine.$(LIBEXT) libwine_unicode.$(LIBEXT)
@cd `dirname $@` && $(MAKE) lint
checklink:: checklink::
$(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -lwine -lwine_unicode $(LIBS) && $(RM) checklink $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -lwine -lwine_unicode $(LIBS) && $(RM) checklink
...@@ -191,10 +131,10 @@ htmlpages: ...@@ -191,10 +131,10 @@ htmlpages:
for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done for i in $(SUBDIRS); do (cd $$i && $(MAKE) html); done
clean:: clean::
$(RM) wine libwine.so.$(SOVERSION) TAGS $(RM) wine
distclean: clean 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` $(RM) `find . \( -name Makefile -o -size 0 \) -print`
# We depend on configure above for checks, so we better don't use this rule. # We depend on configure above for checks, so we better don't use this rule.
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
DEFS = @DLLFLAGS@ -D__WINE__ DEFS = @DLLFLAGS@ -D__WINE__
LIBEXT = @LIBEXT@ LIBEXT = @LIBEXT@
LDSHARED = @LDSHARED@
SONAME = lib$(MODULE).so SONAME = lib$(MODULE).so
IMPORTLIBS = $(IMPORTS:%=$(DLLDIR)/lib%.$(LIBEXT)) IMPORTLIBS = $(IMPORTS:%=$(DLLDIR)/lib%.$(LIBEXT))
ALLNAMES = lib$(MODULE).so $(ALTNAMES:%=lib%.so) ALLNAMES = lib$(MODULE).so $(ALTNAMES:%=lib%.so)
...@@ -25,7 +24,7 @@ all: lib$(MODULE).$(LIBEXT) $(ALTNAMES:%=lib%.$(LIBEXT)) ...@@ -25,7 +24,7 @@ all: lib$(MODULE).$(LIBEXT) $(ALTNAMES:%=lib%.$(LIBEXT))
# Rules for .so files # Rules for .so files
lib$(MODULE).so.$(SOVERSION): $(OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in 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) $(ALLNAMES): lib$(MODULE).so.$(SOVERSION)
$(RM) $@ && $(LN_S) lib$(MODULE).so.$(SOVERSION) $@ $(RM) $@ && $(LN_S) lib$(MODULE).so.$(SOVERSION) $@
......
...@@ -33,6 +33,7 @@ DLLFILES = \ ...@@ -33,6 +33,7 @@ DLLFILES = \
msacm/libmsacm32.@LIBEXT@ \ msacm/libmsacm32.@LIBEXT@ \
msnet32/libmsnet32.@LIBEXT@ \ msnet32/libmsnet32.@LIBEXT@ \
msvideo/libmsvfw32.@LIBEXT@ \ msvideo/libmsvfw32.@LIBEXT@ \
ntdll/libntdll.@LIBEXT@ \
odbc32/libodbc32.@LIBEXT@ \ odbc32/libodbc32.@LIBEXT@ \
ole32/libole32.@LIBEXT@ \ ole32/libole32.@LIBEXT@ \
oleaut32/liboleaut32.@LIBEXT@ \ oleaut32/liboleaut32.@LIBEXT@ \
...@@ -141,6 +142,7 @@ SUBDIRS = \ ...@@ -141,6 +142,7 @@ SUBDIRS = \
msacm \ msacm \
msnet32 \ msnet32 \
msvideo \ msvideo \
ntdll \
odbc32 \ odbc32 \
ole32 \ ole32 \
oleaut32 \ oleaut32 \
...@@ -269,6 +271,9 @@ libmsnet32.@LIBEXT@: msnet32/libmsnet32.@LIBEXT@ ...@@ -269,6 +271,9 @@ libmsnet32.@LIBEXT@: msnet32/libmsnet32.@LIBEXT@
libmsvfw32.@LIBEXT@ libmsvideo.@LIBEXT@: msvideo/libmsvfw32.@LIBEXT@ libmsvfw32.@LIBEXT@ libmsvideo.@LIBEXT@: msvideo/libmsvfw32.@LIBEXT@
$(RM) $@ && $(LN_S) 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@ libodbc32.@LIBEXT@: odbc32/libodbc32.@LIBEXT@
$(RM) $@ && $(LN_S) odbc32/libodbc32.@LIBEXT@ $@ $(RM) $@ && $(LN_S) odbc32/libodbc32.@LIBEXT@ $@
...@@ -372,11 +377,12 @@ libx11drv.@LIBEXT@: x11drv/libx11drv.@LIBEXT@ ...@@ -372,11 +377,12 @@ libx11drv.@LIBEXT@: x11drv/libx11drv.@LIBEXT@
# Inter-dll dependencies (only necessary for .so) # 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 avifil32/libavifil32.so: libmsvfw32.so libkernel32.so
comctl32/libcomctl32.so: libuser32.so libgdi32.so libadvapi32.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 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 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 ddraw/libddraw.so: libole32.so libuser32.so libx11drv.so libgdi32.so libkernel32.so
dinput/libdinput.so: libuser32.so libkernel32.so dinput/libdinput.so: libuser32.so libkernel32.so
dplay/libdplay.so: libdplayx.so dplay/libdplay.so: libdplayx.so
...@@ -386,17 +392,24 @@ gdi/libgdi32.so: libadvapi32.so libkernel32.so ...@@ -386,17 +392,24 @@ gdi/libgdi32.so: libadvapi32.so libkernel32.so
icmp/libicmp.so: libkernel32.so icmp/libicmp.so: libkernel32.so
imagehlp/libimagehlp.so: libkernel32.so imagehlp/libimagehlp.so: libkernel32.so
imm32/libimm32.so: libkernel32.so imm32/libimm32.so: libkernel32.so
kernel/libkernel32.so: libntdll.so
lzexpand/liblz32.so: libkernel32.so lzexpand/liblz32.so: libkernel32.so
mpr/libmpr.so: libkernel32.so mpr/libmpr.so: libkernel32.so
msacm/libmsacm32.so: libwinmm.so libuser32.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 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 oleaut32/liboleaut32.so: libole32.so libuser32.so libgdi32.so libkernel32.so
olecli/libolecli32.so: libole32.so libolesvr32.so libgdi32.so olecli/libolecli32.so: libole32.so libolesvr32.so libgdi32.so
oledlg/liboledlg.so: libntdll.so
olepro32/libolepro32.so: liboleaut32.so olepro32/libolepro32.so: liboleaut32.so
olesvr/libolesvr32.so: libntdll.so
opengl32/libopengl32.so: libx11drv.so libkernel32.so opengl32/libopengl32.so: libx11drv.so libkernel32.so
psapi/libpsapi.so: libkernel32.so psapi/libpsapi.so: libkernel32.so
rasapi32/librasapi32.so: libntdll.so
richedit/libriched32.so: libuser32.so libkernel32.so richedit/libriched32.so: libuser32.so libkernel32.so
rpcrt4/librpcrt4.so: libntdll.so
serialui/libserialui.so: libuser32.so libadvapi32.so libkernel32.so serialui/libserialui.so: libuser32.so libadvapi32.so libkernel32.so
setupapi/libsetupapi.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 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 ...@@ -405,7 +418,7 @@ shlwapi/libshlwapi.so: libadvapi32.so libuser32.so libgdi32.so libkernel32.so
tapi32/libtapi32.so: libkernel32.so tapi32/libtapi32.so: libkernel32.so
ttydrv/libttydrv.so: libuser32.so libgdi32.so libkernel32.so ttydrv/libttydrv.so: libuser32.so libgdi32.so libkernel32.so
urlmon/liburlmon.so: libole32.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 version/libversion.so: liblz32.so libkernel32.so
win32s/libw32skrnl.so: libkernel32.so win32s/libw32skrnl.so: libkernel32.so
winaspi/libwnaspi32.so: libadvapi32.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 ...@@ -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/midimap/libmidimap.drv.so: libwinmm.so libuser32.so libkernel32.so
winmm/wavemap/libmsacm.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 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 winspool/libwinspool.drv.so: libgdi32.so libadvapi32.so libkernel32.so
wow32/libwow32.so: libkernel32.so wow32/libwow32.so: libkernel32.so
wsock32/libwsock32.so: libws2_32.so wsock32/libwsock32.so: libws2_32.so
......
Makefile Makefile
libntdll.so.1.0
ntdll.spec.c ntdll.spec.c
DEFS = @DLLFLAGS@ -D__WINE__
TOPSRCDIR = @top_srcdir@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../.. TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = ntdll MODULE = ntdll
SOVERSION = 1.0
SPEC_SRCS = ntdll.spec
C_SRCS = \ C_SRCS = \
critsection.c \ critsection.c \
...@@ -27,11 +25,39 @@ C_SRCS = \ ...@@ -27,11 +25,39 @@ C_SRCS = \
time.c \ time.c \
wcstring.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
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
@MAKE_RULES@ @MAKE_DLL_RULES@
$(MODULE).o: $(OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in $(EXTRA_OBJS): dummy
$(LDCOMBINE) $(OBJS) -o $@ @cd `dirname $@` && $(MAKE) `basename $@`
### Dependencies: ### Dependencies:
Makefile Makefile
libwine.so.1.0
DEFS = -D__WINE__ DEFS = @DLLFLAGS@ -D__WINE__
TOPSRCDIR = @top_srcdir@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = .. TOPOBJDIR = ..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
LIBEXT = @LIBEXT@
MODULE = none 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@ @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: ### Dependencies:
...@@ -52,8 +52,8 @@ unsigned int usleep (unsigned int useconds) ...@@ -52,8 +52,8 @@ unsigned int usleep (unsigned int useconds)
#elif defined(HAVE_SELECT) #elif defined(HAVE_SELECT)
struct timeval delay; struct timeval delay;
delay.tv_sec = 0; delay.tv_sec = useconds / 1000000;
delay.tv_usec = useconds; delay.tv_usec = useconds % 1000000;
select( 0, 0, 0, 0, &delay ); select( 0, 0, 0, 0, &delay );
return 0; return 0;
...@@ -171,8 +171,8 @@ int strncasecmp( const char *str1, const char *str2, size_t n ) ...@@ -171,8 +171,8 @@ int strncasecmp( const char *str1, const char *str2, size_t n )
* FIXME * FIXME
* We should have a autoconf check for this. * We should have a autoconf check for this.
*/ */
int wine_openpty(int *master, int *slave, char *name, int wine_openpty(int *master, int *slave, char *name,
struct termios *term, struct winsize *winsize) struct termios *term, struct winsize *winsize)
{ {
#ifdef HAVE_OPENPTY #ifdef HAVE_OPENPTY
return openpty(master,slave,name,term,winsize); return openpty(master,slave,name,term,winsize);
...@@ -200,11 +200,11 @@ int wine_openpty(int *master, int *slave, char *name, ...@@ -200,11 +200,11 @@ int wine_openpty(int *master, int *slave, char *name,
} }
if (term != NULL) if (term != NULL)
tcsetattr(*slave, TCSANOW, term); tcsetattr(*slave, TCSANOW, term);
if (winsize != NULL) if (winsize != NULL)
ioctl(*slave, TIOCSWINSZ, winsize); ioctl(*slave, TIOCSWINSZ, winsize);
if (name != NULL) if (name != NULL)
strcpy(name, pts_name); strcpy(name, pts_name);
return *slave; return *slave;
} }
} }
...@@ -272,7 +272,7 @@ struct servent *getservbyport(int port, const char *proto) ...@@ -272,7 +272,7 @@ struct servent *getservbyport(int port, const char *proto)
*/ */
#ifndef HAVE_GETSOCKOPT #ifndef HAVE_GETSOCKOPT
int getsockopt(int socket, int level, int option_name, 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; errno = ENOSYS;
return -1; return -1;
...@@ -313,7 +313,7 @@ int statfs(const char *name, struct statfs *info) ...@@ -313,7 +313,7 @@ int statfs(const char *name, struct statfs *info)
#ifdef __BEOS__ #ifdef __BEOS__
dev_t mydev; dev_t mydev;
fs_info fsinfo; fs_info fsinfo;
if(!info) { if(!info) {
errno = ENOSYS; errno = ENOSYS;
return -1; return -1;
...@@ -321,18 +321,17 @@ int statfs(const char *name, struct statfs *info) ...@@ -321,18 +321,17 @@ int statfs(const char *name, struct statfs *info)
if ((mydev = dev_for_path(name)) < 0) { if ((mydev = dev_for_path(name)) < 0) {
errno = ENOSYS; errno = ENOSYS;
return -1; return -1;
} }
if (fs_stat_dev(mydev,&fsinfo) < 0) { if (fs_stat_dev(mydev,&fsinfo) < 0) {
errno = ENOSYS; errno = ENOSYS;
return -1; return -1;
} }
info->f_bsize = fsinfo.block_size; info->f_bsize = fsinfo.block_size;
info->f_blocks = fsinfo.total_blocks; info->f_blocks = fsinfo.total_blocks;
info->f_bfree = fsinfo.free_blocks; info->f_bfree = fsinfo.free_blocks;
return 0; return 0;
#else /* defined(__BEOS__) */ #else /* defined(__BEOS__) */
errno = ENOSYS; errno = ENOSYS;
......
/* 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;
}
...@@ -15,7 +15,6 @@ C_SRCS = \ ...@@ -15,7 +15,6 @@ C_SRCS = \
lstr.c \ lstr.c \
main.c \ main.c \
options.c \ options.c \
port.c \
registry.c \ registry.c \
system.c \ system.c \
tweak.c \ tweak.c \
......
...@@ -3,7 +3,6 @@ TOPSRCDIR = @top_srcdir@ ...@@ -3,7 +3,6 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../.. TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
LIBEXT = @LIBEXT@
PROGRAMS = winebuild PROGRAMS = winebuild
MODULE = none MODULE = none
......
...@@ -4,7 +4,6 @@ TOPOBJDIR = ../.. ...@@ -4,7 +4,6 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
YACCOPT = #-v YACCOPT = #-v
LIBEXT = @LIBEXT@
PROGRAMS = wmc PROGRAMS = wmc
MODULE = none MODULE = none
......
...@@ -3,7 +3,6 @@ TOPSRCDIR = @top_srcdir@ ...@@ -3,7 +3,6 @@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../.. TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
LIBEXT = @LIBEXT@
LEXOPT = -Cf #-w -b LEXOPT = -Cf #-w -b
YACCOPT = #-v YACCOPT = #-v
......
...@@ -4,7 +4,6 @@ TOPOBJDIR = .. ...@@ -4,7 +4,6 @@ TOPOBJDIR = ..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
LIBEXT = @LIBEXT@ LIBEXT = @LIBEXT@
LDSHARED = @LDSHARED@
MODULE = none MODULE = none
SOVERSION = 1.0 SOVERSION = 1.0
SONAME = libwine_unicode.so SONAME = libwine_unicode.so
......
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