diff --git a/Make.rules.in b/Make.rules.in index ccbecb80d65..fec8f11c006 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -8,9 +8,7 @@ # # Each individual makefile may define the following additional variables: # C_SRCS : C sources for the module -# ASM_SRCS : assembly sources -# GEN_C_SRCS : generated C files -# GEN_ASM_SRCS : generated assembly sources +# C_SRCS16 : 16-bit C sources for the module # RC_SRCS : resource source files # SPEC_SRCS : interface definition files # EXTRA_SRCS : extra source files for make depend @@ -100,7 +98,7 @@ conf_manext = 5 CLEAN_FILES = *.o *.a *.so *.ln *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej \ *.flc *.spec.c *.spec.def *.glue.c *.dbg.c y.tab.c y.tab.h @LEX_OUTPUT_ROOT@.c core -OBJS = $(C_SRCS:.c=.o) $(GEN_C_SRCS:.c=.o) $(GEN_ASM_SRCS:.s=.o) $(ASM_SRCS:.S=.o) $(EXTRA_OBJS) +OBJS = $(C_SRCS:.c=.o) $(EXTRA_OBJS) RCOBJS = $(RC_SRCS:.rc=.res.o) LINTS = $(C_SRCS:.c=.ln) @@ -118,9 +116,6 @@ LINTS = $(C_SRCS:.c=.ln) .s.o: $(AS) -o $@ $< -.S.o: - $(CC) -c -o $@ $< - .mc.mc.rc: $(LDPATH) $(WMC) -i -H /dev/null -o $@ $< @@ -156,13 +151,8 @@ filter: # Rule for main module debug channels -$(MODULE).dbg.c: $(C_SRCS) $(WINEBUILD) - $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -debug -C$(SRCDIR) $(C_SRCS) - -# Rule for 16-bit glue - -$(MODULE).glue.c: $(C_SRCS) $(WINEBUILD) - $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -glue -C$(SRCDIR) $(C_SRCS) +$(MODULE).dbg.c: $(C_SRCS) $(C_SRCS16) $(WINEBUILD) + $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -debug -C$(SRCDIR) $(C_SRCS) $(C_SRCS16) # Rule to rebuild the tools @@ -217,7 +207,7 @@ $(SUBDIRS:%=%/__depend__): $(MAKEDEP) dummy cd `dirname $@` && $(MAKE) depend depend: $(MAKEDEP) $(SUBDIRS:%=%/__depend__) - $(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(EXTRA_SRCS) + $(MAKEDEP) $(DIVINCL) -C$(SRCDIR) $(C_SRCS) $(C_SRCS16) $(RC_SRCS) $(RC_SRCS16) $(MC_SRCS) $(EXTRA_SRCS) .PHONY: depend $(SUBDIRS:%=%/__depend__) @@ -235,7 +225,7 @@ $(EXTRASUBDIRS:%=%/__clean__): dummy testclean:: $(SUBDIRS:%=%/__testclean__) clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__) - $(RM) $(CLEAN_FILES) $(GEN_C_SRCS) $(GEN_ASM_SRCS) $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res) $(MC_SRCS:.mc=.mc.rc) $(PROGRAMS) + $(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(RC_SRCS16:.rc=.res) $(MC_SRCS:.mc=.mc.rc) $(PROGRAMS) .PHONY: clean testclean $(SUBDIRS:%=%/__clean__) $(SUBDIRS:%=%/__testclean__) $(EXTRASUBDIRS:%=%/__clean__) diff --git a/configure b/configure index 845d5730e49..a4a10882c97 100755 --- a/configure +++ b/configure @@ -832,6 +832,7 @@ if test -n "$ac_init_help"; then Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-win16 do not include Win16 support --disable-debug compile out all debugging messages --disable-trace compile out TRACE messages --enable-opengl force usage of OpenGL even if the latter is @@ -1244,6 +1245,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. LIBEXT="so" +# Check whether --enable-win16 or --disable-win16 was given. +if test "${enable_win16+set}" = set; then + enableval="$enable_win16" + +fi; # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" @@ -1273,6 +1279,15 @@ if test "${with_wine_tools+set}" = set; then fi; +WIN16_FILES="\$(WIN16_FILES)" + +WIN16_INSTALL="\$(WIN16_INSTALL)" + +if test "x$enable_win16" = "xno" +then + WIN16_FILES="" + WIN16_INSTALL="" +fi if test "x$enable_debug" = "xno" then @@ -14940,6 +14955,8 @@ s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@LIBEXT@,$LIBEXT,;t t s,@OPTIONS@,$OPTIONS,;t t +s,@WIN16_FILES@,$WIN16_FILES,;t t +s,@WIN16_INSTALL@,$WIN16_INSTALL,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t diff --git a/configure.ac b/configure.ac index ef92aeb31d2..b117e9d3225 100644 --- a/configure.ac +++ b/configure.ac @@ -15,6 +15,7 @@ dnl **** Command-line arguments **** dnl Library type .so or .a AC_SUBST(LIBEXT,"so") +AC_ARG_ENABLE(win16, AC_HELP_STRING([--disable-win16],[do not include Win16 support])) AC_ARG_ENABLE(debug, AC_HELP_STRING([--disable-debug],[compile out all debugging messages])) AC_ARG_ENABLE(trace, AC_HELP_STRING([--disable-trace],[compile out TRACE messages])) AC_ARG_ENABLE(opengl,AC_HELP_STRING([--enable-opengl],[force usage of OpenGL even if the latter is thread-safe via pthread])) @@ -22,6 +23,13 @@ AC_ARG_WITH(curses, AC_HELP_STRING([--without-curses],[do not use curses])) AC_ARG_WITH(wine-tools,AC_HELP_STRING([--with-wine-tools=],[use Wine tools from directory ])) AC_SUBST(OPTIONS) +AC_SUBST(WIN16_FILES,"\$(WIN16_FILES)") +AC_SUBST(WIN16_INSTALL,"\$(WIN16_INSTALL)") +if test "x$enable_win16" = "xno" +then + WIN16_FILES="" + WIN16_INSTALL="" +fi if test "x$enable_debug" = "xno" then AC_DEFINE(NO_DEBUG_MSGS,1,[Define to disable all debug messages.]) diff --git a/dlls/Makedll.rules.in b/dlls/Makedll.rules.in index 6d75fc7488b..ed55fb40075 100644 --- a/dlls/Makedll.rules.in +++ b/dlls/Makedll.rules.in @@ -14,7 +14,8 @@ ALTSPECS = $(ALTNAMES:%.dll=%) SPEC_SRCS = $(ALTSPECS:%=%.spec) MAINSPEC = $(MODULE:%.dll=%).spec SPEC_DEF = $(MAINSPEC).def -ALL_OBJS = $(SPEC_SRCS:.spec=.spec.o) $(OBJS) $(MODULE).dbg.o +WIN16_FILES = $(SPEC_SRCS:.spec=.spec.o) $(C_SRCS16:.c=.o) $(EXTRA_OBJS16) +ALL_OBJS = @WIN16_FILES@ $(OBJS) $(MODULE).dbg.o ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBS) all: $(MODULE)$(DLLEXT) @@ -33,6 +34,11 @@ $(MODULE).tmp.o: $(ALL_OBJS) Makefile.in $(LDCOMBINE) $(ALL_OBJS) -o $@ -$(STRIP) --strip-unneeded $@ +# Rule for 16-bit glue + +$(MODULE).glue.c: $(C_SRCS) $(C_SRCS16) $(WINEBUILD) + $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ -glue -C$(SRCDIR) $(C_SRCS) $(C_SRCS16) + # Rules for .dll files $(MODULE): $(RCOBJS) $(OBJS) $(MODULE).dbg.o $(SPEC_DEF) Makefile.in @@ -46,6 +52,7 @@ CHECKLINK_RPATH = dlls library unicode checklink:: $(MODULE)$(DLLEXT) $(SUBDIRS:%=%/__checklink__) $(CC) -o checklink $(CHECKLINK_RPATH:%=-Wl,-rpath,$(TOPOBJDIR)/%) $(TOPSRCDIR)/library/checklink.c $(MODULE)$(DLLEXT) && $(RM) checklink + $(CC) -o checklink $(CHECKLINK_RPATH:%=-Wl,-rpath,$(TOPOBJDIR)/%) $(TOPSRCDIR)/library/checklink.c $(MAINSPEC).o $(OBJS) $(MODULE).dbg.o -L$(DLLDIR) $(LDIMPORTS:%=-l%) $(ALL_LIBS) && $(RM) checklink # Rules for testing @@ -63,7 +70,9 @@ Makedll.rules: $(TOPSRCDIR)/Makedll.rules.in $(TOPSRCDIR)/configure # Rules for installation -.PHONY: install_lib $(ALTNAMES:%=_install_/%$(DLLEXT)) +WIN16_INSTALL = $(ALTNAMES:%=_install_/%$(DLLEXT)) + +.PHONY: install_lib $(WIN16_INSTALL) $(ALTNAMES:%=_install_/%$(DLLEXT)): install_lib cd $(dlldir) && $(RM) `basename $@` && $(LN_S) $(MODULE)$(DLLEXT) `basename $@` @@ -72,7 +81,7 @@ install_lib: $(MODULE)$(DLLEXT) $(MKINSTALLDIRS) $(dlldir) $(INSTALL_PROGRAM) $(MODULE)$(DLLEXT) $(dlldir)/$(MODULE)$(DLLEXT) -install:: install_lib $(ALTNAMES:%=_install_/%$(DLLEXT)) +install:: install_lib @WIN16_INSTALL@ uninstall:: $(RM) $(dlldir)/$(MODULE)$(DLLEXT) $(ALTNAMES:%=$(dlldir)/%$(DLLEXT)) diff --git a/dlls/Makefile.in b/dlls/Makefile.in index 10552664fde..e83e549329d 100644 --- a/dlls/Makefile.in +++ b/dlls/Makefile.in @@ -123,43 +123,79 @@ INSTALLSUBDIRS = $(BUILDSUBDIRS) @MAKE_RULES@ -all: \ - $(EXTRADIRS:%=%.dll$(DLLEXT)) \ - advapi32.dll$(DLLEXT) \ - avicap32.dll$(DLLEXT) \ - avifil32.dll$(DLLEXT) \ +WIN16_FILES = \ avifile.dll$(DLLEXT) \ - comcat.dll$(DLLEXT) \ - comctl32.dll$(DLLEXT) \ - comdlg32.dll$(DLLEXT) \ comm.dll$(DLLEXT) \ commdlg.dll$(DLLEXT) \ compobj.dll$(DLLEXT) \ + ddeml.dll$(DLLEXT) \ + dispdib.dll$(DLLEXT) \ + display.dll$(DLLEXT) \ + gdi.exe$(DLLEXT) \ + imm.dll$(DLLEXT) \ + keyboard.dll$(DLLEXT) \ + krnl386.exe$(DLLEXT) \ + lzexpand.dll$(DLLEXT) \ + mmsystem.dll$(DLLEXT) \ + mouse.dll$(DLLEXT) \ + msacm.dll$(DLLEXT) \ + msvideo.dll$(DLLEXT) \ + ole2.dll$(DLLEXT) \ + ole2conv.dll$(DLLEXT) \ + ole2disp.dll$(DLLEXT) \ + ole2nls.dll$(DLLEXT) \ + ole2prox.dll$(DLLEXT) \ + ole2thk.dll$(DLLEXT) \ + olecli.dll$(DLLEXT) \ + olesvr.dll$(DLLEXT) \ + rasapi16.dll$(DLLEXT) \ + setupx.dll$(DLLEXT) \ + shell.dll$(DLLEXT) \ + sound.dll$(DLLEXT) \ + storage.dll$(DLLEXT) \ + stress.dll$(DLLEXT) \ + system.dll$(DLLEXT) \ + toolhelp.dll$(DLLEXT) \ + typelib.dll$(DLLEXT) \ + user.exe$(DLLEXT) \ + ver.dll$(DLLEXT) \ + w32sys.dll$(DLLEXT) \ + win32s16.dll$(DLLEXT) \ + win87em.dll$(DLLEXT) \ + winaspi.dll$(DLLEXT) \ + windebug.dll$(DLLEXT) \ + wineps16.dll$(DLLEXT) \ + wing.dll$(DLLEXT) \ + winnls.dll$(DLLEXT) \ + winsock.dll$(DLLEXT) \ + wprocs.dll$(DLLEXT) + +all: \ + $(EXTRADIRS:%=%.dll$(DLLEXT)) \ + @WIN16_FILES@ \ + advapi32.dll$(DLLEXT) \ + avicap32.dll$(DLLEXT) \ + avifil32.dll$(DLLEXT) \ + comcat.dll$(DLLEXT) \ + comctl32.dll$(DLLEXT) \ + comdlg32.dll$(DLLEXT) \ crtdll.dll$(DLLEXT) \ crypt32.dll$(DLLEXT) \ dciman32.dll$(DLLEXT) \ - ddeml.dll$(DLLEXT) \ devenum.dll$(DLLEXT) \ dinput.dll$(DLLEXT) \ dinput8.dll$(DLLEXT) \ - dispdib.dll$(DLLEXT) \ - display.dll$(DLLEXT) \ dplay.dll$(DLLEXT) \ dplayx.dll$(DLLEXT) \ dsound.dll$(DLLEXT) \ - gdi.exe$(DLLEXT) \ gdi32.dll$(DLLEXT) \ icmp.dll$(DLLEXT) \ imaadp32.acm$(DLLEXT) \ imagehlp.dll$(DLLEXT) \ - imm.dll$(DLLEXT) \ imm32.dll$(DLLEXT) \ joystick.drv$(DLLEXT) \ kernel32.dll$(DLLEXT) \ - keyboard.dll$(DLLEXT) \ - krnl386.exe$(DLLEXT) \ lz32.dll$(DLLEXT) \ - lzexpand.dll$(DLLEXT) \ mapi32.dll$(DLLEXT) \ mcianim.drv$(DLLEXT) \ mciavi.drv$(DLLEXT) \ @@ -167,10 +203,7 @@ all: \ mciseq.drv$(DLLEXT) \ mciwave.drv$(DLLEXT) \ midimap.drv$(DLLEXT) \ - mmsystem.dll$(DLLEXT) \ - mouse.dll$(DLLEXT) \ mpr.dll$(DLLEXT) \ - msacm.dll$(DLLEXT) \ msacm.drv$(DLLEXT) \ msacm32.dll$(DLLEXT) \ msadp32.acm$(DLLEXT) \ @@ -183,62 +216,37 @@ all: \ msvcrt.dll$(DLLEXT) \ msvcrt20.dll$(DLLEXT) \ msvfw32.dll$(DLLEXT) \ - msvideo.dll$(DLLEXT) \ netapi32.dll$(DLLEXT) \ ntdll.dll$(DLLEXT) \ odbc32.dll$(DLLEXT) \ - ole2.dll$(DLLEXT) \ - ole2conv.dll$(DLLEXT) \ - ole2disp.dll$(DLLEXT) \ - ole2nls.dll$(DLLEXT) \ - ole2prox.dll$(DLLEXT) \ - ole2thk.dll$(DLLEXT) \ ole32.dll$(DLLEXT) \ oleaut32.dll$(DLLEXT) \ - olecli.dll$(DLLEXT) \ olecli32.dll$(DLLEXT) \ oledlg.dll$(DLLEXT) \ olepro32.dll$(DLLEXT) \ - olesvr.dll$(DLLEXT) \ olesvr32.dll$(DLLEXT) \ psapi.dll$(DLLEXT) \ qcap.dll$(DLLEXT) \ quartz.dll$(DLLEXT) \ - rasapi16.dll$(DLLEXT) \ rasapi32.dll$(DLLEXT) \ riched32.dll$(DLLEXT) \ rpcrt4.dll$(DLLEXT) \ serialui.dll$(DLLEXT) \ setupapi.dll$(DLLEXT) \ - setupx.dll$(DLLEXT) \ shdocvw.dll$(DLLEXT) \ - shell.dll$(DLLEXT) \ shell32.dll$(DLLEXT) \ shfolder.dll$(DLLEXT) \ shlwapi.dll$(DLLEXT) \ snmpapi.dll$(DLLEXT) \ - sound.dll$(DLLEXT) \ sti.dll$(DLLEXT) \ - storage.dll$(DLLEXT) \ - stress.dll$(DLLEXT) \ - system.dll$(DLLEXT) \ tapi32.dll$(DLLEXT) \ - toolhelp.dll$(DLLEXT) \ ttydrv.dll$(DLLEXT) \ twain_32.dll$(DLLEXT) \ - typelib.dll$(DLLEXT) \ url.dll$(DLLEXT) \ urlmon.dll$(DLLEXT) \ - user.exe$(DLLEXT) \ user32.dll$(DLLEXT) \ - ver.dll$(DLLEXT) \ version.dll$(DLLEXT) \ w32skrnl.dll$(DLLEXT) \ - w32sys.dll$(DLLEXT) \ - win32s16.dll$(DLLEXT) \ - win87em.dll$(DLLEXT) \ - winaspi.dll$(DLLEXT) \ - windebug.dll$(DLLEXT) \ winealsa.drv$(DLLEXT) \ winearts.drv$(DLLEXT) \ wineaudioio.drv$(DLLEXT) \ @@ -247,18 +255,13 @@ all: \ winenas.drv$(DLLEXT) \ wineoss.drv$(DLLEXT) \ wineps.dll$(DLLEXT) \ - wineps16.dll$(DLLEXT) \ - wing.dll$(DLLEXT) \ wininet.dll$(DLLEXT) \ winmm.dll$(DLLEXT) \ - winnls.dll$(DLLEXT) \ winnls32.dll$(DLLEXT) \ - winsock.dll$(DLLEXT) \ winspool.drv$(DLLEXT) \ wintrust.dll$(DLLEXT) \ wnaspi32.dll$(DLLEXT) \ wow32.dll$(DLLEXT) \ - wprocs.dll$(DLLEXT) \ ws2_32.dll$(DLLEXT) \ wsock32.dll$(DLLEXT) diff --git a/dlls/Maketest.rules.in b/dlls/Maketest.rules.in index 98ed3265079..8495c7a3421 100644 --- a/dlls/Maketest.rules.in +++ b/dlls/Maketest.rules.in @@ -20,13 +20,12 @@ TESTPROGRAM = $(MODULE)$(DLLEXT) RUNTESTFLAGS = -q -P wine -M $(TESTDLL) -T $(TOPOBJDIR) -p $(TESTPROGRAM) C_SRCS = $(CTESTS) -GEN_C_SRCS = $(TESTLIST) -EXTRA_OBJS = $(TESTMAIN) +EXTRA_OBJS = $(TESTMAIN) $(TESTLIST:.c=.o) ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBS) CROSSTEST = $(TESTDLL:%.dll=%)_crosstest.exe CROSSTESTMAIN= $(TOPOBJDIR)/programs/winetest/wtmain.cross.o -CROSSOBJS = $(C_SRCS:.c=.cross.o) $(GEN_C_SRCS:.c=.cross.o) $(CROSSTESTMAIN) +CROSSOBJS = $(C_SRCS:.c=.cross.o) $(TESTLIST:.c=.cross.o) $(CROSSTESTMAIN) @MAKE_RULES@ diff --git a/dlls/gdi/Makefile.in b/dlls/gdi/Makefile.in index ad57a85a62d..b1282259b24 100644 --- a/dlls/gdi/Makefile.in +++ b/dlls/gdi/Makefile.in @@ -36,7 +36,6 @@ C_SRCS = \ $(TOPOBJDIR)/objects/pen.c \ $(TOPOBJDIR)/objects/region.c \ $(TOPOBJDIR)/objects/text.c \ - bidi16.c \ driver.c \ enhmfdrv/bitblt.c \ enhmfdrv/dc.c \ @@ -63,6 +62,9 @@ C_SRCS = \ win16drv/text.c \ wing.c +C_SRCS16 = \ + bidi16.c + RC_SRCS = version.rc RC_SRCS16 = version16.rc diff --git a/dlls/kernel/Makefile.in b/dlls/kernel/Makefile.in index 2144866b7f1..18f42a56ece 100644 --- a/dlls/kernel/Makefile.in +++ b/dlls/kernel/Makefile.in @@ -16,7 +16,6 @@ C_SRCS = \ format_msg.c \ kernel_main.c \ locale.c \ - registry16.c \ stress.c \ string.c \ sync.c \ @@ -28,6 +27,9 @@ C_SRCS = \ windebug.c \ wowthunk.c +C_SRCS16 = \ + registry16.c + RC_SRCS = kernel.rc RC_SRCS16 = \ diff --git a/dlls/lzexpand/Makefile.in b/dlls/lzexpand/Makefile.in index f8dd7d0967c..8ab38925d74 100644 --- a/dlls/lzexpand/Makefile.in +++ b/dlls/lzexpand/Makefile.in @@ -10,9 +10,8 @@ EXTRALIBS = $(LIBUNICODE) LDDLLFLAGS = @LDDLLFLAGS@ SYMBOLFILE = $(MODULE).tmp.o -C_SRCS = \ - lzexpand16.c \ - lzexpand_main.c +C_SRCS = lzexpand_main.c +C_SRCS16 = lzexpand16.c @MAKE_DLL_RULES@ diff --git a/dlls/make_dlls b/dlls/make_dlls index 515bdc39679..2d46231a2a9 100755 --- a/dlls/make_dlls +++ b/dlls/make_dlls @@ -145,6 +145,7 @@ EOF # output the all: target my %targets = (); # use a hash to get rid of duplicate target names +my %targets16 = (); foreach my $mod (sort keys %directories) { next if defined($special_dlls{$directories{$mod}}); # skip special dlls @@ -152,7 +153,7 @@ foreach my $mod (sort keys %directories) next unless defined $altnames{$mod}; foreach my $i (sort @{$altnames{$mod}}) { - $targets{sprintf("%s\$(DLLEXT)",$i)} = 1; + $targets16{sprintf("%s\$(DLLEXT)",$i)} = 1; } } print NEWMAKE <