X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a0499e2f21fe63792f0e3ae785a029edc6671a29..4c49b5d83e41323f939d2a559f7c8642692221ce:/src/makewat.env diff --git a/src/makewat.env b/src/makewat.env index 9ff838e3c2..2c60ca773f 100644 --- a/src/makewat.env +++ b/src/makewat.env @@ -19,13 +19,33 @@ wxUSE_GUI=1 !endif # set FINAL=1 to disable debug and enable optimizations +!ifndef FINAL FINAL=0 +!endif # set WATCOM_SUFFIX to nothing if you use only Watcom compiler, set it to # something Watcom-specific if you want to build wxWindows with more than one # compiler WATCOM_SUFFIX=_w +# change/remove this if you want to create programs for older Windows versions, +# increase the version to be able to use more Win2K+-only features +WINVERFLAGS = /dWINVER=0x400 /d_WIN32_IE=0x0300 + +# optimize for space/time: /os or /ot +# +# NB: at least with OpenWatcom 1.0 using /ox leads to buggy code, don't use it +!ifeq FINAL 1 +OPTFLAGS=/oails /5r +!else +OPTFLAGS=/od +!endif + + +############################################################################### +# You shouldn't have to modify anything after this point +############################################################################### + .EXTENSIONS: .EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def @@ -67,19 +87,25 @@ DEBUGSUFFIX = !ifeq wxUSE_GUI 0 TOOLKIT = base BASEDIRPREFIX = Base -LINKOPTION = nt +LINKSYSTEM = nt !else TOOLKIT = msw -LINKOPTION = nt_win +LINKSYSTEM = nt_win BASEDIRPREFIX = !endif ARCHINCDIR=$(WXDIR)\lib\$(TOOLKIT)$(DEBUGSUFFIX) +# set the things which depend on debug/release +# +# note that the values for LIBPAGESIZE are minimal possible, the library +# doesn't link (Error! Library too large) with values smaller than given !ifeq FINAL 1 CONFIGURATION=Release +LIBPAGESIZE=/p=1024 !else CONFIGURATION=Debug +LIBPAGESIZE=/p=2048 !endif # set OUTPUTDIR to the directory to be used for the .obj files created during @@ -95,15 +121,12 @@ PRECOMP = /fh=$(OUTPUTDIR)watcom.pch # the basename of the library LIBNAME=wx$(TOOLKIT)$(DEBUGSUFFIX)$(WATCOM_SUFFIX) -# You shouldn't have to modify anything after this point -######################################################## - # only LEVEL=386 is currently supported, 16 bit compilation is probably broken LEVEL = 386 CXX = wpp$(LEVEL) CC = wcc$(LEVEL) +LIB = wlib /q RC = wrc -WINVERFLAGS = /dWINVER=0x400 BINDCOMMAND = wrc WATLIBDIR = $(WATCOMDIR)\lib386\nt STACK = option stack=64k @@ -128,23 +151,6 @@ IFLAGS = -i=$(ARCHINCDIR);$(WXDIR)\include & -i=$(WXDIR)\include\wx\msw\gnuwin32 RESFLAGS = -q -r -bt=nt /i$(WXDIR)\include /i$(WXDIR)\contrib\include $(WINVERFLAGS) -# Here are some possible optimization flags: -# /5r Pentium timings -# /fp5 /fpi87 Inline 80x87 instructions optimized for Pentium: coprocessor must be present -# /ox Standard optimizations -# /or Reordering for Pentium timings (included in /ox) -# The Watcom-recommended flags for optimum Pentium speed are: -# /oneatx /zp4 /5 /fpi87 /fp5 -# for PPro: -# OPTFLAGS=/oneatx /oh /oi+ /ei /zp8 /6 /fp6 -# -# optimize for space/time: /os or /ot -!ifeq FINAL 1 -OPTFLAGS=/oails /5r -!else -OPTFLAGS=/od -!endif - # NB: /bm switch is needed for thread-safe runtime, if you don't use # wxThread you may remove it CPPFLAGS = /dWIN32 /bm /fo=$(OUTPUTDIR) /fr /zq $(IFLAGS) $(OPTFLAGS) $(WINVERFLAGS) $(EXTRACPPFLAGS) @@ -152,8 +158,11 @@ CPPFLAGS = /dWIN32 /bm /fo=$(OUTPUTDIR) /fr /zq $(IFLAGS) $(OPTFLAGS) $(WINVERFL CPPFLAGS += /dwxUSE_GUI=0 !endif -CFLAGS = $(CPPFLAGS) $(DEBUGCFLAGS) $(EXTRACFLAGS) -CXXFLAGS = $(CPPFLAGS) $(DEBUGCXXFLAGS) $(PRECOMP) /w=8 $(EXTRACXXFLAGS) +# zm and zv as well as the liker options below are used to make the resulting +# .exe smaller +CFLAGS = $(CPPFLAGS) $(DEBUGCFLAGS) $(EXTRACFLAGS) /zm +CXXFLAGS = $(CPPFLAGS) $(DEBUGCXXFLAGS) $(PRECOMP) /zm /zv /w=8 $(EXTRACXXFLAGS) +LDFLAGS = option eliminate, vfremoval .cpp.obj: # $< # .AUTODEPEND *$(CXX) $(CXXFLAGS) $<