From 25a73439590e04730168bee6b691bd6233880ad4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 1 Aug 2003 18:59:37 +0000 Subject: [PATCH] regenerated after adding DEBUG_ options git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/Makefile.in | 2 +- samples/access/Makefile.in | 53 ++++++----- samples/access/makefile.bcc | 55 ++++++++--- samples/access/makefile.gcc | 64 +++++++++++-- samples/access/makefile.vc | 158 ++++++++++++++++++++++++------- samples/access/makefile.wat | 84 ++++++++++++++--- samples/artprov/Makefile.in | 54 ++++++----- samples/artprov/makefile.bcc | 56 ++++++++--- samples/artprov/makefile.gcc | 65 +++++++++++-- samples/artprov/makefile.vc | 159 ++++++++++++++++++++++++------- samples/artprov/makefile.wat | 85 ++++++++++++++--- samples/calendar/Makefile.in | 53 ++++++----- samples/calendar/makefile.bcc | 55 ++++++++--- samples/calendar/makefile.gcc | 64 +++++++++++-- samples/calendar/makefile.vc | 158 ++++++++++++++++++++++++------- samples/calendar/makefile.wat | 84 ++++++++++++++--- samples/caret/Makefile.in | 53 ++++++----- samples/caret/makefile.bcc | 55 ++++++++--- samples/caret/makefile.gcc | 64 +++++++++++-- samples/caret/makefile.vc | 158 ++++++++++++++++++++++++------- samples/caret/makefile.wat | 84 ++++++++++++++--- samples/checklst/Makefile.in | 53 ++++++----- samples/checklst/makefile.bcc | 55 ++++++++--- samples/checklst/makefile.gcc | 64 +++++++++++-- samples/checklst/makefile.vc | 158 ++++++++++++++++++++++++------- samples/checklst/makefile.wat | 84 ++++++++++++++--- samples/config/Makefile.in | 53 ++++++----- samples/config/makefile.bcc | 55 ++++++++--- samples/config/makefile.gcc | 64 +++++++++++-- samples/config/makefile.vc | 158 ++++++++++++++++++++++++------- samples/config/makefile.wat | 84 ++++++++++++++--- samples/console/Makefile.in | 32 ++++--- samples/console/makefile.bcc | 48 +++++++--- samples/console/makefile.gcc | 53 +++++++++-- samples/console/makefile.vc | 117 ++++++++++++++++++----- samples/console/makefile.wat | 79 +++++++++++++--- samples/controls/Makefile.in | 53 ++++++----- samples/controls/makefile.bcc | 55 ++++++++--- samples/controls/makefile.gcc | 64 +++++++++++-- samples/controls/makefile.vc | 158 ++++++++++++++++++++++++------- samples/controls/makefile.wat | 84 ++++++++++++++--- samples/dialogs/Makefile.in | 53 ++++++----- samples/dialogs/makefile.bcc | 55 ++++++++--- samples/dialogs/makefile.gcc | 64 +++++++++++-- samples/dialogs/makefile.vc | 158 ++++++++++++++++++++++++------- samples/dialogs/makefile.wat | 84 ++++++++++++++--- samples/dialup/Makefile.in | 53 ++++++----- samples/dialup/makefile.bcc | 55 ++++++++--- samples/dialup/makefile.gcc | 64 +++++++++++-- samples/dialup/makefile.vc | 158 ++++++++++++++++++++++++------- samples/dialup/makefile.wat | 84 ++++++++++++++--- samples/display/Makefile.in | 52 +++++----- samples/display/makefile.bcc | 48 +++++++--- samples/display/makefile.gcc | 56 +++++++++-- samples/display/makefile.vc | 119 ++++++++++++++++++----- samples/display/makefile.wat | 82 +++++++++++++--- samples/docview/Makefile.in | 57 ++++++----- samples/docview/makefile.bcc | 57 ++++++++--- samples/docview/makefile.gcc | 66 +++++++++++-- samples/docview/makefile.vc | 160 ++++++++++++++++++++++++------- samples/docview/makefile.wat | 86 ++++++++++++++--- samples/docvwmdi/Makefile.in | 55 ++++++----- samples/docvwmdi/makefile.bcc | 57 ++++++++--- samples/docvwmdi/makefile.gcc | 66 +++++++++++-- samples/docvwmdi/makefile.vc | 160 ++++++++++++++++++++++++------- samples/docvwmdi/makefile.wat | 86 ++++++++++++++--- samples/dragimag/Makefile.in | 53 ++++++----- samples/dragimag/makefile.bcc | 55 ++++++++--- samples/dragimag/makefile.gcc | 64 +++++++++++-- samples/dragimag/makefile.vc | 158 ++++++++++++++++++++++++------- samples/dragimag/makefile.wat | 84 ++++++++++++++--- samples/drawing/Makefile.in | 53 ++++++----- samples/drawing/makefile.bcc | 55 ++++++++--- samples/drawing/makefile.gcc | 64 +++++++++++-- samples/drawing/makefile.vc | 158 ++++++++++++++++++++++++------- samples/drawing/makefile.wat | 84 ++++++++++++++--- samples/dynamic/Makefile.in | 53 ++++++----- samples/dynamic/makefile.bcc | 55 ++++++++--- samples/dynamic/makefile.gcc | 64 +++++++++++-- samples/dynamic/makefile.vc | 158 ++++++++++++++++++++++++------- samples/dynamic/makefile.wat | 84 ++++++++++++++--- samples/erase/Makefile.in | 53 ++++++----- samples/erase/makefile.bcc | 55 ++++++++--- samples/erase/makefile.gcc | 64 +++++++++++-- samples/erase/makefile.vc | 158 ++++++++++++++++++++++++------- samples/erase/makefile.wat | 84 ++++++++++++++--- samples/event/Makefile.in | 53 ++++++----- samples/event/makefile.bcc | 55 ++++++++--- samples/event/makefile.gcc | 64 +++++++++++-- samples/event/makefile.vc | 158 ++++++++++++++++++++++++------- samples/event/makefile.wat | 84 ++++++++++++++--- samples/htlbox/Makefile.in | 58 +++++++----- samples/htlbox/makefile.bcc | 55 ++++++++--- samples/htlbox/makefile.gcc | 67 +++++++++++-- samples/htlbox/makefile.vc | 161 ++++++++++++++++++++++++------- samples/htlbox/makefile.wat | 87 +++++++++++++---- samples/image/Makefile.in | 53 ++++++----- samples/image/makefile.bcc | 55 ++++++++--- samples/image/makefile.gcc | 64 +++++++++++-- samples/image/makefile.vc | 158 ++++++++++++++++++++++++------- samples/image/makefile.wat | 84 ++++++++++++++--- samples/internat/Makefile.in | 53 ++++++----- samples/internat/makefile.bcc | 55 ++++++++--- samples/internat/makefile.gcc | 64 +++++++++++-- samples/internat/makefile.vc | 158 ++++++++++++++++++++++++------- samples/internat/makefile.wat | 84 ++++++++++++++--- samples/joytest/Makefile.in | 53 ++++++----- samples/joytest/makefile.bcc | 55 ++++++++--- samples/joytest/makefile.gcc | 64 +++++++++++-- samples/joytest/makefile.vc | 158 ++++++++++++++++++++++++------- samples/joytest/makefile.wat | 84 ++++++++++++++--- samples/keyboard/Makefile.in | 53 ++++++----- samples/keyboard/makefile.bcc | 55 ++++++++--- samples/keyboard/makefile.gcc | 64 +++++++++++-- samples/keyboard/makefile.vc | 158 ++++++++++++++++++++++++------- samples/keyboard/makefile.wat | 84 ++++++++++++++--- samples/layout/Makefile.in | 53 ++++++----- samples/layout/makefile.bcc | 55 ++++++++--- samples/layout/makefile.gcc | 64 +++++++++++-- samples/layout/makefile.vc | 158 ++++++++++++++++++++++++------- samples/layout/makefile.wat | 84 ++++++++++++++--- samples/listbox/Makefile.in | 53 ++++++----- samples/listbox/makefile.bcc | 55 ++++++++--- samples/listbox/makefile.gcc | 64 +++++++++++-- samples/listbox/makefile.vc | 158 ++++++++++++++++++++++++------- samples/listbox/makefile.wat | 84 ++++++++++++++--- samples/listctrl/Makefile.in | 53 ++++++----- samples/listctrl/makefile.bcc | 55 ++++++++--- samples/listctrl/makefile.gcc | 64 +++++++++++-- samples/listctrl/makefile.vc | 158 ++++++++++++++++++++++++------- samples/listctrl/makefile.wat | 84 ++++++++++++++--- samples/memcheck/Makefile.in | 53 ++++++----- samples/memcheck/makefile.bcc | 55 ++++++++--- samples/memcheck/makefile.gcc | 64 +++++++++++-- samples/memcheck/makefile.vc | 158 ++++++++++++++++++++++++------- samples/memcheck/makefile.wat | 84 ++++++++++++++--- samples/menu/Makefile.in | 53 ++++++----- samples/menu/makefile.bcc | 55 ++++++++--- samples/menu/makefile.gcc | 64 +++++++++++-- samples/menu/makefile.vc | 158 ++++++++++++++++++++++++------- samples/menu/makefile.wat | 84 ++++++++++++++--- samples/minifram/Makefile.in | 53 ++++++----- samples/minifram/makefile.bcc | 55 ++++++++--- samples/minifram/makefile.gcc | 64 +++++++++++-- samples/minifram/makefile.vc | 158 ++++++++++++++++++++++++------- samples/minifram/makefile.wat | 84 ++++++++++++++--- samples/minimal/Makefile.in | 54 ++++++----- samples/minimal/makefile.bcc | 55 ++++++++--- samples/minimal/makefile.gcc | 64 +++++++++++-- samples/minimal/makefile.vc | 158 ++++++++++++++++++++++++------- samples/minimal/makefile.wat | 84 ++++++++++++++--- samples/mobile/Makefile.in | 53 ++++++----- samples/mobile/makefile.bcc | 55 ++++++++--- samples/mobile/makefile.gcc | 64 +++++++++++-- samples/mobile/makefile.vc | 158 ++++++++++++++++++++++++------- samples/mobile/makefile.wat | 84 ++++++++++++++--- samples/multimon/Makefile.in | 53 ++++++----- samples/multimon/makefile.bcc | 55 ++++++++--- samples/multimon/makefile.gcc | 64 +++++++++++-- samples/multimon/makefile.vc | 158 ++++++++++++++++++++++++------- samples/multimon/makefile.wat | 84 ++++++++++++++--- samples/nativdlg/Makefile.in | 53 ++++++----- samples/nativdlg/makefile.bcc | 55 ++++++++--- samples/nativdlg/makefile.gcc | 64 +++++++++++-- samples/nativdlg/makefile.vc | 158 ++++++++++++++++++++++++------- samples/nativdlg/makefile.wat | 84 ++++++++++++++--- samples/newgrid/Makefile.in | 53 ++++++----- samples/newgrid/makefile.bcc | 55 ++++++++--- samples/newgrid/makefile.gcc | 64 +++++++++++-- samples/newgrid/makefile.vc | 158 ++++++++++++++++++++++++------- samples/newgrid/makefile.wat | 84 ++++++++++++++--- samples/notebook/Makefile.in | 53 ++++++----- samples/notebook/makefile.bcc | 55 ++++++++--- samples/notebook/makefile.gcc | 64 +++++++++++-- samples/notebook/makefile.vc | 158 ++++++++++++++++++++++++------- samples/notebook/makefile.wat | 84 ++++++++++++++--- samples/oleauto/Makefile.in | 53 ++++++----- samples/oleauto/makefile.bcc | 55 ++++++++--- samples/oleauto/makefile.gcc | 64 +++++++++++-- samples/oleauto/makefile.vc | 158 ++++++++++++++++++++++++------- samples/oleauto/makefile.wat | 84 ++++++++++++++--- samples/opengl/Makefile.in | 2 +- samples/ownerdrw/Makefile.in | 53 ++++++----- samples/ownerdrw/makefile.bcc | 55 ++++++++--- samples/ownerdrw/makefile.gcc | 64 +++++++++++-- samples/ownerdrw/makefile.vc | 158 ++++++++++++++++++++++++------- samples/ownerdrw/makefile.wat | 84 ++++++++++++++--- samples/printing/Makefile.in | 53 ++++++----- samples/printing/makefile.bcc | 55 ++++++++--- samples/printing/makefile.gcc | 64 +++++++++++-- samples/printing/makefile.vc | 158 ++++++++++++++++++++++++------- samples/printing/makefile.wat | 84 ++++++++++++++--- samples/propsize/Makefile.in | 53 ++++++----- samples/propsize/makefile.bcc | 55 ++++++++--- samples/propsize/makefile.gcc | 64 +++++++++++-- samples/propsize/makefile.vc | 158 ++++++++++++++++++++++++------- samples/propsize/makefile.wat | 84 ++++++++++++++--- samples/regtest/Makefile.in | 53 ++++++----- samples/regtest/makefile.bcc | 55 ++++++++--- samples/regtest/makefile.gcc | 64 +++++++++++-- samples/regtest/makefile.vc | 158 ++++++++++++++++++++++++------- samples/regtest/makefile.wat | 84 ++++++++++++++--- samples/richedit/Makefile.in | 53 ++++++----- samples/richedit/makefile.bcc | 55 ++++++++--- samples/richedit/makefile.gcc | 64 +++++++++++-- samples/richedit/makefile.vc | 158 ++++++++++++++++++++++++------- samples/richedit/makefile.wat | 84 ++++++++++++++--- samples/rotate/Makefile.in | 53 ++++++----- samples/rotate/makefile.bcc | 55 ++++++++--- samples/rotate/makefile.gcc | 64 +++++++++++-- samples/rotate/makefile.vc | 158 ++++++++++++++++++++++++------- samples/rotate/makefile.wat | 84 ++++++++++++++--- samples/sashtest/Makefile.in | 53 ++++++----- samples/sashtest/makefile.bcc | 55 ++++++++--- samples/sashtest/makefile.gcc | 64 +++++++++++-- samples/sashtest/makefile.vc | 158 ++++++++++++++++++++++++------- samples/sashtest/makefile.wat | 84 ++++++++++++++--- samples/scroll/Makefile.in | 53 ++++++----- samples/scroll/makefile.bcc | 55 ++++++++--- samples/scroll/makefile.gcc | 64 +++++++++++-- samples/scroll/makefile.vc | 158 ++++++++++++++++++++++++------- samples/scroll/makefile.wat | 84 ++++++++++++++--- samples/scrollsub/Makefile.in | 53 ++++++----- samples/scrollsub/makefile.bcc | 55 ++++++++--- samples/scrollsub/makefile.gcc | 64 +++++++++++-- samples/scrollsub/makefile.vc | 158 ++++++++++++++++++++++++------- samples/scrollsub/makefile.wat | 84 ++++++++++++++--- samples/shaped/Makefile.in | 53 ++++++----- samples/shaped/makefile.bcc | 55 ++++++++--- samples/shaped/makefile.gcc | 64 +++++++++++-- samples/shaped/makefile.vc | 158 ++++++++++++++++++++++++------- samples/shaped/makefile.wat | 84 ++++++++++++++--- samples/sockets/Makefile.in | 3 +- samples/sockets/makefile.bcc | 37 +++++--- samples/sockets/makefile.gcc | 43 ++++++--- samples/sockets/makefile.vc | 167 ++++++++++++++++++++++++-------- samples/sockets/makefile.wat | 50 ++++++++-- samples/splitter/Makefile.in | 53 ++++++----- samples/splitter/makefile.bcc | 55 ++++++++--- samples/splitter/makefile.gcc | 64 +++++++++++-- samples/splitter/makefile.vc | 158 ++++++++++++++++++++++++------- samples/splitter/makefile.wat | 84 ++++++++++++++--- samples/statbar/Makefile.in | 53 ++++++----- samples/statbar/makefile.bcc | 55 ++++++++--- samples/statbar/makefile.gcc | 64 +++++++++++-- samples/statbar/makefile.vc | 158 ++++++++++++++++++++++++------- samples/statbar/makefile.wat | 84 ++++++++++++++--- samples/taskbar/Makefile.in | 53 ++++++----- samples/taskbar/makefile.bcc | 55 ++++++++--- samples/taskbar/makefile.gcc | 64 +++++++++++-- samples/taskbar/makefile.vc | 158 ++++++++++++++++++++++++------- samples/taskbar/makefile.wat | 84 ++++++++++++++--- samples/text/Makefile.in | 53 ++++++----- samples/text/makefile.bcc | 55 ++++++++--- samples/text/makefile.gcc | 64 +++++++++++-- samples/text/makefile.vc | 158 ++++++++++++++++++++++++------- samples/text/makefile.wat | 84 ++++++++++++++--- samples/thread/Makefile.in | 53 ++++++----- samples/thread/makefile.bcc | 55 ++++++++--- samples/thread/makefile.gcc | 64 +++++++++++-- samples/thread/makefile.vc | 158 ++++++++++++++++++++++++------- samples/thread/makefile.wat | 84 ++++++++++++++--- samples/toolbar/Makefile.in | 53 ++++++----- samples/toolbar/makefile.bcc | 55 ++++++++--- samples/toolbar/makefile.gcc | 64 +++++++++++-- samples/toolbar/makefile.vc | 158 ++++++++++++++++++++++++------- samples/toolbar/makefile.wat | 84 ++++++++++++++--- samples/treectrl/Makefile.in | 53 ++++++----- samples/treectrl/makefile.bcc | 55 ++++++++--- samples/treectrl/makefile.gcc | 64 +++++++++++-- samples/treectrl/makefile.vc | 158 ++++++++++++++++++++++++------- samples/treectrl/makefile.wat | 84 ++++++++++++++--- samples/typetest/Makefile.in | 53 ++++++----- samples/typetest/makefile.bcc | 55 ++++++++--- samples/typetest/makefile.gcc | 64 +++++++++++-- samples/typetest/makefile.vc | 158 ++++++++++++++++++++++++------- samples/typetest/makefile.wat | 84 ++++++++++++++--- samples/validate/Makefile.in | 53 ++++++----- samples/validate/makefile.bcc | 55 ++++++++--- samples/validate/makefile.gcc | 64 +++++++++++-- samples/validate/makefile.vc | 158 ++++++++++++++++++++++++------- samples/validate/makefile.wat | 84 ++++++++++++++--- samples/vscroll/Makefile.in | 53 ++++++----- samples/vscroll/makefile.bcc | 55 ++++++++--- samples/vscroll/makefile.gcc | 64 +++++++++++-- samples/vscroll/makefile.vc | 158 ++++++++++++++++++++++++------- samples/vscroll/makefile.wat | 84 ++++++++++++++--- samples/widgets/Makefile.in | 63 ++++++++----- samples/widgets/makefile.bcc | 65 ++++++++++--- samples/widgets/makefile.gcc | 74 +++++++++++++-- samples/widgets/makefile.vc | 168 ++++++++++++++++++++++++++------- samples/widgets/makefile.wat | 94 +++++++++++++++--- samples/wizard/Makefile.in | 53 ++++++----- samples/wizard/makefile.bcc | 55 ++++++++--- samples/wizard/makefile.gcc | 64 +++++++++++-- samples/wizard/makefile.vc | 158 ++++++++++++++++++++++++------- samples/wizard/makefile.wat | 84 ++++++++++++++--- samples/wxtest/Makefile.in | 53 ++++++----- samples/wxtest/makefile.bcc | 55 ++++++++--- samples/wxtest/makefile.gcc | 64 +++++++++++-- samples/wxtest/makefile.vc | 158 ++++++++++++++++++++++++------- samples/wxtest/makefile.wat | 84 ++++++++++++++--- 302 files changed, 19036 insertions(+), 5644 deletions(-) diff --git a/samples/Makefile.in b/samples/Makefile.in index 841f526548..84457555e4 100644 --- a/samples/Makefile.in +++ b/samples/Makefile.in @@ -27,7 +27,7 @@ artprov: clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o (cd artprov && $(MAKE) clean) (cd console && $(MAKE) clean) (cd dialogs && $(MAKE) clean) diff --git a/samples/access/Makefile.in b/samples/access/Makefile.in index e4dd4db47b..77ae2bc7e5 100644 --- a/samples/access/Makefile.in +++ b/samples/access/Makefile.in @@ -36,6 +36,10 @@ ACCESSTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +ACCESSTEST_OBJECTS = \ + accesstest_accesstest.o \ + $(__accesstest___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ ACCESSTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ ACCESSTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ accesstest$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o accesstest$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -118,8 +127,8 @@ ACCESSTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ all: accesstest$(EXEEXT) -accesstest$(EXEEXT): accesstest_accesstest.o $(__accesstest___win32rc) - $(CXX) -o $@ accesstest_accesstest.o $(__accesstest___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +accesstest$(EXEEXT): $(ACCESSTEST_OBJECTS) $(__accesstest___win32rc) + $(CXX) -o $@ $(ACCESSTEST_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__accesstest___mac_rezcmd) $(__accesstest___mac_setfilecmd) @@ -131,7 +140,7 @@ accesstest_accesstest_rc.o: $(srcdir)/accesstest.rc clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f accesstest$(EXEEXT) distclean: clean diff --git a/samples/access/makefile.bcc b/samples/access/makefile.bcc index 1a0b73e2f0..193ba60916 100644 --- a/samples/access/makefile.bcc +++ b/samples/access/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -ACCESSTEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +ACCESSTEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +ACCESSTEST_OBJECTS = \ + $(OBJS)\accesstest_accesstest.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,11 +149,11 @@ $(OBJS)\accesstest_accesstest.obj: .\accesstest.cpp $(CXX) -q -c -P -o$@ $(ACCESSTEST_CXXFLAGS) $** $(OBJS)\accesstest_accesstest.res: .\accesstest.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** -$(OBJS)\accesstest.exe: $(OBJS)\accesstest_accesstest.obj $(OBJS)\accesstest_accesstest.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\accesstest_accesstest.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\accesstest_accesstest.res +$(OBJS)\accesstest.exe: $(ACCESSTEST_OBJECTS) $(OBJS)\accesstest_accesstest.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(ACCESSTEST_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\accesstest_accesstest.res | clean: diff --git a/samples/access/makefile.gcc b/samples/access/makefile.gcc index c506bbfb49..12d912d70a 100644 --- a/samples/access/makefile.gcc +++ b/samples/access/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -ACCESSTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +ACCESSTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ + -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ + -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +ACCESSTEST_OBJECTS = \ + $(OBJS)\accesstest_accesstest.o \ + $(OBJS)\accesstest_accesstest_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,10 +143,10 @@ $(OBJS)\accesstest_accesstest.o: .\accesstest.cpp $(CXX) -c -o $@ $(ACCESSTEST_CXXFLAGS) $< $(OBJS)\accesstest_accesstest_rc.o: .\accesstest.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) -$(OBJS)\accesstest.exe: $(OBJS)\accesstest_accesstest.o $(OBJS)\accesstest_accesstest_rc.o - $(CXX) -o $@ $(OBJS)\accesstest_accesstest.o $(OBJS)\accesstest_accesstest_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\accesstest.exe: $(ACCESSTEST_OBJECTS) $(OBJS)\accesstest_accesstest_rc.o + $(CXX) -o $@ $(ACCESSTEST_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o diff --git a/samples/access/makefile.vc b/samples/access/makefile.vc index 46098a6e1f..8836dfc7c5 100644 --- a/samples/access/makefile.vc +++ b/samples/access/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -ACCESSTEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\accesstest.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +ACCESSTEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\accesstest.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +ACCESSTEST_OBJECTS = \ + $(OBJS)\accesstest_accesstest.obj \ + $(OBJS)\accesstest_accesstest.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,11 +212,11 @@ $(OBJS)\accesstest_accesstest.obj: .\accesstest.cpp $(CXX) /c /nologo /TP /Fo$@ $(ACCESSTEST_CXXFLAGS) $** $(OBJS)\accesstest_accesstest.res: .\accesstest.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** -$(OBJS)\accesstest.exe: $(OBJS)\accesstest_accesstest.obj $(OBJS)\accesstest_accesstest.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\accesstest_accesstest.obj $(OBJS)\accesstest_accesstest.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\accesstest.exe: $(ACCESSTEST_OBJECTS) $(OBJS)\accesstest_accesstest.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(ACCESSTEST_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << clean: diff --git a/samples/access/makefile.wat b/samples/access/makefile.wat index 1d87c264b7..bdf54dbd9c 100644 --- a/samples/access/makefile.wat +++ b/samples/access/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -ACCESSTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +ACCESSTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +ACCESSTEST_OBJECTS = & + $(OBJS)\accesstest_accesstest.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,16 +180,16 @@ $(OBJS)\accesstest_accesstest.obj : .AUTODEPEND .\accesstest.cpp $(CXX) -zq -fo=$^@ $(ACCESSTEST_CXXFLAGS) $< $(OBJS)\accesstest_accesstest.res : .AUTODEPEND .\accesstest.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< -$(OBJS)\accesstest.exe : $(OBJS)\accesstest_accesstest.obj $(OBJS)\accesstest_accesstest.res +$(OBJS)\accesstest.exe : $(ACCESSTEST_OBJECTS) $(OBJS)\accesstest_accesstest.res @%create $(OBJS)\accesstest.lbc @%append $(OBJS)\accesstest.lbc option quiet @%append $(OBJS)\accesstest.lbc name $^@ @%append $(OBJS)\accesstest.lbc option incremental - @%append $(OBJS)\accesstest.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\accesstest_accesstest.obj) do @%append $(OBJS)\accesstest.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\accesstest.lbc library %i + @%append $(OBJS)\accesstest.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(ACCESSTEST_OBJECTS)) do @%append $(OBJS)\accesstest.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\accesstest.lbc library %i @%append $(OBJS)\accesstest.lbc option resource=$(OBJS)\accesstest_accesstest.res wlink @$(OBJS)\accesstest.lbc diff --git a/samples/artprov/Makefile.in b/samples/artprov/Makefile.in index 050c742980..ed2f550897 100644 --- a/samples/artprov/Makefile.in +++ b/samples/artprov/Makefile.in @@ -36,6 +36,11 @@ ARTTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +ARTTEST_OBJECTS = \ + arttest_arttest.o \ + arttest_artbrows.o \ + $(__arttest___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +49,8 @@ ARTTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +86,36 @@ ARTTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ arttest$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o arttest$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -118,8 +128,8 @@ ARTTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ all: arttest$(EXEEXT) -arttest$(EXEEXT): arttest_arttest.o arttest_artbrows.o $(__arttest___win32rc) - $(CXX) -o $@ arttest_arttest.o arttest_artbrows.o $(__arttest___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +arttest$(EXEEXT): $(ARTTEST_OBJECTS) $(__arttest___win32rc) + $(CXX) -o $@ $(ARTTEST_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__arttest___mac_rezcmd) $(__arttest___mac_setfilecmd) @@ -134,7 +144,7 @@ arttest_arttest_rc.o: $(srcdir)/arttest.rc clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f arttest$(EXEEXT) distclean: clean diff --git a/samples/artprov/makefile.bcc b/samples/artprov/makefile.bcc index 9be2c36dfc..8ccca12814 100644 --- a/samples/artprov/makefile.bcc +++ b/samples/artprov/makefile.bcc @@ -20,12 +20,16 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -ARTTEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +ARTTEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +ARTTEST_OBJECTS = \ + $(OBJS)\arttest_arttest.obj \ + $(OBJS)\arttest_artbrows.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +41,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +56,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +86,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -125,11 +153,11 @@ $(OBJS)\arttest_arttest.obj: .\arttest.cpp $(CXX) -q -c -P -o$@ $(ARTTEST_CXXFLAGS) $** $(OBJS)\arttest_arttest.res: .\arttest.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** -$(OBJS)\arttest.exe: $(OBJS)\arttest_arttest.obj $(OBJS)\arttest_artbrows.obj $(OBJS)\arttest_arttest.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\arttest_arttest.obj $(OBJS)\arttest_artbrows.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\arttest_arttest.res +$(OBJS)\arttest.exe: $(ARTTEST_OBJECTS) $(OBJS)\arttest_arttest.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(ARTTEST_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\arttest_arttest.res | clean: diff --git a/samples/artprov/makefile.gcc b/samples/artprov/makefile.gcc index 1989b0742b..217011e324 100644 --- a/samples/artprov/makefile.gcc +++ b/samples/artprov/makefile.gcc @@ -12,8 +12,19 @@ include ../../build/config.gcc ### Variables: ### -ARTTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +ARTTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +ARTTEST_OBJECTS = \ + $(OBJS)\arttest_arttest.o \ + $(OBJS)\arttest_artbrows.o \ + $(OBJS)\arttest_arttest_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +38,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +55,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +92,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +117,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -100,10 +147,10 @@ $(OBJS)\arttest_arttest.o: .\arttest.cpp $(CXX) -c -o $@ $(ARTTEST_CXXFLAGS) $< $(OBJS)\arttest_arttest_rc.o: .\arttest.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) -$(OBJS)\arttest.exe: $(OBJS)\arttest_arttest.o $(OBJS)\arttest_artbrows.o $(OBJS)\arttest_arttest_rc.o - $(CXX) -o $@ $(OBJS)\arttest_arttest.o $(OBJS)\arttest_artbrows.o $(OBJS)\arttest_arttest_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\arttest.exe: $(ARTTEST_OBJECTS) $(OBJS)\arttest_arttest_rc.o + $(CXX) -o $@ $(ARTTEST_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o diff --git a/samples/artprov/makefile.vc b/samples/artprov/makefile.vc index 2e7d673645..fa5574194d 100644 --- a/samples/artprov/makefile.vc +++ b/samples/artprov/makefile.vc @@ -12,8 +12,20 @@ ### Variables: ### -ARTTEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\arttest.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +ARTTEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\arttest.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +ARTTEST_OBJECTS = \ + $(OBJS)\arttest_arttest.obj \ + $(OBJS)\arttest_artbrows.obj \ + $(OBJS)\arttest_arttest.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +35,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +50,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +138,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -127,11 +216,11 @@ $(OBJS)\arttest_arttest.obj: .\arttest.cpp $(CXX) /c /nologo /TP /Fo$@ $(ARTTEST_CXXFLAGS) $** $(OBJS)\arttest_arttest.res: .\arttest.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** -$(OBJS)\arttest.exe: $(OBJS)\arttest_arttest.obj $(OBJS)\arttest_artbrows.obj $(OBJS)\arttest_arttest.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\arttest_arttest.obj $(OBJS)\arttest_artbrows.obj $(OBJS)\arttest_arttest.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\arttest.exe: $(ARTTEST_OBJECTS) $(OBJS)\arttest_arttest.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(ARTTEST_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << clean: diff --git a/samples/artprov/makefile.wat b/samples/artprov/makefile.wat index 6825a8e2bf..8cf47e4454 100644 --- a/samples/artprov/makefile.wat +++ b/samples/artprov/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,19 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -ARTTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +ARTTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +ARTTEST_OBJECTS = & + $(OBJS)\arttest_arttest.obj & + $(OBJS)\arttest_artbrows.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -129,16 +184,16 @@ $(OBJS)\arttest_arttest.obj : .AUTODEPEND .\arttest.cpp $(CXX) -zq -fo=$^@ $(ARTTEST_CXXFLAGS) $< $(OBJS)\arttest_arttest.res : .AUTODEPEND .\arttest.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< -$(OBJS)\arttest.exe : $(OBJS)\arttest_arttest.obj $(OBJS)\arttest_artbrows.obj $(OBJS)\arttest_arttest.res +$(OBJS)\arttest.exe : $(ARTTEST_OBJECTS) $(OBJS)\arttest_arttest.res @%create $(OBJS)\arttest.lbc @%append $(OBJS)\arttest.lbc option quiet @%append $(OBJS)\arttest.lbc name $^@ @%append $(OBJS)\arttest.lbc option incremental - @%append $(OBJS)\arttest.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\arttest_arttest.obj $(OBJS)\arttest_artbrows.obj) do @%append $(OBJS)\arttest.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\arttest.lbc library %i + @%append $(OBJS)\arttest.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(ARTTEST_OBJECTS)) do @%append $(OBJS)\arttest.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\arttest.lbc library %i @%append $(OBJS)\arttest.lbc option resource=$(OBJS)\arttest_arttest.res wlink @$(OBJS)\arttest.lbc diff --git a/samples/calendar/Makefile.in b/samples/calendar/Makefile.in index 6e73aa3f70..023d57d45d 100644 --- a/samples/calendar/Makefile.in +++ b/samples/calendar/Makefile.in @@ -36,6 +36,10 @@ CALENDAR_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +CALENDAR_OBJECTS = \ + calendar_calendar.o \ + $(__calendar___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ CALENDAR_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ CALENDAR_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ calendar$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o calendar$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -118,8 +127,8 @@ CALENDAR_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ all: calendar$(EXEEXT) -calendar$(EXEEXT): calendar_calendar.o $(__calendar___win32rc) - $(CXX) -o $@ calendar_calendar.o $(__calendar___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +calendar$(EXEEXT): $(CALENDAR_OBJECTS) $(__calendar___win32rc) + $(CXX) -o $@ $(CALENDAR_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__calendar___mac_rezcmd) $(__calendar___mac_setfilecmd) @@ -131,7 +140,7 @@ calendar_calendar_rc.o: $(srcdir)/calendar.rc clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f calendar$(EXEEXT) distclean: clean diff --git a/samples/calendar/makefile.bcc b/samples/calendar/makefile.bcc index 49d93303fd..e3d1b51b42 100644 --- a/samples/calendar/makefile.bcc +++ b/samples/calendar/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -CALENDAR_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +CALENDAR_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +CALENDAR_OBJECTS = \ + $(OBJS)\calendar_calendar.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,11 +149,11 @@ $(OBJS)\calendar_calendar.obj: .\calendar.cpp $(CXX) -q -c -P -o$@ $(CALENDAR_CXXFLAGS) $** $(OBJS)\calendar_calendar.res: .\calendar.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** -$(OBJS)\calendar.exe: $(OBJS)\calendar_calendar.obj $(OBJS)\calendar_calendar.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\calendar_calendar.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\calendar_calendar.res +$(OBJS)\calendar.exe: $(CALENDAR_OBJECTS) $(OBJS)\calendar_calendar.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(CALENDAR_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\calendar_calendar.res | clean: diff --git a/samples/calendar/makefile.gcc b/samples/calendar/makefile.gcc index 09d7b754d7..6ab3c09f15 100644 --- a/samples/calendar/makefile.gcc +++ b/samples/calendar/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -CALENDAR_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CALENDAR_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +CALENDAR_OBJECTS = \ + $(OBJS)\calendar_calendar.o \ + $(OBJS)\calendar_calendar_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,10 +143,10 @@ $(OBJS)\calendar_calendar.o: .\calendar.cpp $(CXX) -c -o $@ $(CALENDAR_CXXFLAGS) $< $(OBJS)\calendar_calendar_rc.o: .\calendar.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) -$(OBJS)\calendar.exe: $(OBJS)\calendar_calendar.o $(OBJS)\calendar_calendar_rc.o - $(CXX) -o $@ $(OBJS)\calendar_calendar.o $(OBJS)\calendar_calendar_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\calendar.exe: $(CALENDAR_OBJECTS) $(OBJS)\calendar_calendar_rc.o + $(CXX) -o $@ $(CALENDAR_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o diff --git a/samples/calendar/makefile.vc b/samples/calendar/makefile.vc index b10717dce9..fda2ba3e07 100644 --- a/samples/calendar/makefile.vc +++ b/samples/calendar/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -CALENDAR_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\calendar.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CALENDAR_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\calendar.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +CALENDAR_OBJECTS = \ + $(OBJS)\calendar_calendar.obj \ + $(OBJS)\calendar_calendar.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,11 +212,11 @@ $(OBJS)\calendar_calendar.obj: .\calendar.cpp $(CXX) /c /nologo /TP /Fo$@ $(CALENDAR_CXXFLAGS) $** $(OBJS)\calendar_calendar.res: .\calendar.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** -$(OBJS)\calendar.exe: $(OBJS)\calendar_calendar.obj $(OBJS)\calendar_calendar.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\calendar_calendar.obj $(OBJS)\calendar_calendar.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\calendar.exe: $(CALENDAR_OBJECTS) $(OBJS)\calendar_calendar.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(CALENDAR_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << clean: diff --git a/samples/calendar/makefile.wat b/samples/calendar/makefile.wat index db0351f079..1993eb2510 100644 --- a/samples/calendar/makefile.wat +++ b/samples/calendar/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -CALENDAR_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CALENDAR_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +CALENDAR_OBJECTS = & + $(OBJS)\calendar_calendar.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,16 +180,16 @@ $(OBJS)\calendar_calendar.obj : .AUTODEPEND .\calendar.cpp $(CXX) -zq -fo=$^@ $(CALENDAR_CXXFLAGS) $< $(OBJS)\calendar_calendar.res : .AUTODEPEND .\calendar.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< -$(OBJS)\calendar.exe : $(OBJS)\calendar_calendar.obj $(OBJS)\calendar_calendar.res +$(OBJS)\calendar.exe : $(CALENDAR_OBJECTS) $(OBJS)\calendar_calendar.res @%create $(OBJS)\calendar.lbc @%append $(OBJS)\calendar.lbc option quiet @%append $(OBJS)\calendar.lbc name $^@ @%append $(OBJS)\calendar.lbc option incremental - @%append $(OBJS)\calendar.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\calendar_calendar.obj) do @%append $(OBJS)\calendar.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\calendar.lbc library %i + @%append $(OBJS)\calendar.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(CALENDAR_OBJECTS)) do @%append $(OBJS)\calendar.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\calendar.lbc library %i @%append $(OBJS)\calendar.lbc option resource=$(OBJS)\calendar_calendar.res wlink @$(OBJS)\calendar.lbc diff --git a/samples/caret/Makefile.in b/samples/caret/Makefile.in index c1ec08ae59..14ca7d48cf 100644 --- a/samples/caret/Makefile.in +++ b/samples/caret/Makefile.in @@ -36,6 +36,10 @@ CARET_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +CARET_OBJECTS = \ + caret_caret.o \ + $(__caret___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ CARET_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ CARET_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ caret$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o caret$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -118,8 +127,8 @@ CARET_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ all: caret$(EXEEXT) -caret$(EXEEXT): caret_caret.o $(__caret___win32rc) - $(CXX) -o $@ caret_caret.o $(__caret___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +caret$(EXEEXT): $(CARET_OBJECTS) $(__caret___win32rc) + $(CXX) -o $@ $(CARET_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__caret___mac_rezcmd) $(__caret___mac_setfilecmd) @@ -131,7 +140,7 @@ caret_caret_rc.o: $(srcdir)/caret.rc clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f caret$(EXEEXT) distclean: clean diff --git a/samples/caret/makefile.bcc b/samples/caret/makefile.bcc index d55cc58020..f9b29100c7 100644 --- a/samples/caret/makefile.bcc +++ b/samples/caret/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -CARET_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +CARET_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +CARET_OBJECTS = \ + $(OBJS)\caret_caret.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,11 +149,11 @@ $(OBJS)\caret_caret.obj: .\caret.cpp $(CXX) -q -c -P -o$@ $(CARET_CXXFLAGS) $** $(OBJS)\caret_caret.res: .\caret.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** -$(OBJS)\caret.exe: $(OBJS)\caret_caret.obj $(OBJS)\caret_caret.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\caret_caret.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\caret_caret.res +$(OBJS)\caret.exe: $(CARET_OBJECTS) $(OBJS)\caret_caret.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(CARET_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\caret_caret.res | clean: diff --git a/samples/caret/makefile.gcc b/samples/caret/makefile.gcc index 00dbb0b622..3318ef2e35 100644 --- a/samples/caret/makefile.gcc +++ b/samples/caret/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -CARET_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CARET_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +CARET_OBJECTS = \ + $(OBJS)\caret_caret.o \ + $(OBJS)\caret_caret_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,10 +143,10 @@ $(OBJS)\caret_caret.o: .\caret.cpp $(CXX) -c -o $@ $(CARET_CXXFLAGS) $< $(OBJS)\caret_caret_rc.o: .\caret.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) -$(OBJS)\caret.exe: $(OBJS)\caret_caret.o $(OBJS)\caret_caret_rc.o - $(CXX) -o $@ $(OBJS)\caret_caret.o $(OBJS)\caret_caret_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\caret.exe: $(CARET_OBJECTS) $(OBJS)\caret_caret_rc.o + $(CXX) -o $@ $(CARET_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o diff --git a/samples/caret/makefile.vc b/samples/caret/makefile.vc index 2fadd04e1a..3c996a9264 100644 --- a/samples/caret/makefile.vc +++ b/samples/caret/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -CARET_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\caret.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CARET_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) /DWIN32 \ + $(__DEBUGINFO_0) /Fd$(OBJS)\caret.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +CARET_OBJECTS = \ + $(OBJS)\caret_caret.obj \ + $(OBJS)\caret_caret.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,11 +212,11 @@ $(OBJS)\caret_caret.obj: .\caret.cpp $(CXX) /c /nologo /TP /Fo$@ $(CARET_CXXFLAGS) $** $(OBJS)\caret_caret.res: .\caret.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** -$(OBJS)\caret.exe: $(OBJS)\caret_caret.obj $(OBJS)\caret_caret.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\caret_caret.obj $(OBJS)\caret_caret.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\caret.exe: $(CARET_OBJECTS) $(OBJS)\caret_caret.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(CARET_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << clean: diff --git a/samples/caret/makefile.wat b/samples/caret/makefile.wat index 6ed7ebb286..23c2e392f8 100644 --- a/samples/caret/makefile.wat +++ b/samples/caret/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -CARET_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CARET_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +CARET_OBJECTS = & + $(OBJS)\caret_caret.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,16 +180,16 @@ $(OBJS)\caret_caret.obj : .AUTODEPEND .\caret.cpp $(CXX) -zq -fo=$^@ $(CARET_CXXFLAGS) $< $(OBJS)\caret_caret.res : .AUTODEPEND .\caret.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< -$(OBJS)\caret.exe : $(OBJS)\caret_caret.obj $(OBJS)\caret_caret.res +$(OBJS)\caret.exe : $(CARET_OBJECTS) $(OBJS)\caret_caret.res @%create $(OBJS)\caret.lbc @%append $(OBJS)\caret.lbc option quiet @%append $(OBJS)\caret.lbc name $^@ @%append $(OBJS)\caret.lbc option incremental - @%append $(OBJS)\caret.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\caret_caret.obj) do @%append $(OBJS)\caret.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\caret.lbc library %i + @%append $(OBJS)\caret.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(CARET_OBJECTS)) do @%append $(OBJS)\caret.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\caret.lbc library %i @%append $(OBJS)\caret.lbc option resource=$(OBJS)\caret_caret.res wlink @$(OBJS)\caret.lbc diff --git a/samples/checklst/Makefile.in b/samples/checklst/Makefile.in index f8f700eb95..2c0b2456dd 100644 --- a/samples/checklst/Makefile.in +++ b/samples/checklst/Makefile.in @@ -36,6 +36,10 @@ CHECKLST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +CHECKLST_OBJECTS = \ + checklst_checklst.o \ + $(__checklst___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ CHECKLST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ CHECKLST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ checklst$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o checklst$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -118,8 +127,8 @@ CHECKLST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ all: checklst$(EXEEXT) -checklst$(EXEEXT): checklst_checklst.o $(__checklst___win32rc) - $(CXX) -o $@ checklst_checklst.o $(__checklst___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +checklst$(EXEEXT): $(CHECKLST_OBJECTS) $(__checklst___win32rc) + $(CXX) -o $@ $(CHECKLST_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__checklst___mac_rezcmd) $(__checklst___mac_setfilecmd) @@ -131,7 +140,7 @@ checklst_checklst_rc.o: $(srcdir)/checklst.rc clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f checklst$(EXEEXT) distclean: clean diff --git a/samples/checklst/makefile.bcc b/samples/checklst/makefile.bcc index e4a1c57bb2..7d88073ddb 100644 --- a/samples/checklst/makefile.bcc +++ b/samples/checklst/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -CHECKLST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +CHECKLST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +CHECKLST_OBJECTS = \ + $(OBJS)\checklst_checklst.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,11 +149,11 @@ $(OBJS)\checklst_checklst.obj: .\checklst.cpp $(CXX) -q -c -P -o$@ $(CHECKLST_CXXFLAGS) $** $(OBJS)\checklst_checklst.res: .\checklst.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** -$(OBJS)\checklst.exe: $(OBJS)\checklst_checklst.obj $(OBJS)\checklst_checklst.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\checklst_checklst.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\checklst_checklst.res +$(OBJS)\checklst.exe: $(CHECKLST_OBJECTS) $(OBJS)\checklst_checklst.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(CHECKLST_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\checklst_checklst.res | clean: diff --git a/samples/checklst/makefile.gcc b/samples/checklst/makefile.gcc index 651c90e13e..81a8b5e2fd 100644 --- a/samples/checklst/makefile.gcc +++ b/samples/checklst/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -CHECKLST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CHECKLST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +CHECKLST_OBJECTS = \ + $(OBJS)\checklst_checklst.o \ + $(OBJS)\checklst_checklst_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,10 +143,10 @@ $(OBJS)\checklst_checklst.o: .\checklst.cpp $(CXX) -c -o $@ $(CHECKLST_CXXFLAGS) $< $(OBJS)\checklst_checklst_rc.o: .\checklst.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) -$(OBJS)\checklst.exe: $(OBJS)\checklst_checklst.o $(OBJS)\checklst_checklst_rc.o - $(CXX) -o $@ $(OBJS)\checklst_checklst.o $(OBJS)\checklst_checklst_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\checklst.exe: $(CHECKLST_OBJECTS) $(OBJS)\checklst_checklst_rc.o + $(CXX) -o $@ $(CHECKLST_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o diff --git a/samples/checklst/makefile.vc b/samples/checklst/makefile.vc index cf8cbca278..6bef6fefb2 100644 --- a/samples/checklst/makefile.vc +++ b/samples/checklst/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -CHECKLST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\checklst.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CHECKLST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\checklst.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +CHECKLST_OBJECTS = \ + $(OBJS)\checklst_checklst.obj \ + $(OBJS)\checklst_checklst.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,11 +212,11 @@ $(OBJS)\checklst_checklst.obj: .\checklst.cpp $(CXX) /c /nologo /TP /Fo$@ $(CHECKLST_CXXFLAGS) $** $(OBJS)\checklst_checklst.res: .\checklst.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** -$(OBJS)\checklst.exe: $(OBJS)\checklst_checklst.obj $(OBJS)\checklst_checklst.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\checklst_checklst.obj $(OBJS)\checklst_checklst.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\checklst.exe: $(CHECKLST_OBJECTS) $(OBJS)\checklst_checklst.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(CHECKLST_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << clean: diff --git a/samples/checklst/makefile.wat b/samples/checklst/makefile.wat index 6a7284f842..24e4d0ab58 100644 --- a/samples/checklst/makefile.wat +++ b/samples/checklst/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -CHECKLST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CHECKLST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +CHECKLST_OBJECTS = & + $(OBJS)\checklst_checklst.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,16 +180,16 @@ $(OBJS)\checklst_checklst.obj : .AUTODEPEND .\checklst.cpp $(CXX) -zq -fo=$^@ $(CHECKLST_CXXFLAGS) $< $(OBJS)\checklst_checklst.res : .AUTODEPEND .\checklst.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< -$(OBJS)\checklst.exe : $(OBJS)\checklst_checklst.obj $(OBJS)\checklst_checklst.res +$(OBJS)\checklst.exe : $(CHECKLST_OBJECTS) $(OBJS)\checklst_checklst.res @%create $(OBJS)\checklst.lbc @%append $(OBJS)\checklst.lbc option quiet @%append $(OBJS)\checklst.lbc name $^@ @%append $(OBJS)\checklst.lbc option incremental - @%append $(OBJS)\checklst.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\checklst_checklst.obj) do @%append $(OBJS)\checklst.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\checklst.lbc library %i + @%append $(OBJS)\checklst.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(CHECKLST_OBJECTS)) do @%append $(OBJS)\checklst.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\checklst.lbc library %i @%append $(OBJS)\checklst.lbc option resource=$(OBJS)\checklst_checklst.res wlink @$(OBJS)\checklst.lbc diff --git a/samples/config/Makefile.in b/samples/config/Makefile.in index fc6d593610..cd854c82c7 100644 --- a/samples/config/Makefile.in +++ b/samples/config/Makefile.in @@ -36,6 +36,10 @@ CONFTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +CONFTEST_OBJECTS = \ + conftest_conftest.o \ + $(__conftest___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ CONFTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ CONFTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ conftest$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o conftest$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,11 +129,11 @@ all: conftest$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f conftest$(EXEEXT) -conftest$(EXEEXT): conftest_conftest.o $(__conftest___win32rc) - $(CXX) -o $@ conftest_conftest.o $(__conftest___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +conftest$(EXEEXT): $(CONFTEST_OBJECTS) $(__conftest___win32rc) + $(CXX) -o $@ $(CONFTEST_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__conftest___mac_rezcmd) $(__conftest___mac_setfilecmd) diff --git a/samples/config/makefile.bcc b/samples/config/makefile.bcc index 2435abc161..decac3866f 100644 --- a/samples/config/makefile.bcc +++ b/samples/config/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -CONFTEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +CONFTEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +CONFTEST_OBJECTS = \ + $(OBJS)\conftest_conftest.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\conftest_conftest.obj: .\conftest.cpp $(CXX) -q -c -P -o$@ $(CONFTEST_CXXFLAGS) $** $(OBJS)\conftest_conftest.res: .\conftest.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\conftest.exe del $(OBJS)\conftest.exe -$(OBJS)\conftest.exe: $(OBJS)\conftest_conftest.obj $(OBJS)\conftest_conftest.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\conftest_conftest.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\conftest_conftest.res +$(OBJS)\conftest.exe: $(CONFTEST_OBJECTS) $(OBJS)\conftest_conftest.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(CONFTEST_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\conftest_conftest.res | diff --git a/samples/config/makefile.gcc b/samples/config/makefile.gcc index 7814a10175..16d5ef8bcd 100644 --- a/samples/config/makefile.gcc +++ b/samples/config/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -CONFTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CONFTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +CONFTEST_OBJECTS = \ + $(OBJS)\conftest_conftest.o \ + $(OBJS)\conftest_conftest_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\conftest_conftest.o: .\conftest.cpp $(CXX) -c -o $@ $(CONFTEST_CXXFLAGS) $< $(OBJS)\conftest_conftest_rc.o: .\conftest.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\conftest.exe del $(OBJS)\conftest.exe -$(OBJS)\conftest.exe: $(OBJS)\conftest_conftest.o $(OBJS)\conftest_conftest_rc.o - $(CXX) -o $@ $(OBJS)\conftest_conftest.o $(OBJS)\conftest_conftest_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\conftest.exe: $(CONFTEST_OBJECTS) $(OBJS)\conftest_conftest_rc.o + $(CXX) -o $@ $(CONFTEST_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/config/makefile.vc b/samples/config/makefile.vc index 2db80faea2..0542a63990 100644 --- a/samples/config/makefile.vc +++ b/samples/config/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -CONFTEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\conftest.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CONFTEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\conftest.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +CONFTEST_OBJECTS = \ + $(OBJS)\conftest_conftest.obj \ + $(OBJS)\conftest_conftest.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\conftest_conftest.obj: .\conftest.cpp $(CXX) /c /nologo /TP /Fo$@ $(CONFTEST_CXXFLAGS) $** $(OBJS)\conftest_conftest.res: .\conftest.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\conftest.exe del $(OBJS)\conftest.exe -$(OBJS)\conftest.exe: $(OBJS)\conftest_conftest.obj $(OBJS)\conftest_conftest.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\conftest_conftest.obj $(OBJS)\conftest_conftest.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\conftest.exe: $(CONFTEST_OBJECTS) $(OBJS)\conftest_conftest.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(CONFTEST_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/config/makefile.wat b/samples/config/makefile.wat index 590ca45d7f..bfd35dc5e6 100644 --- a/samples/config/makefile.wat +++ b/samples/config/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -CONFTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CONFTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +CONFTEST_OBJECTS = & + $(OBJS)\conftest_conftest.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\conftest_conftest.obj : .AUTODEPEND .\conftest.cpp $(CXX) -zq -fo=$^@ $(CONFTEST_CXXFLAGS) $< $(OBJS)\conftest_conftest.res : .AUTODEPEND .\conftest.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\conftest.exe del $(OBJS)\conftest.exe -$(OBJS)\conftest.exe : $(OBJS)\conftest_conftest.obj $(OBJS)\conftest_conftest.res +$(OBJS)\conftest.exe : $(CONFTEST_OBJECTS) $(OBJS)\conftest_conftest.res @%create $(OBJS)\conftest.lbc @%append $(OBJS)\conftest.lbc option quiet @%append $(OBJS)\conftest.lbc name $^@ @%append $(OBJS)\conftest.lbc option incremental - @%append $(OBJS)\conftest.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\conftest_conftest.obj) do @%append $(OBJS)\conftest.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\conftest.lbc library %i + @%append $(OBJS)\conftest.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(CONFTEST_OBJECTS)) do @%append $(OBJS)\conftest.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\conftest.lbc library %i @%append $(OBJS)\conftest.lbc option resource=$(OBJS)\conftest_conftest.res wlink @$(OBJS)\conftest.lbc diff --git a/samples/console/Makefile.in b/samples/console/Makefile.in index 198ae3d1d1..e7f8d401f3 100644 --- a/samples/console/Makefile.in +++ b/samples/console/Makefile.in @@ -32,6 +32,9 @@ CONSOLE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(__MULTILIB_FLAG_p) $(CXXFLAGS) +CONSOLE_OBJECTS = \ + console_console.o +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -40,7 +43,8 @@ CONSOLE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -53,23 +57,27 @@ CONSOLE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@__INC_ZLIB_p = -I$(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_MONOLITHIC_0@__MULTILIB_FLAG_p = -DwxUSE_GUI=0 @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_PLATFORM_MAC_1@__console___mac_setfilecmd = \ @COND_PLATFORM_MAC_1@ $(SETFILE) -t APPL console$(EXEEXT) @@ -80,11 +88,11 @@ all: console$(EXEEXT) data clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f console$(EXEEXT) -console$(EXEEXT): console_console.o - $(CXX) -o $@ console_console.o $(LDFLAGS) -L$(top_builddir)lib $(SAMPLES_RPATH_FLAG) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) +console$(EXEEXT): $(CONSOLE_OBJECTS) + $(CXX) -o $@ $(CONSOLE_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(SAMPLES_RPATH_FLAG) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(__console___mac_setfilecmd) diff --git a/samples/console/makefile.bcc b/samples/console/makefile.bcc index 42ef026e98..3ab7074306 100644 --- a/samples/console/makefile.bcc +++ b/samples/console/makefile.bcc @@ -20,13 +20,16 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -CONSOLE_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +CONSOLE_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) \ $(__MULTILIB_FLAG_p) $(CXXFLAGS) +CONSOLE_OBJECTS = \ + $(OBJS)\console_console.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -38,7 +41,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -50,18 +56,36 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = -DWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(MONOLITHIC)" == "0" __MULTILIB_FLAG_p = -DwxUSE_GUI=0 !endif @@ -114,9 +138,9 @@ clean: -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\console.exe del $(OBJS)\console.exe -$(OBJS)\console.exe: $(OBJS)\console_console.obj - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -ap @&&| - c0x32.obj $(OBJS)\console_console.obj,$@,, $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, +$(OBJS)\console.exe: $(CONSOLE_OBJECTS) + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -ap @&&| + c0x32.obj $(CONSOLE_OBJECTS),$@,, $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, | data: diff --git a/samples/console/makefile.gcc b/samples/console/makefile.gcc index 40ac40c74e..cc5b778aba 100644 --- a/samples/console/makefile.gcc +++ b/samples/console/makefile.gcc @@ -12,8 +12,17 @@ include ../../build/config.gcc ### Variables: ### -CONSOLE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(__MULTILIB_FLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CONSOLE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(__MULTILIB_FLAG_p) $(CXXFLAGS) +CONSOLE_OBJECTS = \ + $(OBJS)\console_console.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +36,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,17 +53,41 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(SHARED),1) __DLLFLAG_p = -DWXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(MONOLITHIC),0) __MULTILIB_FLAG_p = -DwxUSE_GUI=0 endif @@ -66,7 +104,8 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -88,8 +127,8 @@ clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\console.exe del $(OBJS)\console.exe -$(OBJS)\console.exe: $(OBJS)\console_console.o - $(CXX) -o $@ $(OBJS)\console_console.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\console.exe: $(CONSOLE_OBJECTS) + $(CXX) -o $@ $(CONSOLE_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 data: if not exist $(OBJS) mkdir $(OBJS) diff --git a/samples/console/makefile.vc b/samples/console/makefile.vc index 13c8219405..5ccfe2a2b1 100644 --- a/samples/console/makefile.vc +++ b/samples/console/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -CONSOLE_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\console.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_CONSOLE $(__MULTILIB_FLAG_p) $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CONSOLE_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\console.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_CONSOLE $(__MULTILIB_FLAG_p) \ + $(CXXFLAGS) +CONSOLE_OBJECTS = \ + $(OBJS)\console_console.obj +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,30 +49,69 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(MONOLITHIC)" == "0" __MULTILIB_FLAG_p = /DwxUSE_GUI=0 !endif @@ -81,16 +134,32 @@ __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) !endif @@ -110,9 +179,9 @@ clean: -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\console.exe del $(OBJS)\console.exe -$(OBJS)\console.exe: $(OBJS)\console_console.obj - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:CONSOLE @<< - $(OBJS)\console_console.obj $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\console.exe: $(CONSOLE_OBJECTS) + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE @<< + $(CONSOLE_OBJECTS) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << data: diff --git a/samples/console/makefile.wat b/samples/console/makefile.wat index 46bb570af2..f025b86922 100644 --- a/samples/console/makefile.wat +++ b/samples/console/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __MULTILIB_FLAG_p = !ifeq MONOLITHIC 0 __MULTILIB_FLAG_p = -dwxUSE_GUI=0 @@ -100,7 +142,8 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +152,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -CONSOLE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(__MULTILIB_FLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CONSOLE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(__MULTILIB_FLAG_p) $(CXXFLAGS) +CONSOLE_OBJECTS = & + $(OBJS)\console_console.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -132,14 +185,14 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\console.exe del $(OBJS)\console.exe -$(OBJS)\console.exe : $(OBJS)\console_console.obj +$(OBJS)\console.exe : $(CONSOLE_OBJECTS) @%create $(OBJS)\console.lbc @%append $(OBJS)\console.lbc option quiet @%append $(OBJS)\console.lbc name $^@ @%append $(OBJS)\console.lbc option incremental - @%append $(OBJS)\console.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt ref 'main_' - @for %i in ( $(OBJS)\console_console.obj) do @%append $(OBJS)\console.lbc file %i - @for %i in ( $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib) do @%append $(OBJS)\console.lbc library %i + @%append $(OBJS)\console.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt ref 'main_' + @for %i in ($(CONSOLE_OBJECTS)) do @%append $(OBJS)\console.lbc file %i + @for %i in ( $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib) do @%append $(OBJS)\console.lbc library %i @%append $(OBJS)\console.lbc wlink @$(OBJS)\console.lbc diff --git a/samples/controls/Makefile.in b/samples/controls/Makefile.in index d9210ad163..1b6c2bce1e 100644 --- a/samples/controls/Makefile.in +++ b/samples/controls/Makefile.in @@ -36,6 +36,10 @@ CONTROLS_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +CONTROLS_OBJECTS = \ + controls_controls.o \ + $(__controls___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ CONTROLS_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ CONTROLS_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ controls$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o controls$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,11 +129,11 @@ all: controls$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f controls$(EXEEXT) -controls$(EXEEXT): controls_controls.o $(__controls___win32rc) - $(CXX) -o $@ controls_controls.o $(__controls___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +controls$(EXEEXT): $(CONTROLS_OBJECTS) $(__controls___win32rc) + $(CXX) -o $@ $(CONTROLS_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__controls___mac_rezcmd) $(__controls___mac_setfilecmd) diff --git a/samples/controls/makefile.bcc b/samples/controls/makefile.bcc index 6bfffa8bb0..716593f4f5 100644 --- a/samples/controls/makefile.bcc +++ b/samples/controls/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -CONTROLS_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +CONTROLS_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +CONTROLS_OBJECTS = \ + $(OBJS)\controls_controls.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\controls_controls.obj: .\controls.cpp $(CXX) -q -c -P -o$@ $(CONTROLS_CXXFLAGS) $** $(OBJS)\controls_controls.res: .\controls.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\controls.exe del $(OBJS)\controls.exe -$(OBJS)\controls.exe: $(OBJS)\controls_controls.obj $(OBJS)\controls_controls.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\controls_controls.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\controls_controls.res +$(OBJS)\controls.exe: $(CONTROLS_OBJECTS) $(OBJS)\controls_controls.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(CONTROLS_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\controls_controls.res | diff --git a/samples/controls/makefile.gcc b/samples/controls/makefile.gcc index 325fb7636d..5a0b22e5ab 100644 --- a/samples/controls/makefile.gcc +++ b/samples/controls/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -CONTROLS_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CONTROLS_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +CONTROLS_OBJECTS = \ + $(OBJS)\controls_controls.o \ + $(OBJS)\controls_controls_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\controls_controls.o: .\controls.cpp $(CXX) -c -o $@ $(CONTROLS_CXXFLAGS) $< $(OBJS)\controls_controls_rc.o: .\controls.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\controls.exe del $(OBJS)\controls.exe -$(OBJS)\controls.exe: $(OBJS)\controls_controls.o $(OBJS)\controls_controls_rc.o - $(CXX) -o $@ $(OBJS)\controls_controls.o $(OBJS)\controls_controls_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\controls.exe: $(CONTROLS_OBJECTS) $(OBJS)\controls_controls_rc.o + $(CXX) -o $@ $(CONTROLS_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/controls/makefile.vc b/samples/controls/makefile.vc index 7e97af5fb1..c481533383 100644 --- a/samples/controls/makefile.vc +++ b/samples/controls/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -CONTROLS_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\controls.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CONTROLS_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\controls.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +CONTROLS_OBJECTS = \ + $(OBJS)\controls_controls.obj \ + $(OBJS)\controls_controls.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\controls_controls.obj: .\controls.cpp $(CXX) /c /nologo /TP /Fo$@ $(CONTROLS_CXXFLAGS) $** $(OBJS)\controls_controls.res: .\controls.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\controls.exe del $(OBJS)\controls.exe -$(OBJS)\controls.exe: $(OBJS)\controls_controls.obj $(OBJS)\controls_controls.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\controls_controls.obj $(OBJS)\controls_controls.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\controls.exe: $(CONTROLS_OBJECTS) $(OBJS)\controls_controls.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(CONTROLS_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/controls/makefile.wat b/samples/controls/makefile.wat index b3a918ee45..3318de28e0 100644 --- a/samples/controls/makefile.wat +++ b/samples/controls/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -CONTROLS_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +CONTROLS_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +CONTROLS_OBJECTS = & + $(OBJS)\controls_controls.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\controls_controls.obj : .AUTODEPEND .\controls.cpp $(CXX) -zq -fo=$^@ $(CONTROLS_CXXFLAGS) $< $(OBJS)\controls_controls.res : .AUTODEPEND .\controls.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\controls.exe del $(OBJS)\controls.exe -$(OBJS)\controls.exe : $(OBJS)\controls_controls.obj $(OBJS)\controls_controls.res +$(OBJS)\controls.exe : $(CONTROLS_OBJECTS) $(OBJS)\controls_controls.res @%create $(OBJS)\controls.lbc @%append $(OBJS)\controls.lbc option quiet @%append $(OBJS)\controls.lbc name $^@ @%append $(OBJS)\controls.lbc option incremental - @%append $(OBJS)\controls.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\controls_controls.obj) do @%append $(OBJS)\controls.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\controls.lbc library %i + @%append $(OBJS)\controls.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(CONTROLS_OBJECTS)) do @%append $(OBJS)\controls.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\controls.lbc library %i @%append $(OBJS)\controls.lbc option resource=$(OBJS)\controls_controls.res wlink @$(OBJS)\controls.lbc diff --git a/samples/dialogs/Makefile.in b/samples/dialogs/Makefile.in index 2655bbe32d..a2151b8580 100644 --- a/samples/dialogs/Makefile.in +++ b/samples/dialogs/Makefile.in @@ -36,6 +36,10 @@ DIALOGS_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +DIALOGS_OBJECTS = \ + dialogs_dialogs.o \ + $(__dialogs___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ DIALOGS_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ DIALOGS_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ dialogs$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o dialogs$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: dialogs$(EXEEXT) data clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f dialogs$(EXEEXT) data: @@ -131,8 +140,8 @@ data: fi; \ done -dialogs$(EXEEXT): dialogs_dialogs.o $(__dialogs___win32rc) - $(CXX) -o $@ dialogs_dialogs.o $(__dialogs___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +dialogs$(EXEEXT): $(DIALOGS_OBJECTS) $(__dialogs___win32rc) + $(CXX) -o $@ $(DIALOGS_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__dialogs___mac_rezcmd) $(__dialogs___mac_setfilecmd) diff --git a/samples/dialogs/makefile.bcc b/samples/dialogs/makefile.bcc index 193dfb71c2..e271e30c8c 100644 --- a/samples/dialogs/makefile.bcc +++ b/samples/dialogs/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -DIALOGS_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +DIALOGS_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +DIALOGS_OBJECTS = \ + $(OBJS)\dialogs_dialogs.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,7 +149,7 @@ $(OBJS)\dialogs_dialogs.obj: .\dialogs.cpp $(CXX) -q -c -P -o$@ $(DIALOGS_CXXFLAGS) $** $(OBJS)\dialogs_dialogs.res: .\dialogs.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -133,7 +160,7 @@ data: if not exist $(OBJS) mkdir $(OBJS) for %f in (tips.txt) do if not exist $(OBJS)\%f copy .\%f $(OBJS) -$(OBJS)\dialogs.exe: $(OBJS)\dialogs_dialogs.obj $(OBJS)\dialogs_dialogs.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\dialogs_dialogs.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\dialogs_dialogs.res +$(OBJS)\dialogs.exe: $(DIALOGS_OBJECTS) $(OBJS)\dialogs_dialogs.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(DIALOGS_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\dialogs_dialogs.res | diff --git a/samples/dialogs/makefile.gcc b/samples/dialogs/makefile.gcc index 8005174878..b2dace1a2a 100644 --- a/samples/dialogs/makefile.gcc +++ b/samples/dialogs/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -DIALOGS_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DIALOGS_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +DIALOGS_OBJECTS = \ + $(OBJS)\dialogs_dialogs.o \ + $(OBJS)\dialogs_dialogs_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,7 +143,7 @@ $(OBJS)\dialogs_dialogs.o: .\dialogs.cpp $(CXX) -c -o $@ $(DIALOGS_CXXFLAGS) $< $(OBJS)\dialogs_dialogs_rc.o: .\dialogs.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o @@ -107,7 +153,7 @@ data: if not exist $(OBJS) mkdir $(OBJS) for %%f in (tips.txt) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS) -$(OBJS)\dialogs.exe: $(OBJS)\dialogs_dialogs.o $(OBJS)\dialogs_dialogs_rc.o - $(CXX) -o $@ $(OBJS)\dialogs_dialogs.o $(OBJS)\dialogs_dialogs_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\dialogs.exe: $(DIALOGS_OBJECTS) $(OBJS)\dialogs_dialogs_rc.o + $(CXX) -o $@ $(DIALOGS_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/dialogs/makefile.vc b/samples/dialogs/makefile.vc index c7ec01fc58..1ca9b145ac 100644 --- a/samples/dialogs/makefile.vc +++ b/samples/dialogs/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -DIALOGS_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\dialogs.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DIALOGS_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\dialogs.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +DIALOGS_OBJECTS = \ + $(OBJS)\dialogs_dialogs.obj \ + $(OBJS)\dialogs_dialogs.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,7 +212,7 @@ $(OBJS)\dialogs_dialogs.obj: .\dialogs.cpp $(CXX) /c /nologo /TP /Fo$@ $(DIALOGS_CXXFLAGS) $** $(OBJS)\dialogs_dialogs.res: .\dialogs.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,7 +223,7 @@ data: if not exist $(OBJS) mkdir $(OBJS) for %f in (tips.txt) do if not exist $(OBJS)\%f copy .\%f $(OBJS) -$(OBJS)\dialogs.exe: $(OBJS)\dialogs_dialogs.obj $(OBJS)\dialogs_dialogs.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\dialogs_dialogs.obj $(OBJS)\dialogs_dialogs.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\dialogs.exe: $(DIALOGS_OBJECTS) $(OBJS)\dialogs_dialogs.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(DIALOGS_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/dialogs/makefile.wat b/samples/dialogs/makefile.wat index 84d461ff0e..a49b4fa478 100644 --- a/samples/dialogs/makefile.wat +++ b/samples/dialogs/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -DIALOGS_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DIALOGS_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +DIALOGS_OBJECTS = & + $(OBJS)\dialogs_dialogs.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\dialogs_dialogs.obj : .AUTODEPEND .\dialogs.cpp $(CXX) -zq -fo=$^@ $(DIALOGS_CXXFLAGS) $< $(OBJS)\dialogs_dialogs.res : .AUTODEPEND .\dialogs.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -139,13 +193,13 @@ data : if not exist $(OBJS) mkdir $(OBJS) for %f in (tips.txt) do if not exist $(OBJS)\%f copy .\%f $(OBJS) -$(OBJS)\dialogs.exe : $(OBJS)\dialogs_dialogs.obj $(OBJS)\dialogs_dialogs.res +$(OBJS)\dialogs.exe : $(DIALOGS_OBJECTS) $(OBJS)\dialogs_dialogs.res @%create $(OBJS)\dialogs.lbc @%append $(OBJS)\dialogs.lbc option quiet @%append $(OBJS)\dialogs.lbc name $^@ @%append $(OBJS)\dialogs.lbc option incremental - @%append $(OBJS)\dialogs.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\dialogs_dialogs.obj) do @%append $(OBJS)\dialogs.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\dialogs.lbc library %i + @%append $(OBJS)\dialogs.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(DIALOGS_OBJECTS)) do @%append $(OBJS)\dialogs.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\dialogs.lbc library %i @%append $(OBJS)\dialogs.lbc option resource=$(OBJS)\dialogs_dialogs.res wlink @$(OBJS)\dialogs.lbc diff --git a/samples/dialup/Makefile.in b/samples/dialup/Makefile.in index 284809cc51..24b8aed01c 100644 --- a/samples/dialup/Makefile.in +++ b/samples/dialup/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib NETTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +NETTEST_OBJECTS = \ + nettest_nettest.o \ + $(__nettest___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ NETTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ NETTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ nettest$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o nettest$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: nettest$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f nettest$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -nettest$(EXEEXT): nettest_nettest.o $(__nettest___win32rc) - $(CXX) -o $@ nettest_nettest.o $(__nettest___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +nettest$(EXEEXT): $(NETTEST_OBJECTS) $(__nettest___win32rc) + $(CXX) -o $@ $(NETTEST_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__nettest___mac_rezcmd) $(__nettest___mac_setfilecmd) diff --git a/samples/dialup/makefile.bcc b/samples/dialup/makefile.bcc index f4f2e392a7..322fff9f50 100644 --- a/samples/dialup/makefile.bcc +++ b/samples/dialup/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -NETTEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +NETTEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +NETTEST_OBJECTS = \ + $(OBJS)\nettest_nettest.obj OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\nettest_nettest.obj: .\nettest.cpp $(CXX) -q -c -P -o$@ $(NETTEST_CXXFLAGS) $** $(OBJS)\nettest_nettest.res: .\nettest.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\nettest.exe del $(OBJS)\nettest.exe -$(OBJS)\nettest.exe: $(OBJS)\nettest_nettest.obj $(OBJS)\nettest_nettest.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\nettest_nettest.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\nettest_nettest.res +$(OBJS)\nettest.exe: $(NETTEST_OBJECTS) $(OBJS)\nettest_nettest.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(NETTEST_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\nettest_nettest.res | diff --git a/samples/dialup/makefile.gcc b/samples/dialup/makefile.gcc index b4ac10d458..fd724172ca 100644 --- a/samples/dialup/makefile.gcc +++ b/samples/dialup/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -NETTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +NETTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +NETTEST_OBJECTS = \ + $(OBJS)\nettest_nettest.o \ + $(OBJS)\nettest_nettest_rc.o +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\nettest_nettest.o: .\nettest.cpp $(CXX) -c -o $@ $(NETTEST_CXXFLAGS) $< $(OBJS)\nettest_nettest_rc.o: .\nettest.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\nettest.exe del $(OBJS)\nettest.exe -$(OBJS)\nettest.exe: $(OBJS)\nettest_nettest.o $(OBJS)\nettest_nettest_rc.o - $(CXX) -o $@ $(OBJS)\nettest_nettest.o $(OBJS)\nettest_nettest_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\nettest.exe: $(NETTEST_OBJECTS) $(OBJS)\nettest_nettest_rc.o + $(CXX) -o $@ $(NETTEST_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/dialup/makefile.vc b/samples/dialup/makefile.vc index 35a0a95c14..41b5d70d25 100644 --- a/samples/dialup/makefile.vc +++ b/samples/dialup/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -NETTEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\nettest.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +NETTEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\nettest.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +NETTEST_OBJECTS = \ + $(OBJS)\nettest_nettest.obj \ + $(OBJS)\nettest_nettest.res +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\nettest_nettest.obj: .\nettest.cpp $(CXX) /c /nologo /TP /Fo$@ $(NETTEST_CXXFLAGS) $** $(OBJS)\nettest_nettest.res: .\nettest.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\nettest.exe del $(OBJS)\nettest.exe -$(OBJS)\nettest.exe: $(OBJS)\nettest_nettest.obj $(OBJS)\nettest_nettest.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\nettest_nettest.obj $(OBJS)\nettest_nettest.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\nettest.exe: $(NETTEST_OBJECTS) $(OBJS)\nettest_nettest.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(NETTEST_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/dialup/makefile.wat b/samples/dialup/makefile.wat index 6e13a529df..efbdedee93 100644 --- a/samples/dialup/makefile.wat +++ b/samples/dialup/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -NETTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +NETTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +NETTEST_OBJECTS = & + $(OBJS)\nettest_nettest.obj +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\nettest_nettest.obj : .AUTODEPEND .\nettest.cpp $(CXX) -zq -fo=$^@ $(NETTEST_CXXFLAGS) $< $(OBJS)\nettest_nettest.res : .AUTODEPEND .\nettest.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\nettest.exe del $(OBJS)\nettest.exe -$(OBJS)\nettest.exe : $(OBJS)\nettest_nettest.obj $(OBJS)\nettest_nettest.res +$(OBJS)\nettest.exe : $(NETTEST_OBJECTS) $(OBJS)\nettest_nettest.res @%create $(OBJS)\nettest.lbc @%append $(OBJS)\nettest.lbc option quiet @%append $(OBJS)\nettest.lbc name $^@ @%append $(OBJS)\nettest.lbc option incremental - @%append $(OBJS)\nettest.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\nettest_nettest.obj) do @%append $(OBJS)\nettest.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\nettest.lbc library %i + @%append $(OBJS)\nettest.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(NETTEST_OBJECTS)) do @%append $(OBJS)\nettest.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\nettest.lbc library %i @%append $(OBJS)\nettest.lbc option resource=$(OBJS)\nettest_nettest.res wlink @$(OBJS)\nettest.lbc diff --git a/samples/display/Makefile.in b/samples/display/Makefile.in index b8a24c3547..41420fd3c8 100644 --- a/samples/display/Makefile.in +++ b/samples/display/Makefile.in @@ -36,6 +36,9 @@ DISPLAY_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +DISPLAY_OBJECTS = \ + display_display.o +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +47,8 @@ DISPLAY_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -65,32 +69,36 @@ DISPLAY_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@__INC_ZLIB_p_1 = -i $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ display$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o display$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_PLATFORM_MAC_1@__display___mac_rezcmd = $(__MACOSX_RESOURCES_p_1) @@ -103,11 +111,11 @@ all: display$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f display$(EXEEXT) -display$(EXEEXT): display_display.o - $(CXX) -o $@ display_display.o $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +display$(EXEEXT): $(DISPLAY_OBJECTS) + $(CXX) -o $@ $(DISPLAY_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__display___mac_rezcmd) $(__display___mac_setfilecmd) diff --git a/samples/display/makefile.bcc b/samples/display/makefile.bcc index 94aa6a62ed..2c5cbe62c5 100644 --- a/samples/display/makefile.bcc +++ b/samples/display/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -DISPLAY_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +DISPLAY_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +DISPLAY_OBJECTS = \ + $(OBJS)\display_display.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,18 +55,36 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = -DWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -114,7 +138,7 @@ clean: -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\display.exe del $(OBJS)\display.exe -$(OBJS)\display.exe: $(OBJS)\display_display.obj - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\display_display.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, +$(OBJS)\display.exe: $(DISPLAY_OBJECTS) + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(DISPLAY_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, | diff --git a/samples/display/makefile.gcc b/samples/display/makefile.gcc index d7b312815c..e24f59baec 100644 --- a/samples/display/makefile.gcc +++ b/samples/display/makefile.gcc @@ -12,8 +12,17 @@ include ../../build/config.gcc ### Variables: ### -DISPLAY_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DISPLAY_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +DISPLAY_OBJECTS = \ + $(OBJS)\display_display.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +36,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,17 +53,41 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(SHARED),1) __DLLFLAG_p = -DWXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -63,10 +101,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -88,7 +128,7 @@ clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\display.exe del $(OBJS)\display.exe -$(OBJS)\display.exe: $(OBJS)\display_display.o - $(CXX) -o $@ $(OBJS)\display_display.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\display.exe: $(DISPLAY_OBJECTS) + $(CXX) -o $@ $(DISPLAY_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/display/makefile.vc b/samples/display/makefile.vc index 6eded35502..b361420722 100644 --- a/samples/display/makefile.vc +++ b/samples/display/makefile.vc @@ -12,8 +12,18 @@ ### Variables: ### -DISPLAY_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\display.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DISPLAY_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\display.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +DISPLAY_OBJECTS = \ + $(OBJS)\display_display.obj +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +33,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,30 +48,69 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od !endif @@ -78,19 +130,36 @@ __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) !endif @@ -110,7 +179,7 @@ clean: -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\display.exe del $(OBJS)\display.exe -$(OBJS)\display.exe: $(OBJS)\display_display.obj - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\display_display.obj $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\display.exe: $(DISPLAY_OBJECTS) + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(DISPLAY_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/display/makefile.wat b/samples/display/makefile.wat index 5489b0949b..ddfbecb017 100644 --- a/samples/display/makefile.wat +++ b/samples/display/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -DISPLAY_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DISPLAY_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +DISPLAY_OBJECTS = & + $(OBJS)\display_display.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -132,13 +186,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\display.exe del $(OBJS)\display.exe -$(OBJS)\display.exe : $(OBJS)\display_display.obj +$(OBJS)\display.exe : $(DISPLAY_OBJECTS) @%create $(OBJS)\display.lbc @%append $(OBJS)\display.lbc option quiet @%append $(OBJS)\display.lbc name $^@ @%append $(OBJS)\display.lbc option incremental - @%append $(OBJS)\display.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\display_display.obj) do @%append $(OBJS)\display.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\display.lbc library %i + @%append $(OBJS)\display.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(DISPLAY_OBJECTS)) do @%append $(OBJS)\display.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\display.lbc library %i @%append $(OBJS)\display.lbc wlink @$(OBJS)\display.lbc diff --git a/samples/docview/Makefile.in b/samples/docview/Makefile.in index 2f65a8e508..0ac4ebd79a 100644 --- a/samples/docview/Makefile.in +++ b/samples/docview/Makefile.in @@ -36,17 +36,24 @@ DOCVIEW_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +DOCVIEW_OBJECTS = \ + docview_docview.o \ + docview_doc.o \ + docview_view.o \ + $(__docview___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @COND_DEPS_TRACKING_0@CXXC = $(CXX) @COND_DEPS_TRACKING_1@CXXC = $(top_builddir)./bk-deps $(CXX) @COND_TOOLKIT_MAC@MACOSX_RESOURCES = Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@ $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -82,35 +89,39 @@ DOCVIEW_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ -@COND_PLATFORM_MAC_1@__docview___mac_rezcmd = \ -@COND_PLATFORM_MAC_1@ $(RESCOMP) -d __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_PLATFORM_MAC_1@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_PLATFORM_MAC_1@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_PLATFORM_MAC_1@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) \ -@COND_PLATFORM_MAC_1@ $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ -@COND_PLATFORM_MAC_1@ $(__DLLFLAG_p_1) -o docview$(EXEEXT) \ -@COND_PLATFORM_MAC_1@ $(MACOSX_RESOURCES) chart.r doc.r docview.r mondrian.r +COND_PLATFORM_MAC_1___docview___mac_rezcmd = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o docview$(EXEEXT) $(MACOSX_RESOURCES) chart.r doc.r \ + docview.r mondrian.r +@COND_PLATFORM_MAC_1@__docview___mac_rezcmd = $(COND_PLATFORM_MAC_1___docview___mac_rezcmd) @COND_PLATFORM_MAC_1@__docview___mac_setfilecmd = \ @COND_PLATFORM_MAC_1@ $(SETFILE) -a C docview$(EXEEXT) @COND_PLATFORM_WIN32_1@__docview___win32rc = docview_docview_rc.o @@ -121,15 +132,15 @@ all: docview$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f docview$(EXEEXT) distclean: clean rm -f configure config.cache config.log config.status rm -f bk-deps shared-ld-sh -docview$(EXEEXT): docview_docview.o docview_doc.o docview_view.o $(__docview___win32rc) - $(CXX) -o $@ docview_docview.o docview_doc.o docview_view.o $(__docview___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +docview$(EXEEXT): $(DOCVIEW_OBJECTS) $(__docview___win32rc) + $(CXX) -o $@ $(DOCVIEW_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__docview___mac_rezcmd) $(__docview___mac_setfilecmd) diff --git a/samples/docview/makefile.bcc b/samples/docview/makefile.bcc index f010cad7c4..bc06b4fa37 100644 --- a/samples/docview/makefile.bcc +++ b/samples/docview/makefile.bcc @@ -20,12 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -DOCVIEW_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +DOCVIEW_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +DOCVIEW_OBJECTS = \ + $(OBJS)\docview_docview.obj \ + $(OBJS)\docview_doc.obj \ + $(OBJS)\docview_view.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +42,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +57,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +87,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -125,7 +154,7 @@ $(OBJS)\docview_docview.obj: .\docview.cpp $(CXX) -q -c -P -o$@ $(DOCVIEW_CXXFLAGS) $** $(OBJS)\docview_docview.res: .\docview.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** $(OBJS)\docview_view.obj: .\view.cpp $(CXX) -q -c -P -o$@ $(DOCVIEW_CXXFLAGS) $** @@ -135,7 +164,7 @@ clean: -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\docview.exe del $(OBJS)\docview.exe -$(OBJS)\docview.exe: $(OBJS)\docview_docview.obj $(OBJS)\docview_doc.obj $(OBJS)\docview_view.obj $(OBJS)\docview_docview.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\docview_docview.obj $(OBJS)\docview_doc.obj $(OBJS)\docview_view.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\docview_docview.res +$(OBJS)\docview.exe: $(DOCVIEW_OBJECTS) $(OBJS)\docview_docview.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(DOCVIEW_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\docview_docview.res | diff --git a/samples/docview/makefile.gcc b/samples/docview/makefile.gcc index 5acf3d47bd..136c006073 100644 --- a/samples/docview/makefile.gcc +++ b/samples/docview/makefile.gcc @@ -12,8 +12,20 @@ include ../../build/config.gcc ### Variables: ### -DOCVIEW_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DOCVIEW_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +DOCVIEW_OBJECTS = \ + $(OBJS)\docview_docview.o \ + $(OBJS)\docview_doc.o \ + $(OBJS)\docview_view.o \ + $(OBJS)\docview_docview_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +39,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +56,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +93,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +118,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -100,7 +148,7 @@ $(OBJS)\docview_docview.o: .\docview.cpp $(CXX) -c -o $@ $(DOCVIEW_CXXFLAGS) $< $(OBJS)\docview_docview_rc.o: .\docview.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) $(OBJS)\docview_view.o: .\view.cpp $(CXX) -c -o $@ $(DOCVIEW_CXXFLAGS) $< @@ -109,7 +157,7 @@ clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\docview.exe del $(OBJS)\docview.exe -$(OBJS)\docview.exe: $(OBJS)\docview_docview.o $(OBJS)\docview_doc.o $(OBJS)\docview_view.o $(OBJS)\docview_docview_rc.o - $(CXX) -o $@ $(OBJS)\docview_docview.o $(OBJS)\docview_doc.o $(OBJS)\docview_view.o $(OBJS)\docview_docview_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\docview.exe: $(DOCVIEW_OBJECTS) $(OBJS)\docview_docview_rc.o + $(CXX) -o $@ $(DOCVIEW_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/docview/makefile.vc b/samples/docview/makefile.vc index 3cd4a9a22f..e8859e8ac2 100644 --- a/samples/docview/makefile.vc +++ b/samples/docview/makefile.vc @@ -12,8 +12,21 @@ ### Variables: ### -DOCVIEW_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\docview.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DOCVIEW_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\docview.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +DOCVIEW_OBJECTS = \ + $(OBJS)\docview_docview.obj \ + $(OBJS)\docview_doc.obj \ + $(OBJS)\docview_view.obj \ + $(OBJS)\docview_docview.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +36,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +51,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +139,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -127,7 +217,7 @@ $(OBJS)\docview_docview.obj: .\docview.cpp $(CXX) /c /nologo /TP /Fo$@ $(DOCVIEW_CXXFLAGS) $** $(OBJS)\docview_docview.res: .\docview.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** $(OBJS)\docview_view.obj: .\view.cpp $(CXX) /c /nologo /TP /Fo$@ $(DOCVIEW_CXXFLAGS) $** @@ -137,7 +227,7 @@ clean: -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\docview.exe del $(OBJS)\docview.exe -$(OBJS)\docview.exe: $(OBJS)\docview_docview.obj $(OBJS)\docview_doc.obj $(OBJS)\docview_view.obj $(OBJS)\docview_docview.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\docview_docview.obj $(OBJS)\docview_doc.obj $(OBJS)\docview_view.obj $(OBJS)\docview_docview.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\docview.exe: $(DOCVIEW_OBJECTS) $(OBJS)\docview_docview.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(DOCVIEW_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/docview/makefile.wat b/samples/docview/makefile.wat index b92b65cddc..f665585c3c 100644 --- a/samples/docview/makefile.wat +++ b/samples/docview/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,20 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -DOCVIEW_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DOCVIEW_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +DOCVIEW_OBJECTS = & + $(OBJS)\docview_docview.obj & + $(OBJS)\docview_doc.obj & + $(OBJS)\docview_view.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -129,7 +185,7 @@ $(OBJS)\docview_docview.obj : .AUTODEPEND .\docview.cpp $(CXX) -zq -fo=$^@ $(DOCVIEW_CXXFLAGS) $< $(OBJS)\docview_docview.res : .AUTODEPEND .\docview.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< $(OBJS)\docview_view.obj : .AUTODEPEND .\view.cpp $(CXX) -zq -fo=$^@ $(DOCVIEW_CXXFLAGS) $< @@ -141,13 +197,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\docview.exe del $(OBJS)\docview.exe -$(OBJS)\docview.exe : $(OBJS)\docview_docview.obj $(OBJS)\docview_doc.obj $(OBJS)\docview_view.obj $(OBJS)\docview_docview.res +$(OBJS)\docview.exe : $(DOCVIEW_OBJECTS) $(OBJS)\docview_docview.res @%create $(OBJS)\docview.lbc @%append $(OBJS)\docview.lbc option quiet @%append $(OBJS)\docview.lbc name $^@ @%append $(OBJS)\docview.lbc option incremental - @%append $(OBJS)\docview.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\docview_docview.obj $(OBJS)\docview_doc.obj $(OBJS)\docview_view.obj) do @%append $(OBJS)\docview.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\docview.lbc library %i + @%append $(OBJS)\docview.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(DOCVIEW_OBJECTS)) do @%append $(OBJS)\docview.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\docview.lbc library %i @%append $(OBJS)\docview.lbc option resource=$(OBJS)\docview_docview.res wlink @$(OBJS)\docview.lbc diff --git a/samples/docvwmdi/Makefile.in b/samples/docvwmdi/Makefile.in index 5c23bd3e77..bdfd1cc1f6 100644 --- a/samples/docvwmdi/Makefile.in +++ b/samples/docvwmdi/Makefile.in @@ -36,6 +36,12 @@ DOCVIEW_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +DOCVIEW_OBJECTS = \ + docview_docview.o \ + docview_doc.o \ + docview_view.o \ + $(__docview___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +50,8 @@ DOCVIEW_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +87,36 @@ DOCVIEW_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ docview$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o docview$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,15 +131,15 @@ all: docview$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f docview$(EXEEXT) distclean: clean rm -f configure config.cache config.log config.status rm -f bk-deps shared-ld-sh -docview$(EXEEXT): docview_docview.o docview_doc.o docview_view.o $(__docview___win32rc) - $(CXX) -o $@ docview_docview.o docview_doc.o docview_view.o $(__docview___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +docview$(EXEEXT): $(DOCVIEW_OBJECTS) $(__docview___win32rc) + $(CXX) -o $@ $(DOCVIEW_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__docview___mac_rezcmd) $(__docview___mac_setfilecmd) diff --git a/samples/docvwmdi/makefile.bcc b/samples/docvwmdi/makefile.bcc index f010cad7c4..bc06b4fa37 100644 --- a/samples/docvwmdi/makefile.bcc +++ b/samples/docvwmdi/makefile.bcc @@ -20,12 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -DOCVIEW_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +DOCVIEW_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +DOCVIEW_OBJECTS = \ + $(OBJS)\docview_docview.obj \ + $(OBJS)\docview_doc.obj \ + $(OBJS)\docview_view.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +42,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +57,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +87,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -125,7 +154,7 @@ $(OBJS)\docview_docview.obj: .\docview.cpp $(CXX) -q -c -P -o$@ $(DOCVIEW_CXXFLAGS) $** $(OBJS)\docview_docview.res: .\docview.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** $(OBJS)\docview_view.obj: .\view.cpp $(CXX) -q -c -P -o$@ $(DOCVIEW_CXXFLAGS) $** @@ -135,7 +164,7 @@ clean: -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\docview.exe del $(OBJS)\docview.exe -$(OBJS)\docview.exe: $(OBJS)\docview_docview.obj $(OBJS)\docview_doc.obj $(OBJS)\docview_view.obj $(OBJS)\docview_docview.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\docview_docview.obj $(OBJS)\docview_doc.obj $(OBJS)\docview_view.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\docview_docview.res +$(OBJS)\docview.exe: $(DOCVIEW_OBJECTS) $(OBJS)\docview_docview.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(DOCVIEW_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\docview_docview.res | diff --git a/samples/docvwmdi/makefile.gcc b/samples/docvwmdi/makefile.gcc index 5acf3d47bd..136c006073 100644 --- a/samples/docvwmdi/makefile.gcc +++ b/samples/docvwmdi/makefile.gcc @@ -12,8 +12,20 @@ include ../../build/config.gcc ### Variables: ### -DOCVIEW_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DOCVIEW_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +DOCVIEW_OBJECTS = \ + $(OBJS)\docview_docview.o \ + $(OBJS)\docview_doc.o \ + $(OBJS)\docview_view.o \ + $(OBJS)\docview_docview_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +39,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +56,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +93,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +118,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -100,7 +148,7 @@ $(OBJS)\docview_docview.o: .\docview.cpp $(CXX) -c -o $@ $(DOCVIEW_CXXFLAGS) $< $(OBJS)\docview_docview_rc.o: .\docview.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) $(OBJS)\docview_view.o: .\view.cpp $(CXX) -c -o $@ $(DOCVIEW_CXXFLAGS) $< @@ -109,7 +157,7 @@ clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\docview.exe del $(OBJS)\docview.exe -$(OBJS)\docview.exe: $(OBJS)\docview_docview.o $(OBJS)\docview_doc.o $(OBJS)\docview_view.o $(OBJS)\docview_docview_rc.o - $(CXX) -o $@ $(OBJS)\docview_docview.o $(OBJS)\docview_doc.o $(OBJS)\docview_view.o $(OBJS)\docview_docview_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\docview.exe: $(DOCVIEW_OBJECTS) $(OBJS)\docview_docview_rc.o + $(CXX) -o $@ $(DOCVIEW_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/docvwmdi/makefile.vc b/samples/docvwmdi/makefile.vc index 3cd4a9a22f..e8859e8ac2 100644 --- a/samples/docvwmdi/makefile.vc +++ b/samples/docvwmdi/makefile.vc @@ -12,8 +12,21 @@ ### Variables: ### -DOCVIEW_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\docview.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DOCVIEW_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\docview.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +DOCVIEW_OBJECTS = \ + $(OBJS)\docview_docview.obj \ + $(OBJS)\docview_doc.obj \ + $(OBJS)\docview_view.obj \ + $(OBJS)\docview_docview.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +36,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +51,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +139,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -127,7 +217,7 @@ $(OBJS)\docview_docview.obj: .\docview.cpp $(CXX) /c /nologo /TP /Fo$@ $(DOCVIEW_CXXFLAGS) $** $(OBJS)\docview_docview.res: .\docview.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** $(OBJS)\docview_view.obj: .\view.cpp $(CXX) /c /nologo /TP /Fo$@ $(DOCVIEW_CXXFLAGS) $** @@ -137,7 +227,7 @@ clean: -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\docview.exe del $(OBJS)\docview.exe -$(OBJS)\docview.exe: $(OBJS)\docview_docview.obj $(OBJS)\docview_doc.obj $(OBJS)\docview_view.obj $(OBJS)\docview_docview.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\docview_docview.obj $(OBJS)\docview_doc.obj $(OBJS)\docview_view.obj $(OBJS)\docview_docview.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\docview.exe: $(DOCVIEW_OBJECTS) $(OBJS)\docview_docview.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(DOCVIEW_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/docvwmdi/makefile.wat b/samples/docvwmdi/makefile.wat index b92b65cddc..f665585c3c 100644 --- a/samples/docvwmdi/makefile.wat +++ b/samples/docvwmdi/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,20 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -DOCVIEW_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DOCVIEW_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +DOCVIEW_OBJECTS = & + $(OBJS)\docview_docview.obj & + $(OBJS)\docview_doc.obj & + $(OBJS)\docview_view.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -129,7 +185,7 @@ $(OBJS)\docview_docview.obj : .AUTODEPEND .\docview.cpp $(CXX) -zq -fo=$^@ $(DOCVIEW_CXXFLAGS) $< $(OBJS)\docview_docview.res : .AUTODEPEND .\docview.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< $(OBJS)\docview_view.obj : .AUTODEPEND .\view.cpp $(CXX) -zq -fo=$^@ $(DOCVIEW_CXXFLAGS) $< @@ -141,13 +197,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\docview.exe del $(OBJS)\docview.exe -$(OBJS)\docview.exe : $(OBJS)\docview_docview.obj $(OBJS)\docview_doc.obj $(OBJS)\docview_view.obj $(OBJS)\docview_docview.res +$(OBJS)\docview.exe : $(DOCVIEW_OBJECTS) $(OBJS)\docview_docview.res @%create $(OBJS)\docview.lbc @%append $(OBJS)\docview.lbc option quiet @%append $(OBJS)\docview.lbc name $^@ @%append $(OBJS)\docview.lbc option incremental - @%append $(OBJS)\docview.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\docview_docview.obj $(OBJS)\docview_doc.obj $(OBJS)\docview_view.obj) do @%append $(OBJS)\docview.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\docview.lbc library %i + @%append $(OBJS)\docview.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(DOCVIEW_OBJECTS)) do @%append $(OBJS)\docview.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\docview.lbc library %i @%append $(OBJS)\docview.lbc option resource=$(OBJS)\docview_docview.res wlink @$(OBJS)\docview.lbc diff --git a/samples/dragimag/Makefile.in b/samples/dragimag/Makefile.in index 75a36ad013..ed7f61ef77 100644 --- a/samples/dragimag/Makefile.in +++ b/samples/dragimag/Makefile.in @@ -36,6 +36,10 @@ DRAGIMAG_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +DRAGIMAG_OBJECTS = \ + dragimag_dragimag.o \ + $(__dragimag___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ DRAGIMAG_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ DRAGIMAG_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ dragimag$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o dragimag$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: dragimag$(EXEEXT) data clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f dragimag$(EXEEXT) data: @@ -135,8 +144,8 @@ distclean: clean rm -f configure config.cache config.log config.status rm -f bk-deps shared-ld-sh -dragimag$(EXEEXT): dragimag_dragimag.o $(__dragimag___win32rc) - $(CXX) -o $@ dragimag_dragimag.o $(__dragimag___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +dragimag$(EXEEXT): $(DRAGIMAG_OBJECTS) $(__dragimag___win32rc) + $(CXX) -o $@ $(DRAGIMAG_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__dragimag___mac_rezcmd) $(__dragimag___mac_setfilecmd) diff --git a/samples/dragimag/makefile.bcc b/samples/dragimag/makefile.bcc index 58ac63a2e7..c62f0f5309 100644 --- a/samples/dragimag/makefile.bcc +++ b/samples/dragimag/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -DRAGIMAG_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +DRAGIMAG_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +DRAGIMAG_OBJECTS = \ + $(OBJS)\dragimag_dragimag.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,7 +149,7 @@ $(OBJS)\dragimag_dragimag.obj: .\dragimag.cpp $(CXX) -q -c -P -o$@ $(DRAGIMAG_CXXFLAGS) $** $(OBJS)\dragimag_dragimag.res: .\dragimag.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -133,7 +160,7 @@ data: if not exist $(OBJS) mkdir $(OBJS) for %f in (backgrnd.png shape01.png shape02.png shape03.png) do if not exist $(OBJS)\%f copy .\%f $(OBJS) -$(OBJS)\dragimag.exe: $(OBJS)\dragimag_dragimag.obj $(OBJS)\dragimag_dragimag.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\dragimag_dragimag.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\dragimag_dragimag.res +$(OBJS)\dragimag.exe: $(DRAGIMAG_OBJECTS) $(OBJS)\dragimag_dragimag.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(DRAGIMAG_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\dragimag_dragimag.res | diff --git a/samples/dragimag/makefile.gcc b/samples/dragimag/makefile.gcc index ba8b0bd0f0..2831d4ded8 100644 --- a/samples/dragimag/makefile.gcc +++ b/samples/dragimag/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -DRAGIMAG_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DRAGIMAG_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +DRAGIMAG_OBJECTS = \ + $(OBJS)\dragimag_dragimag.o \ + $(OBJS)\dragimag_dragimag_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,7 +143,7 @@ $(OBJS)\dragimag_dragimag.o: .\dragimag.cpp $(CXX) -c -o $@ $(DRAGIMAG_CXXFLAGS) $< $(OBJS)\dragimag_dragimag_rc.o: .\dragimag.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o @@ -107,7 +153,7 @@ data: if not exist $(OBJS) mkdir $(OBJS) for %%f in (backgrnd.png shape01.png shape02.png shape03.png) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS) -$(OBJS)\dragimag.exe: $(OBJS)\dragimag_dragimag.o $(OBJS)\dragimag_dragimag_rc.o - $(CXX) -o $@ $(OBJS)\dragimag_dragimag.o $(OBJS)\dragimag_dragimag_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\dragimag.exe: $(DRAGIMAG_OBJECTS) $(OBJS)\dragimag_dragimag_rc.o + $(CXX) -o $@ $(DRAGIMAG_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/dragimag/makefile.vc b/samples/dragimag/makefile.vc index eb255165c0..75aef44f69 100644 --- a/samples/dragimag/makefile.vc +++ b/samples/dragimag/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -DRAGIMAG_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\dragimag.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DRAGIMAG_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\dragimag.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +DRAGIMAG_OBJECTS = \ + $(OBJS)\dragimag_dragimag.obj \ + $(OBJS)\dragimag_dragimag.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,7 +212,7 @@ $(OBJS)\dragimag_dragimag.obj: .\dragimag.cpp $(CXX) /c /nologo /TP /Fo$@ $(DRAGIMAG_CXXFLAGS) $** $(OBJS)\dragimag_dragimag.res: .\dragimag.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,7 +223,7 @@ data: if not exist $(OBJS) mkdir $(OBJS) for %f in (backgrnd.png shape01.png shape02.png shape03.png) do if not exist $(OBJS)\%f copy .\%f $(OBJS) -$(OBJS)\dragimag.exe: $(OBJS)\dragimag_dragimag.obj $(OBJS)\dragimag_dragimag.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\dragimag_dragimag.obj $(OBJS)\dragimag_dragimag.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\dragimag.exe: $(DRAGIMAG_OBJECTS) $(OBJS)\dragimag_dragimag.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(DRAGIMAG_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/dragimag/makefile.wat b/samples/dragimag/makefile.wat index 0003696fbd..d265d4dc1c 100644 --- a/samples/dragimag/makefile.wat +++ b/samples/dragimag/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -DRAGIMAG_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DRAGIMAG_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +DRAGIMAG_OBJECTS = & + $(OBJS)\dragimag_dragimag.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\dragimag_dragimag.obj : .AUTODEPEND .\dragimag.cpp $(CXX) -zq -fo=$^@ $(DRAGIMAG_CXXFLAGS) $< $(OBJS)\dragimag_dragimag.res : .AUTODEPEND .\dragimag.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -139,13 +193,13 @@ data : if not exist $(OBJS) mkdir $(OBJS) for %f in (backgrnd.png shape01.png shape02.png shape03.png) do if not exist $(OBJS)\%f copy .\%f $(OBJS) -$(OBJS)\dragimag.exe : $(OBJS)\dragimag_dragimag.obj $(OBJS)\dragimag_dragimag.res +$(OBJS)\dragimag.exe : $(DRAGIMAG_OBJECTS) $(OBJS)\dragimag_dragimag.res @%create $(OBJS)\dragimag.lbc @%append $(OBJS)\dragimag.lbc option quiet @%append $(OBJS)\dragimag.lbc name $^@ @%append $(OBJS)\dragimag.lbc option incremental - @%append $(OBJS)\dragimag.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\dragimag_dragimag.obj) do @%append $(OBJS)\dragimag.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\dragimag.lbc library %i + @%append $(OBJS)\dragimag.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(DRAGIMAG_OBJECTS)) do @%append $(OBJS)\dragimag.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\dragimag.lbc library %i @%append $(OBJS)\dragimag.lbc option resource=$(OBJS)\dragimag_dragimag.res wlink @$(OBJS)\dragimag.lbc diff --git a/samples/drawing/Makefile.in b/samples/drawing/Makefile.in index edfc05e4e2..d27afc2d94 100644 --- a/samples/drawing/Makefile.in +++ b/samples/drawing/Makefile.in @@ -36,6 +36,10 @@ DRAWING_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +DRAWING_OBJECTS = \ + drawing_drawing.o \ + $(__drawing___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ DRAWING_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ DRAWING_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ drawing$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o drawing$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: drawing$(EXEEXT) data clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f drawing$(EXEEXT) data: @@ -135,8 +144,8 @@ distclean: clean rm -f configure config.cache config.log config.status rm -f bk-deps shared-ld-sh -drawing$(EXEEXT): drawing_drawing.o $(__drawing___win32rc) - $(CXX) -o $@ drawing_drawing.o $(__drawing___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +drawing$(EXEEXT): $(DRAWING_OBJECTS) $(__drawing___win32rc) + $(CXX) -o $@ $(DRAWING_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__drawing___mac_rezcmd) $(__drawing___mac_setfilecmd) diff --git a/samples/drawing/makefile.bcc b/samples/drawing/makefile.bcc index e40495de8e..b5ed70faec 100644 --- a/samples/drawing/makefile.bcc +++ b/samples/drawing/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -DRAWING_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +DRAWING_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +DRAWING_OBJECTS = \ + $(OBJS)\drawing_drawing.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,7 +149,7 @@ $(OBJS)\drawing_drawing.obj: .\drawing.cpp $(CXX) -q -c -P -o$@ $(DRAWING_CXXFLAGS) $** $(OBJS)\drawing_drawing.res: .\drawing.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -133,7 +160,7 @@ data: if not exist $(OBJS) mkdir $(OBJS) for %f in (pat4.bmp pat35.bmp pat36.bmp image.bmp mask.bmp) do if not exist $(OBJS)\%f copy .\%f $(OBJS) -$(OBJS)\drawing.exe: $(OBJS)\drawing_drawing.obj $(OBJS)\drawing_drawing.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\drawing_drawing.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\drawing_drawing.res +$(OBJS)\drawing.exe: $(DRAWING_OBJECTS) $(OBJS)\drawing_drawing.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(DRAWING_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\drawing_drawing.res | diff --git a/samples/drawing/makefile.gcc b/samples/drawing/makefile.gcc index 96f43e5d26..354215ffb3 100644 --- a/samples/drawing/makefile.gcc +++ b/samples/drawing/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -DRAWING_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DRAWING_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +DRAWING_OBJECTS = \ + $(OBJS)\drawing_drawing.o \ + $(OBJS)\drawing_drawing_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,7 +143,7 @@ $(OBJS)\drawing_drawing.o: .\drawing.cpp $(CXX) -c -o $@ $(DRAWING_CXXFLAGS) $< $(OBJS)\drawing_drawing_rc.o: .\drawing.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o @@ -107,7 +153,7 @@ data: if not exist $(OBJS) mkdir $(OBJS) for %%f in (pat4.bmp pat35.bmp pat36.bmp image.bmp mask.bmp) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS) -$(OBJS)\drawing.exe: $(OBJS)\drawing_drawing.o $(OBJS)\drawing_drawing_rc.o - $(CXX) -o $@ $(OBJS)\drawing_drawing.o $(OBJS)\drawing_drawing_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\drawing.exe: $(DRAWING_OBJECTS) $(OBJS)\drawing_drawing_rc.o + $(CXX) -o $@ $(DRAWING_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/drawing/makefile.vc b/samples/drawing/makefile.vc index a4d6520b15..0dc392ac61 100644 --- a/samples/drawing/makefile.vc +++ b/samples/drawing/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -DRAWING_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\drawing.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DRAWING_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\drawing.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +DRAWING_OBJECTS = \ + $(OBJS)\drawing_drawing.obj \ + $(OBJS)\drawing_drawing.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,7 +212,7 @@ $(OBJS)\drawing_drawing.obj: .\drawing.cpp $(CXX) /c /nologo /TP /Fo$@ $(DRAWING_CXXFLAGS) $** $(OBJS)\drawing_drawing.res: .\drawing.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,7 +223,7 @@ data: if not exist $(OBJS) mkdir $(OBJS) for %f in (pat4.bmp pat35.bmp pat36.bmp image.bmp mask.bmp) do if not exist $(OBJS)\%f copy .\%f $(OBJS) -$(OBJS)\drawing.exe: $(OBJS)\drawing_drawing.obj $(OBJS)\drawing_drawing.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\drawing_drawing.obj $(OBJS)\drawing_drawing.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\drawing.exe: $(DRAWING_OBJECTS) $(OBJS)\drawing_drawing.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(DRAWING_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/drawing/makefile.wat b/samples/drawing/makefile.wat index ac2cd4bd84..319e50b658 100644 --- a/samples/drawing/makefile.wat +++ b/samples/drawing/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -DRAWING_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DRAWING_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +DRAWING_OBJECTS = & + $(OBJS)\drawing_drawing.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\drawing_drawing.obj : .AUTODEPEND .\drawing.cpp $(CXX) -zq -fo=$^@ $(DRAWING_CXXFLAGS) $< $(OBJS)\drawing_drawing.res : .AUTODEPEND .\drawing.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -139,13 +193,13 @@ data : if not exist $(OBJS) mkdir $(OBJS) for %f in (pat4.bmp pat35.bmp pat36.bmp image.bmp mask.bmp) do if not exist $(OBJS)\%f copy .\%f $(OBJS) -$(OBJS)\drawing.exe : $(OBJS)\drawing_drawing.obj $(OBJS)\drawing_drawing.res +$(OBJS)\drawing.exe : $(DRAWING_OBJECTS) $(OBJS)\drawing_drawing.res @%create $(OBJS)\drawing.lbc @%append $(OBJS)\drawing.lbc option quiet @%append $(OBJS)\drawing.lbc name $^@ @%append $(OBJS)\drawing.lbc option incremental - @%append $(OBJS)\drawing.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\drawing_drawing.obj) do @%append $(OBJS)\drawing.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\drawing.lbc library %i + @%append $(OBJS)\drawing.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(DRAWING_OBJECTS)) do @%append $(OBJS)\drawing.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\drawing.lbc library %i @%append $(OBJS)\drawing.lbc option resource=$(OBJS)\drawing_drawing.res wlink @$(OBJS)\drawing.lbc diff --git a/samples/dynamic/Makefile.in b/samples/dynamic/Makefile.in index 634d7c88dc..8289af0d0c 100644 --- a/samples/dynamic/Makefile.in +++ b/samples/dynamic/Makefile.in @@ -36,6 +36,10 @@ DYNAMIC_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +DYNAMIC_OBJECTS = \ + dynamic_dynamic.o \ + $(__dynamic___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ DYNAMIC_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ DYNAMIC_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ dynamic$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o dynamic$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,15 +129,15 @@ all: dynamic$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f dynamic$(EXEEXT) distclean: clean rm -f configure config.cache config.log config.status rm -f bk-deps shared-ld-sh -dynamic$(EXEEXT): dynamic_dynamic.o $(__dynamic___win32rc) - $(CXX) -o $@ dynamic_dynamic.o $(__dynamic___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +dynamic$(EXEEXT): $(DYNAMIC_OBJECTS) $(__dynamic___win32rc) + $(CXX) -o $@ $(DYNAMIC_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__dynamic___mac_rezcmd) $(__dynamic___mac_setfilecmd) diff --git a/samples/dynamic/makefile.bcc b/samples/dynamic/makefile.bcc index 855edeecc5..9f26e8d4f7 100644 --- a/samples/dynamic/makefile.bcc +++ b/samples/dynamic/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -DYNAMIC_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +DYNAMIC_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +DYNAMIC_OBJECTS = \ + $(OBJS)\dynamic_dynamic.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\dynamic_dynamic.obj: .\dynamic.cpp $(CXX) -q -c -P -o$@ $(DYNAMIC_CXXFLAGS) $** $(OBJS)\dynamic_dynamic.res: .\dynamic.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\dynamic.exe del $(OBJS)\dynamic.exe -$(OBJS)\dynamic.exe: $(OBJS)\dynamic_dynamic.obj $(OBJS)\dynamic_dynamic.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\dynamic_dynamic.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\dynamic_dynamic.res +$(OBJS)\dynamic.exe: $(DYNAMIC_OBJECTS) $(OBJS)\dynamic_dynamic.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(DYNAMIC_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\dynamic_dynamic.res | diff --git a/samples/dynamic/makefile.gcc b/samples/dynamic/makefile.gcc index 28062fbdcb..24a3ea04ac 100644 --- a/samples/dynamic/makefile.gcc +++ b/samples/dynamic/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -DYNAMIC_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DYNAMIC_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +DYNAMIC_OBJECTS = \ + $(OBJS)\dynamic_dynamic.o \ + $(OBJS)\dynamic_dynamic_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\dynamic_dynamic.o: .\dynamic.cpp $(CXX) -c -o $@ $(DYNAMIC_CXXFLAGS) $< $(OBJS)\dynamic_dynamic_rc.o: .\dynamic.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\dynamic.exe del $(OBJS)\dynamic.exe -$(OBJS)\dynamic.exe: $(OBJS)\dynamic_dynamic.o $(OBJS)\dynamic_dynamic_rc.o - $(CXX) -o $@ $(OBJS)\dynamic_dynamic.o $(OBJS)\dynamic_dynamic_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\dynamic.exe: $(DYNAMIC_OBJECTS) $(OBJS)\dynamic_dynamic_rc.o + $(CXX) -o $@ $(DYNAMIC_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/dynamic/makefile.vc b/samples/dynamic/makefile.vc index 951dd9d6a7..8cae33b475 100644 --- a/samples/dynamic/makefile.vc +++ b/samples/dynamic/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -DYNAMIC_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\dynamic.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DYNAMIC_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\dynamic.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +DYNAMIC_OBJECTS = \ + $(OBJS)\dynamic_dynamic.obj \ + $(OBJS)\dynamic_dynamic.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\dynamic_dynamic.obj: .\dynamic.cpp $(CXX) /c /nologo /TP /Fo$@ $(DYNAMIC_CXXFLAGS) $** $(OBJS)\dynamic_dynamic.res: .\dynamic.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\dynamic.exe del $(OBJS)\dynamic.exe -$(OBJS)\dynamic.exe: $(OBJS)\dynamic_dynamic.obj $(OBJS)\dynamic_dynamic.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\dynamic_dynamic.obj $(OBJS)\dynamic_dynamic.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\dynamic.exe: $(DYNAMIC_OBJECTS) $(OBJS)\dynamic_dynamic.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(DYNAMIC_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/dynamic/makefile.wat b/samples/dynamic/makefile.wat index defd67e76b..1bbc3c888c 100644 --- a/samples/dynamic/makefile.wat +++ b/samples/dynamic/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -DYNAMIC_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +DYNAMIC_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +DYNAMIC_OBJECTS = & + $(OBJS)\dynamic_dynamic.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\dynamic_dynamic.obj : .AUTODEPEND .\dynamic.cpp $(CXX) -zq -fo=$^@ $(DYNAMIC_CXXFLAGS) $< $(OBJS)\dynamic_dynamic.res : .AUTODEPEND .\dynamic.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\dynamic.exe del $(OBJS)\dynamic.exe -$(OBJS)\dynamic.exe : $(OBJS)\dynamic_dynamic.obj $(OBJS)\dynamic_dynamic.res +$(OBJS)\dynamic.exe : $(DYNAMIC_OBJECTS) $(OBJS)\dynamic_dynamic.res @%create $(OBJS)\dynamic.lbc @%append $(OBJS)\dynamic.lbc option quiet @%append $(OBJS)\dynamic.lbc name $^@ @%append $(OBJS)\dynamic.lbc option incremental - @%append $(OBJS)\dynamic.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\dynamic_dynamic.obj) do @%append $(OBJS)\dynamic.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\dynamic.lbc library %i + @%append $(OBJS)\dynamic.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(DYNAMIC_OBJECTS)) do @%append $(OBJS)\dynamic.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\dynamic.lbc library %i @%append $(OBJS)\dynamic.lbc option resource=$(OBJS)\dynamic_dynamic.res wlink @$(OBJS)\dynamic.lbc diff --git a/samples/erase/Makefile.in b/samples/erase/Makefile.in index d5f6323028..ba6264e45e 100644 --- a/samples/erase/Makefile.in +++ b/samples/erase/Makefile.in @@ -36,6 +36,10 @@ ERASE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +ERASE_OBJECTS = \ + erase_erase.o \ + $(__erase___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ ERASE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ ERASE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ erase$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o erase$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,15 +129,15 @@ all: erase$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f erase$(EXEEXT) distclean: clean rm -f configure config.cache config.log config.status rm -f bk-deps shared-ld-sh -erase$(EXEEXT): erase_erase.o $(__erase___win32rc) - $(CXX) -o $@ erase_erase.o $(__erase___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +erase$(EXEEXT): $(ERASE_OBJECTS) $(__erase___win32rc) + $(CXX) -o $@ $(ERASE_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__erase___mac_rezcmd) $(__erase___mac_setfilecmd) diff --git a/samples/erase/makefile.bcc b/samples/erase/makefile.bcc index c532b310fb..0cea99499a 100644 --- a/samples/erase/makefile.bcc +++ b/samples/erase/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -ERASE_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +ERASE_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +ERASE_OBJECTS = \ + $(OBJS)\erase_erase.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\erase_erase.obj: .\erase.cpp $(CXX) -q -c -P -o$@ $(ERASE_CXXFLAGS) $** $(OBJS)\erase_erase.res: .\erase.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\erase.exe del $(OBJS)\erase.exe -$(OBJS)\erase.exe: $(OBJS)\erase_erase.obj $(OBJS)\erase_erase.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\erase_erase.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\erase_erase.res +$(OBJS)\erase.exe: $(ERASE_OBJECTS) $(OBJS)\erase_erase.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(ERASE_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\erase_erase.res | diff --git a/samples/erase/makefile.gcc b/samples/erase/makefile.gcc index b5605063aa..a9d9cf5911 100644 --- a/samples/erase/makefile.gcc +++ b/samples/erase/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -ERASE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +ERASE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +ERASE_OBJECTS = \ + $(OBJS)\erase_erase.o \ + $(OBJS)\erase_erase_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\erase_erase.o: .\erase.cpp $(CXX) -c -o $@ $(ERASE_CXXFLAGS) $< $(OBJS)\erase_erase_rc.o: .\erase.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\erase.exe del $(OBJS)\erase.exe -$(OBJS)\erase.exe: $(OBJS)\erase_erase.o $(OBJS)\erase_erase_rc.o - $(CXX) -o $@ $(OBJS)\erase_erase.o $(OBJS)\erase_erase_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\erase.exe: $(ERASE_OBJECTS) $(OBJS)\erase_erase_rc.o + $(CXX) -o $@ $(ERASE_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/erase/makefile.vc b/samples/erase/makefile.vc index 9d0d6d3949..06ed6c76dc 100644 --- a/samples/erase/makefile.vc +++ b/samples/erase/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -ERASE_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\erase.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +ERASE_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) /DWIN32 \ + $(__DEBUGINFO_0) /Fd$(OBJS)\erase.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +ERASE_OBJECTS = \ + $(OBJS)\erase_erase.obj \ + $(OBJS)\erase_erase.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\erase_erase.obj: .\erase.cpp $(CXX) /c /nologo /TP /Fo$@ $(ERASE_CXXFLAGS) $** $(OBJS)\erase_erase.res: .\erase.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\erase.exe del $(OBJS)\erase.exe -$(OBJS)\erase.exe: $(OBJS)\erase_erase.obj $(OBJS)\erase_erase.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\erase_erase.obj $(OBJS)\erase_erase.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\erase.exe: $(ERASE_OBJECTS) $(OBJS)\erase_erase.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(ERASE_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/erase/makefile.wat b/samples/erase/makefile.wat index a5e788594c..208e72f14e 100644 --- a/samples/erase/makefile.wat +++ b/samples/erase/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -ERASE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +ERASE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +ERASE_OBJECTS = & + $(OBJS)\erase_erase.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\erase_erase.obj : .AUTODEPEND .\erase.cpp $(CXX) -zq -fo=$^@ $(ERASE_CXXFLAGS) $< $(OBJS)\erase_erase.res : .AUTODEPEND .\erase.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\erase.exe del $(OBJS)\erase.exe -$(OBJS)\erase.exe : $(OBJS)\erase_erase.obj $(OBJS)\erase_erase.res +$(OBJS)\erase.exe : $(ERASE_OBJECTS) $(OBJS)\erase_erase.res @%create $(OBJS)\erase.lbc @%append $(OBJS)\erase.lbc option quiet @%append $(OBJS)\erase.lbc name $^@ @%append $(OBJS)\erase.lbc option incremental - @%append $(OBJS)\erase.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\erase_erase.obj) do @%append $(OBJS)\erase.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\erase.lbc library %i + @%append $(OBJS)\erase.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(ERASE_OBJECTS)) do @%append $(OBJS)\erase.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\erase.lbc library %i @%append $(OBJS)\erase.lbc option resource=$(OBJS)\erase_erase.res wlink @$(OBJS)\erase.lbc diff --git a/samples/event/Makefile.in b/samples/event/Makefile.in index f6cb987444..1d5ddfc1d7 100644 --- a/samples/event/Makefile.in +++ b/samples/event/Makefile.in @@ -36,6 +36,10 @@ EVENT_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +EVENT_OBJECTS = \ + event_event.o \ + $(__event___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ EVENT_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ EVENT_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ event$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o event$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,15 +129,15 @@ all: event$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f event$(EXEEXT) distclean: clean rm -f configure config.cache config.log config.status rm -f bk-deps shared-ld-sh -event$(EXEEXT): event_event.o $(__event___win32rc) - $(CXX) -o $@ event_event.o $(__event___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +event$(EXEEXT): $(EVENT_OBJECTS) $(__event___win32rc) + $(CXX) -o $@ $(EVENT_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__event___mac_rezcmd) $(__event___mac_setfilecmd) diff --git a/samples/event/makefile.bcc b/samples/event/makefile.bcc index 14250995ff..9c2ef95264 100644 --- a/samples/event/makefile.bcc +++ b/samples/event/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -EVENT_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +EVENT_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +EVENT_OBJECTS = \ + $(OBJS)\event_event.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\event_event.obj: .\event.cpp $(CXX) -q -c -P -o$@ $(EVENT_CXXFLAGS) $** $(OBJS)\event_event.res: .\event.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\event.exe del $(OBJS)\event.exe -$(OBJS)\event.exe: $(OBJS)\event_event.obj $(OBJS)\event_event.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\event_event.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\event_event.res +$(OBJS)\event.exe: $(EVENT_OBJECTS) $(OBJS)\event_event.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(EVENT_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\event_event.res | diff --git a/samples/event/makefile.gcc b/samples/event/makefile.gcc index 9e419d1e73..dfd3a1214e 100644 --- a/samples/event/makefile.gcc +++ b/samples/event/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -EVENT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +EVENT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +EVENT_OBJECTS = \ + $(OBJS)\event_event.o \ + $(OBJS)\event_event_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\event_event.o: .\event.cpp $(CXX) -c -o $@ $(EVENT_CXXFLAGS) $< $(OBJS)\event_event_rc.o: .\event.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\event.exe del $(OBJS)\event.exe -$(OBJS)\event.exe: $(OBJS)\event_event.o $(OBJS)\event_event_rc.o - $(CXX) -o $@ $(OBJS)\event_event.o $(OBJS)\event_event_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\event.exe: $(EVENT_OBJECTS) $(OBJS)\event_event_rc.o + $(CXX) -o $@ $(EVENT_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/event/makefile.vc b/samples/event/makefile.vc index ebfcc8cec5..e2c4117a8f 100644 --- a/samples/event/makefile.vc +++ b/samples/event/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -EVENT_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\event.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +EVENT_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) /DWIN32 \ + $(__DEBUGINFO_0) /Fd$(OBJS)\event.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +EVENT_OBJECTS = \ + $(OBJS)\event_event.obj \ + $(OBJS)\event_event.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\event_event.obj: .\event.cpp $(CXX) /c /nologo /TP /Fo$@ $(EVENT_CXXFLAGS) $** $(OBJS)\event_event.res: .\event.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\event.exe del $(OBJS)\event.exe -$(OBJS)\event.exe: $(OBJS)\event_event.obj $(OBJS)\event_event.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\event_event.obj $(OBJS)\event_event.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\event.exe: $(EVENT_OBJECTS) $(OBJS)\event_event.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(EVENT_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/event/makefile.wat b/samples/event/makefile.wat index 84bfcbc187..703e1786a0 100644 --- a/samples/event/makefile.wat +++ b/samples/event/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -EVENT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +EVENT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +EVENT_OBJECTS = & + $(OBJS)\event_event.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\event_event.obj : .AUTODEPEND .\event.cpp $(CXX) -zq -fo=$^@ $(EVENT_CXXFLAGS) $< $(OBJS)\event_event.res : .AUTODEPEND .\event.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\event.exe del $(OBJS)\event.exe -$(OBJS)\event.exe : $(OBJS)\event_event.obj $(OBJS)\event_event.res +$(OBJS)\event.exe : $(EVENT_OBJECTS) $(OBJS)\event_event.res @%create $(OBJS)\event.lbc @%append $(OBJS)\event.lbc option quiet @%append $(OBJS)\event.lbc name $^@ @%append $(OBJS)\event.lbc option incremental - @%append $(OBJS)\event.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\event_event.obj) do @%append $(OBJS)\event.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\event.lbc library %i + @%append $(OBJS)\event.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(EVENT_OBJECTS)) do @%append $(OBJS)\event.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\event.lbc library %i @%append $(OBJS)\event.lbc option resource=$(OBJS)\event_event.res wlink @$(OBJS)\event.lbc diff --git a/samples/htlbox/Makefile.in b/samples/htlbox/Makefile.in index 63143ccc94..b9c88bba15 100644 --- a/samples/htlbox/Makefile.in +++ b/samples/htlbox/Makefile.in @@ -36,6 +36,10 @@ HTLBOX_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +HTLBOX_OBJECTS = \ + htlbox_htlbox.o \ + $(__htlbox___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ HTLBOX_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,34 +85,39 @@ HTLBOX_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ htlbox$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o htlbox$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_HTML_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_html-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_0___WXLIB_HTML_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_html-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_HTML_p = $(COND_MONOLITHIC_0___WXLIB_HTML_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -122,15 +132,15 @@ all: htlbox$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f htlbox$(EXEEXT) distclean: clean rm -f configure config.cache config.log config.status rm -f bk-deps shared-ld-sh -htlbox$(EXEEXT): htlbox_htlbox.o $(__htlbox___win32rc) - $(CXX) -o $@ htlbox_htlbox.o $(__htlbox___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +htlbox$(EXEEXT): $(HTLBOX_OBJECTS) $(__htlbox___win32rc) + $(CXX) -o $@ $(HTLBOX_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__htlbox___mac_rezcmd) $(__htlbox___mac_setfilecmd) diff --git a/samples/htlbox/makefile.bcc b/samples/htlbox/makefile.bcc index e74bb89b0c..d0e682d74c 100644 --- a/samples/htlbox/makefile.bcc +++ b/samples/htlbox/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -HTLBOX_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +HTLBOX_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +HTLBOX_OBJECTS = \ + $(OBJS)\htlbox_htlbox.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -126,14 +153,14 @@ $(OBJS)\htlbox_htlbox.obj: .\htlbox.cpp $(CXX) -q -c -P -o$@ $(HTLBOX_CXXFLAGS) $** $(OBJS)\htlbox_htlbox.res: .\htlbox.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\htlbox.exe del $(OBJS)\htlbox.exe -$(OBJS)\htlbox.exe: $(OBJS)\htlbox_htlbox.obj $(OBJS)\htlbox_htlbox.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\htlbox_htlbox.obj,$@,, $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\htlbox_htlbox.res +$(OBJS)\htlbox.exe: $(HTLBOX_OBJECTS) $(OBJS)\htlbox_htlbox.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(HTLBOX_OBJECTS),$@,, $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\htlbox_htlbox.res | diff --git a/samples/htlbox/makefile.gcc b/samples/htlbox/makefile.gcc index 169767a1a3..362761652c 100644 --- a/samples/htlbox/makefile.gcc +++ b/samples/htlbox/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -HTLBOX_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +HTLBOX_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +HTLBOX_OBJECTS = \ + $(OBJS)\htlbox_htlbox.o \ + $(OBJS)\htlbox_htlbox_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,13 +116,16 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),0) -__WXLIB_HTML_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_html +__WXLIB_HTML_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_html endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -100,13 +147,13 @@ $(OBJS)\htlbox_htlbox.o: .\htlbox.cpp $(CXX) -c -o $@ $(HTLBOX_CXXFLAGS) $< $(OBJS)\htlbox_htlbox_rc.o: .\htlbox.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\htlbox.exe del $(OBJS)\htlbox.exe -$(OBJS)\htlbox.exe: $(OBJS)\htlbox_htlbox.o $(OBJS)\htlbox_htlbox_rc.o - $(CXX) -o $@ $(OBJS)\htlbox_htlbox.o $(OBJS)\htlbox_htlbox_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\htlbox.exe: $(HTLBOX_OBJECTS) $(OBJS)\htlbox_htlbox_rc.o + $(CXX) -o $@ $(HTLBOX_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/htlbox/makefile.vc b/samples/htlbox/makefile.vc index 8ece86b0ca..6d231be3fd 100644 --- a/samples/htlbox/makefile.vc +++ b/samples/htlbox/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -HTLBOX_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\htlbox.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +HTLBOX_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) /DWIN32 \ + $(__DEBUGINFO_0) /Fd$(OBJS)\htlbox.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +HTLBOX_OBJECTS = \ + $(OBJS)\htlbox_htlbox.obj \ + $(OBJS)\htlbox_htlbox.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,37 +137,70 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_HTML_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_html.lib +__WXLIB_HTML_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_html.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -127,14 +216,14 @@ $(OBJS)\htlbox_htlbox.obj: .\htlbox.cpp $(CXX) /c /nologo /TP /Fo$@ $(HTLBOX_CXXFLAGS) $** $(OBJS)\htlbox_htlbox.res: .\htlbox.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\htlbox.exe del $(OBJS)\htlbox.exe -$(OBJS)\htlbox.exe: $(OBJS)\htlbox_htlbox.obj $(OBJS)\htlbox_htlbox.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\htlbox_htlbox.obj $(OBJS)\htlbox_htlbox.res $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\htlbox.exe: $(HTLBOX_OBJECTS) $(OBJS)\htlbox_htlbox.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(HTLBOX_OBJECTS) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/htlbox/makefile.wat b/samples/htlbox/makefile.wat index e5eeb234ea..b1b1ba029c 100644 --- a/samples/htlbox/makefile.wat +++ b/samples/htlbox/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,15 +138,18 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_HTML_p = !ifeq MONOLITHIC 0 -__WXLIB_HTML_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_html.lib +__WXLIB_HTML_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_html.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -113,8 +158,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -HTLBOX_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +HTLBOX_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +HTLBOX_OBJECTS = & + $(OBJS)\htlbox_htlbox.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -130,7 +185,7 @@ $(OBJS)\htlbox_htlbox.obj : .AUTODEPEND .\htlbox.cpp $(CXX) -zq -fo=$^@ $(HTLBOX_CXXFLAGS) $< $(OBJS)\htlbox_htlbox.res : .AUTODEPEND .\htlbox.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -139,13 +194,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\htlbox.exe del $(OBJS)\htlbox.exe -$(OBJS)\htlbox.exe : $(OBJS)\htlbox_htlbox.obj $(OBJS)\htlbox_htlbox.res +$(OBJS)\htlbox.exe : $(HTLBOX_OBJECTS) $(OBJS)\htlbox_htlbox.res @%create $(OBJS)\htlbox.lbc @%append $(OBJS)\htlbox.lbc option quiet @%append $(OBJS)\htlbox.lbc name $^@ @%append $(OBJS)\htlbox.lbc option incremental - @%append $(OBJS)\htlbox.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\htlbox_htlbox.obj) do @%append $(OBJS)\htlbox.lbc file %i - @for %i in ( $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\htlbox.lbc library %i + @%append $(OBJS)\htlbox.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(HTLBOX_OBJECTS)) do @%append $(OBJS)\htlbox.lbc file %i + @for %i in ( $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\htlbox.lbc library %i @%append $(OBJS)\htlbox.lbc option resource=$(OBJS)\htlbox_htlbox.res wlink @$(OBJS)\htlbox.lbc diff --git a/samples/image/Makefile.in b/samples/image/Makefile.in index 6baf41b4d9..ffaed46304 100644 --- a/samples/image/Makefile.in +++ b/samples/image/Makefile.in @@ -36,6 +36,10 @@ IMAGE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +IMAGE_OBJECTS = \ + image_image.o \ + $(__image___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ IMAGE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ IMAGE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ image$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o image$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: image$(EXEEXT) data clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f image$(EXEEXT) data: @@ -135,8 +144,8 @@ distclean: clean rm -f configure config.cache config.log config.status rm -f bk-deps shared-ld-sh -image$(EXEEXT): image_image.o $(__image___win32rc) - $(CXX) -o $@ image_image.o $(__image___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +image$(EXEEXT): $(IMAGE_OBJECTS) $(__image___win32rc) + $(CXX) -o $@ $(IMAGE_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__image___mac_rezcmd) $(__image___mac_setfilecmd) diff --git a/samples/image/makefile.bcc b/samples/image/makefile.bcc index 78304c0a13..f7ab0d08ef 100644 --- a/samples/image/makefile.bcc +++ b/samples/image/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -IMAGE_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +IMAGE_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +IMAGE_OBJECTS = \ + $(OBJS)\image_image.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,7 +149,7 @@ $(OBJS)\image_image.obj: .\image.cpp $(CXX) -q -c -P -o$@ $(IMAGE_CXXFLAGS) $** $(OBJS)\image_image.res: .\image.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -133,7 +160,7 @@ data: if not exist $(OBJS) mkdir $(OBJS) for %f in (horse.png horse.jpg horse.bmp horse.gif horse.pcx horse.pnm horse.tif horse.xpm horse.cur horse.ico horse3.ani smile.xbm) do if not exist $(OBJS)\%f copy .\%f $(OBJS) -$(OBJS)\image.exe: $(OBJS)\image_image.obj $(OBJS)\image_image.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\image_image.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\image_image.res +$(OBJS)\image.exe: $(IMAGE_OBJECTS) $(OBJS)\image_image.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(IMAGE_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\image_image.res | diff --git a/samples/image/makefile.gcc b/samples/image/makefile.gcc index d38774edf8..a0236a5744 100644 --- a/samples/image/makefile.gcc +++ b/samples/image/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -IMAGE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +IMAGE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +IMAGE_OBJECTS = \ + $(OBJS)\image_image.o \ + $(OBJS)\image_image_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,7 +143,7 @@ $(OBJS)\image_image.o: .\image.cpp $(CXX) -c -o $@ $(IMAGE_CXXFLAGS) $< $(OBJS)\image_image_rc.o: .\image.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o @@ -107,7 +153,7 @@ data: if not exist $(OBJS) mkdir $(OBJS) for %%f in (horse.png horse.jpg horse.bmp horse.gif horse.pcx horse.pnm horse.tif horse.xpm horse.cur horse.ico horse3.ani smile.xbm) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS) -$(OBJS)\image.exe: $(OBJS)\image_image.o $(OBJS)\image_image_rc.o - $(CXX) -o $@ $(OBJS)\image_image.o $(OBJS)\image_image_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\image.exe: $(IMAGE_OBJECTS) $(OBJS)\image_image_rc.o + $(CXX) -o $@ $(IMAGE_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/image/makefile.vc b/samples/image/makefile.vc index 3a7fa3e228..0e0b9f6ec7 100644 --- a/samples/image/makefile.vc +++ b/samples/image/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -IMAGE_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\image.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +IMAGE_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) /DWIN32 \ + $(__DEBUGINFO_0) /Fd$(OBJS)\image.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +IMAGE_OBJECTS = \ + $(OBJS)\image_image.obj \ + $(OBJS)\image_image.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,7 +212,7 @@ $(OBJS)\image_image.obj: .\image.cpp $(CXX) /c /nologo /TP /Fo$@ $(IMAGE_CXXFLAGS) $** $(OBJS)\image_image.res: .\image.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,7 +223,7 @@ data: if not exist $(OBJS) mkdir $(OBJS) for %f in (horse.png horse.jpg horse.bmp horse.gif horse.pcx horse.pnm horse.tif horse.xpm horse.cur horse.ico horse3.ani smile.xbm) do if not exist $(OBJS)\%f copy .\%f $(OBJS) -$(OBJS)\image.exe: $(OBJS)\image_image.obj $(OBJS)\image_image.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\image_image.obj $(OBJS)\image_image.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\image.exe: $(IMAGE_OBJECTS) $(OBJS)\image_image.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(IMAGE_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/image/makefile.wat b/samples/image/makefile.wat index 6c0df61f4b..a202edb28f 100644 --- a/samples/image/makefile.wat +++ b/samples/image/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -IMAGE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +IMAGE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +IMAGE_OBJECTS = & + $(OBJS)\image_image.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\image_image.obj : .AUTODEPEND .\image.cpp $(CXX) -zq -fo=$^@ $(IMAGE_CXXFLAGS) $< $(OBJS)\image_image.res : .AUTODEPEND .\image.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -139,13 +193,13 @@ data : if not exist $(OBJS) mkdir $(OBJS) for %f in (horse.png horse.jpg horse.bmp horse.gif horse.pcx horse.pnm horse.tif horse.xpm horse.cur horse.ico horse3.ani smile.xbm) do if not exist $(OBJS)\%f copy .\%f $(OBJS) -$(OBJS)\image.exe : $(OBJS)\image_image.obj $(OBJS)\image_image.res +$(OBJS)\image.exe : $(IMAGE_OBJECTS) $(OBJS)\image_image.res @%create $(OBJS)\image.lbc @%append $(OBJS)\image.lbc option quiet @%append $(OBJS)\image.lbc name $^@ @%append $(OBJS)\image.lbc option incremental - @%append $(OBJS)\image.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\image_image.obj) do @%append $(OBJS)\image.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\image.lbc library %i + @%append $(OBJS)\image.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(IMAGE_OBJECTS)) do @%append $(OBJS)\image.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\image.lbc library %i @%append $(OBJS)\image.lbc option resource=$(OBJS)\image_image.res wlink @$(OBJS)\image.lbc diff --git a/samples/internat/Makefile.in b/samples/internat/Makefile.in index c8b1654f52..9085197923 100644 --- a/samples/internat/Makefile.in +++ b/samples/internat/Makefile.in @@ -36,6 +36,10 @@ INTERNAT_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +INTERNAT_OBJECTS = \ + internat_internat.o \ + $(__internat___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ INTERNAT_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ INTERNAT_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ internat$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o internat$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: internat$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f internat$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -internat$(EXEEXT): internat_internat.o $(__internat___win32rc) - $(CXX) -o $@ internat_internat.o $(__internat___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +internat$(EXEEXT): $(INTERNAT_OBJECTS) $(__internat___win32rc) + $(CXX) -o $@ $(INTERNAT_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__internat___mac_rezcmd) $(__internat___mac_setfilecmd) diff --git a/samples/internat/makefile.bcc b/samples/internat/makefile.bcc index 6aab07abd1..7e5d2b4f92 100644 --- a/samples/internat/makefile.bcc +++ b/samples/internat/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -INTERNAT_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +INTERNAT_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +INTERNAT_OBJECTS = \ + $(OBJS)\internat_internat.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\internat_internat.obj: .\internat.cpp $(CXX) -q -c -P -o$@ $(INTERNAT_CXXFLAGS) $** $(OBJS)\internat_internat.res: .\internat.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\internat.exe del $(OBJS)\internat.exe -$(OBJS)\internat.exe: $(OBJS)\internat_internat.obj $(OBJS)\internat_internat.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\internat_internat.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\internat_internat.res +$(OBJS)\internat.exe: $(INTERNAT_OBJECTS) $(OBJS)\internat_internat.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(INTERNAT_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\internat_internat.res | diff --git a/samples/internat/makefile.gcc b/samples/internat/makefile.gcc index a4c12994b5..6db183d7e4 100644 --- a/samples/internat/makefile.gcc +++ b/samples/internat/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -INTERNAT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +INTERNAT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +INTERNAT_OBJECTS = \ + $(OBJS)\internat_internat.o \ + $(OBJS)\internat_internat_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\internat_internat.o: .\internat.cpp $(CXX) -c -o $@ $(INTERNAT_CXXFLAGS) $< $(OBJS)\internat_internat_rc.o: .\internat.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\internat.exe del $(OBJS)\internat.exe -$(OBJS)\internat.exe: $(OBJS)\internat_internat.o $(OBJS)\internat_internat_rc.o - $(CXX) -o $@ $(OBJS)\internat_internat.o $(OBJS)\internat_internat_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\internat.exe: $(INTERNAT_OBJECTS) $(OBJS)\internat_internat_rc.o + $(CXX) -o $@ $(INTERNAT_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/internat/makefile.vc b/samples/internat/makefile.vc index cf2a894aa5..fb06e33b63 100644 --- a/samples/internat/makefile.vc +++ b/samples/internat/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -INTERNAT_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\internat.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +INTERNAT_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\internat.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +INTERNAT_OBJECTS = \ + $(OBJS)\internat_internat.obj \ + $(OBJS)\internat_internat.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\internat_internat.obj: .\internat.cpp $(CXX) /c /nologo /TP /Fo$@ $(INTERNAT_CXXFLAGS) $** $(OBJS)\internat_internat.res: .\internat.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\internat.exe del $(OBJS)\internat.exe -$(OBJS)\internat.exe: $(OBJS)\internat_internat.obj $(OBJS)\internat_internat.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\internat_internat.obj $(OBJS)\internat_internat.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\internat.exe: $(INTERNAT_OBJECTS) $(OBJS)\internat_internat.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(INTERNAT_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/internat/makefile.wat b/samples/internat/makefile.wat index 744f2a6e0d..a309085b13 100644 --- a/samples/internat/makefile.wat +++ b/samples/internat/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -INTERNAT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +INTERNAT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +INTERNAT_OBJECTS = & + $(OBJS)\internat_internat.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\internat_internat.obj : .AUTODEPEND .\internat.cpp $(CXX) -zq -fo=$^@ $(INTERNAT_CXXFLAGS) $< $(OBJS)\internat_internat.res : .AUTODEPEND .\internat.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\internat.exe del $(OBJS)\internat.exe -$(OBJS)\internat.exe : $(OBJS)\internat_internat.obj $(OBJS)\internat_internat.res +$(OBJS)\internat.exe : $(INTERNAT_OBJECTS) $(OBJS)\internat_internat.res @%create $(OBJS)\internat.lbc @%append $(OBJS)\internat.lbc option quiet @%append $(OBJS)\internat.lbc name $^@ @%append $(OBJS)\internat.lbc option incremental - @%append $(OBJS)\internat.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\internat_internat.obj) do @%append $(OBJS)\internat.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\internat.lbc library %i + @%append $(OBJS)\internat.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(INTERNAT_OBJECTS)) do @%append $(OBJS)\internat.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\internat.lbc library %i @%append $(OBJS)\internat.lbc option resource=$(OBJS)\internat_internat.res wlink @$(OBJS)\internat.lbc diff --git a/samples/joytest/Makefile.in b/samples/joytest/Makefile.in index 09ff252b84..175b021613 100644 --- a/samples/joytest/Makefile.in +++ b/samples/joytest/Makefile.in @@ -36,6 +36,10 @@ JOYTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +JOYTEST_OBJECTS = \ + joytest_joytest.o \ + $(__joytest___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ JOYTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ JOYTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ joytest$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o joytest$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: joytest$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f joytest$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -joytest$(EXEEXT): joytest_joytest.o $(__joytest___win32rc) - $(CXX) -o $@ joytest_joytest.o $(__joytest___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +joytest$(EXEEXT): $(JOYTEST_OBJECTS) $(__joytest___win32rc) + $(CXX) -o $@ $(JOYTEST_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__joytest___mac_rezcmd) $(__joytest___mac_setfilecmd) diff --git a/samples/joytest/makefile.bcc b/samples/joytest/makefile.bcc index d75b99da26..e0dc9dcd5e 100644 --- a/samples/joytest/makefile.bcc +++ b/samples/joytest/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -JOYTEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +JOYTEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +JOYTEST_OBJECTS = \ + $(OBJS)\joytest_joytest.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\joytest_joytest.obj: .\joytest.cpp $(CXX) -q -c -P -o$@ $(JOYTEST_CXXFLAGS) $** $(OBJS)\joytest_joytest.res: .\joytest.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\joytest.exe del $(OBJS)\joytest.exe -$(OBJS)\joytest.exe: $(OBJS)\joytest_joytest.obj $(OBJS)\joytest_joytest.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\joytest_joytest.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\joytest_joytest.res +$(OBJS)\joytest.exe: $(JOYTEST_OBJECTS) $(OBJS)\joytest_joytest.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(JOYTEST_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\joytest_joytest.res | diff --git a/samples/joytest/makefile.gcc b/samples/joytest/makefile.gcc index f1740b0737..f7d62f8ef2 100644 --- a/samples/joytest/makefile.gcc +++ b/samples/joytest/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -JOYTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +JOYTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +JOYTEST_OBJECTS = \ + $(OBJS)\joytest_joytest.o \ + $(OBJS)\joytest_joytest_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\joytest_joytest.o: .\joytest.cpp $(CXX) -c -o $@ $(JOYTEST_CXXFLAGS) $< $(OBJS)\joytest_joytest_rc.o: .\joytest.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\joytest.exe del $(OBJS)\joytest.exe -$(OBJS)\joytest.exe: $(OBJS)\joytest_joytest.o $(OBJS)\joytest_joytest_rc.o - $(CXX) -o $@ $(OBJS)\joytest_joytest.o $(OBJS)\joytest_joytest_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\joytest.exe: $(JOYTEST_OBJECTS) $(OBJS)\joytest_joytest_rc.o + $(CXX) -o $@ $(JOYTEST_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/joytest/makefile.vc b/samples/joytest/makefile.vc index a738a86ff5..c29a148eaa 100644 --- a/samples/joytest/makefile.vc +++ b/samples/joytest/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -JOYTEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\joytest.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +JOYTEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\joytest.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +JOYTEST_OBJECTS = \ + $(OBJS)\joytest_joytest.obj \ + $(OBJS)\joytest_joytest.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\joytest_joytest.obj: .\joytest.cpp $(CXX) /c /nologo /TP /Fo$@ $(JOYTEST_CXXFLAGS) $** $(OBJS)\joytest_joytest.res: .\joytest.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\joytest.exe del $(OBJS)\joytest.exe -$(OBJS)\joytest.exe: $(OBJS)\joytest_joytest.obj $(OBJS)\joytest_joytest.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\joytest_joytest.obj $(OBJS)\joytest_joytest.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\joytest.exe: $(JOYTEST_OBJECTS) $(OBJS)\joytest_joytest.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(JOYTEST_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/joytest/makefile.wat b/samples/joytest/makefile.wat index e40b1baaf7..fa3529f4b1 100644 --- a/samples/joytest/makefile.wat +++ b/samples/joytest/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -JOYTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +JOYTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +JOYTEST_OBJECTS = & + $(OBJS)\joytest_joytest.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\joytest_joytest.obj : .AUTODEPEND .\joytest.cpp $(CXX) -zq -fo=$^@ $(JOYTEST_CXXFLAGS) $< $(OBJS)\joytest_joytest.res : .AUTODEPEND .\joytest.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\joytest.exe del $(OBJS)\joytest.exe -$(OBJS)\joytest.exe : $(OBJS)\joytest_joytest.obj $(OBJS)\joytest_joytest.res +$(OBJS)\joytest.exe : $(JOYTEST_OBJECTS) $(OBJS)\joytest_joytest.res @%create $(OBJS)\joytest.lbc @%append $(OBJS)\joytest.lbc option quiet @%append $(OBJS)\joytest.lbc name $^@ @%append $(OBJS)\joytest.lbc option incremental - @%append $(OBJS)\joytest.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\joytest_joytest.obj) do @%append $(OBJS)\joytest.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\joytest.lbc library %i + @%append $(OBJS)\joytest.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(JOYTEST_OBJECTS)) do @%append $(OBJS)\joytest.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\joytest.lbc library %i @%append $(OBJS)\joytest.lbc option resource=$(OBJS)\joytest_joytest.res wlink @$(OBJS)\joytest.lbc diff --git a/samples/keyboard/Makefile.in b/samples/keyboard/Makefile.in index 4f5273433e..6b82d36b5d 100644 --- a/samples/keyboard/Makefile.in +++ b/samples/keyboard/Makefile.in @@ -36,6 +36,10 @@ KEYBOARD_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +KEYBOARD_OBJECTS = \ + keyboard_keyboard.o \ + $(__keyboard___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ KEYBOARD_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ KEYBOARD_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ keyboard$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o keyboard$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: keyboard$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f keyboard$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -keyboard$(EXEEXT): keyboard_keyboard.o $(__keyboard___win32rc) - $(CXX) -o $@ keyboard_keyboard.o $(__keyboard___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +keyboard$(EXEEXT): $(KEYBOARD_OBJECTS) $(__keyboard___win32rc) + $(CXX) -o $@ $(KEYBOARD_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__keyboard___mac_rezcmd) $(__keyboard___mac_setfilecmd) diff --git a/samples/keyboard/makefile.bcc b/samples/keyboard/makefile.bcc index 864feb6db8..9a1a237c6b 100644 --- a/samples/keyboard/makefile.bcc +++ b/samples/keyboard/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -KEYBOARD_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +KEYBOARD_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +KEYBOARD_OBJECTS = \ + $(OBJS)\keyboard_keyboard.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\keyboard_keyboard.obj: .\keyboard.cpp $(CXX) -q -c -P -o$@ $(KEYBOARD_CXXFLAGS) $** $(OBJS)\keyboard_keyboard.res: .\keyboard.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\keyboard.exe del $(OBJS)\keyboard.exe -$(OBJS)\keyboard.exe: $(OBJS)\keyboard_keyboard.obj $(OBJS)\keyboard_keyboard.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\keyboard_keyboard.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\keyboard_keyboard.res +$(OBJS)\keyboard.exe: $(KEYBOARD_OBJECTS) $(OBJS)\keyboard_keyboard.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(KEYBOARD_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\keyboard_keyboard.res | diff --git a/samples/keyboard/makefile.gcc b/samples/keyboard/makefile.gcc index c71ce5a38e..c5bb7395ff 100644 --- a/samples/keyboard/makefile.gcc +++ b/samples/keyboard/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -KEYBOARD_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +KEYBOARD_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +KEYBOARD_OBJECTS = \ + $(OBJS)\keyboard_keyboard.o \ + $(OBJS)\keyboard_keyboard_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\keyboard_keyboard.o: .\keyboard.cpp $(CXX) -c -o $@ $(KEYBOARD_CXXFLAGS) $< $(OBJS)\keyboard_keyboard_rc.o: .\keyboard.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\keyboard.exe del $(OBJS)\keyboard.exe -$(OBJS)\keyboard.exe: $(OBJS)\keyboard_keyboard.o $(OBJS)\keyboard_keyboard_rc.o - $(CXX) -o $@ $(OBJS)\keyboard_keyboard.o $(OBJS)\keyboard_keyboard_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\keyboard.exe: $(KEYBOARD_OBJECTS) $(OBJS)\keyboard_keyboard_rc.o + $(CXX) -o $@ $(KEYBOARD_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/keyboard/makefile.vc b/samples/keyboard/makefile.vc index ac9f110de6..d1bdedca4c 100644 --- a/samples/keyboard/makefile.vc +++ b/samples/keyboard/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -KEYBOARD_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\keyboard.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +KEYBOARD_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\keyboard.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +KEYBOARD_OBJECTS = \ + $(OBJS)\keyboard_keyboard.obj \ + $(OBJS)\keyboard_keyboard.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\keyboard_keyboard.obj: .\keyboard.cpp $(CXX) /c /nologo /TP /Fo$@ $(KEYBOARD_CXXFLAGS) $** $(OBJS)\keyboard_keyboard.res: .\keyboard.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\keyboard.exe del $(OBJS)\keyboard.exe -$(OBJS)\keyboard.exe: $(OBJS)\keyboard_keyboard.obj $(OBJS)\keyboard_keyboard.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\keyboard_keyboard.obj $(OBJS)\keyboard_keyboard.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\keyboard.exe: $(KEYBOARD_OBJECTS) $(OBJS)\keyboard_keyboard.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(KEYBOARD_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/keyboard/makefile.wat b/samples/keyboard/makefile.wat index e2fc1ce8ba..74ff9de9af 100644 --- a/samples/keyboard/makefile.wat +++ b/samples/keyboard/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -KEYBOARD_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +KEYBOARD_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +KEYBOARD_OBJECTS = & + $(OBJS)\keyboard_keyboard.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\keyboard_keyboard.obj : .AUTODEPEND .\keyboard.cpp $(CXX) -zq -fo=$^@ $(KEYBOARD_CXXFLAGS) $< $(OBJS)\keyboard_keyboard.res : .AUTODEPEND .\keyboard.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\keyboard.exe del $(OBJS)\keyboard.exe -$(OBJS)\keyboard.exe : $(OBJS)\keyboard_keyboard.obj $(OBJS)\keyboard_keyboard.res +$(OBJS)\keyboard.exe : $(KEYBOARD_OBJECTS) $(OBJS)\keyboard_keyboard.res @%create $(OBJS)\keyboard.lbc @%append $(OBJS)\keyboard.lbc option quiet @%append $(OBJS)\keyboard.lbc name $^@ @%append $(OBJS)\keyboard.lbc option incremental - @%append $(OBJS)\keyboard.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\keyboard_keyboard.obj) do @%append $(OBJS)\keyboard.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\keyboard.lbc library %i + @%append $(OBJS)\keyboard.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(KEYBOARD_OBJECTS)) do @%append $(OBJS)\keyboard.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\keyboard.lbc library %i @%append $(OBJS)\keyboard.lbc option resource=$(OBJS)\keyboard_keyboard.res wlink @$(OBJS)\keyboard.lbc diff --git a/samples/layout/Makefile.in b/samples/layout/Makefile.in index 0db37f99e7..400b51dfa4 100644 --- a/samples/layout/Makefile.in +++ b/samples/layout/Makefile.in @@ -36,6 +36,10 @@ LAYOUT_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +LAYOUT_OBJECTS = \ + layout_layout.o \ + $(__layout___win32rc) +LIBDIRNAME = $(top_builddir)lib ### Conditionally set variables: ### @@ -44,7 +48,8 @@ LAYOUT_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ LAYOUT_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ layout$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o layout$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: layout$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f layout$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -layout$(EXEEXT): layout_layout.o $(__layout___win32rc) - $(CXX) -o $@ layout_layout.o $(__layout___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +layout$(EXEEXT): $(LAYOUT_OBJECTS) $(__layout___win32rc) + $(CXX) -o $@ $(LAYOUT_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__layout___mac_rezcmd) $(__layout___mac_setfilecmd) diff --git a/samples/layout/makefile.bcc b/samples/layout/makefile.bcc index d713288fef..91b62f46ff 100644 --- a/samples/layout/makefile.bcc +++ b/samples/layout/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -LAYOUT_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +LAYOUT_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LAYOUT_OBJECTS = \ + $(OBJS)\layout_layout.obj +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\layout_layout.obj: .\layout.cpp $(CXX) -q -c -P -o$@ $(LAYOUT_CXXFLAGS) $** $(OBJS)\layout_layout.res: .\layout.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\layout.exe del $(OBJS)\layout.exe -$(OBJS)\layout.exe: $(OBJS)\layout_layout.obj $(OBJS)\layout_layout.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\layout_layout.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\layout_layout.res +$(OBJS)\layout.exe: $(LAYOUT_OBJECTS) $(OBJS)\layout_layout.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(LAYOUT_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\layout_layout.res | diff --git a/samples/layout/makefile.gcc b/samples/layout/makefile.gcc index 896692c6e0..5a5e9e1e93 100644 --- a/samples/layout/makefile.gcc +++ b/samples/layout/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -LAYOUT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LAYOUT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LAYOUT_OBJECTS = \ + $(OBJS)\layout_layout.o \ + $(OBJS)\layout_layout_rc.o +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\layout_layout.o: .\layout.cpp $(CXX) -c -o $@ $(LAYOUT_CXXFLAGS) $< $(OBJS)\layout_layout_rc.o: .\layout.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\layout.exe del $(OBJS)\layout.exe -$(OBJS)\layout.exe: $(OBJS)\layout_layout.o $(OBJS)\layout_layout_rc.o - $(CXX) -o $@ $(OBJS)\layout_layout.o $(OBJS)\layout_layout_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\layout.exe: $(LAYOUT_OBJECTS) $(OBJS)\layout_layout_rc.o + $(CXX) -o $@ $(LAYOUT_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/layout/makefile.vc b/samples/layout/makefile.vc index 54f521b829..3355b6d7e2 100644 --- a/samples/layout/makefile.vc +++ b/samples/layout/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -LAYOUT_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\layout.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LAYOUT_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) /DWIN32 \ + $(__DEBUGINFO_0) /Fd$(OBJS)\layout.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LAYOUT_OBJECTS = \ + $(OBJS)\layout_layout.obj \ + $(OBJS)\layout_layout.res +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\layout_layout.obj: .\layout.cpp $(CXX) /c /nologo /TP /Fo$@ $(LAYOUT_CXXFLAGS) $** $(OBJS)\layout_layout.res: .\layout.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\layout.exe del $(OBJS)\layout.exe -$(OBJS)\layout.exe: $(OBJS)\layout_layout.obj $(OBJS)\layout_layout.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\layout_layout.obj $(OBJS)\layout_layout.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\layout.exe: $(LAYOUT_OBJECTS) $(OBJS)\layout_layout.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(LAYOUT_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/layout/makefile.wat b/samples/layout/makefile.wat index e4396c0ce3..3f5fa2064b 100644 --- a/samples/layout/makefile.wat +++ b/samples/layout/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -LAYOUT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LAYOUT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +LAYOUT_OBJECTS = & + $(OBJS)\layout_layout.obj +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\layout_layout.obj : .AUTODEPEND .\layout.cpp $(CXX) -zq -fo=$^@ $(LAYOUT_CXXFLAGS) $< $(OBJS)\layout_layout.res : .AUTODEPEND .\layout.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\layout.exe del $(OBJS)\layout.exe -$(OBJS)\layout.exe : $(OBJS)\layout_layout.obj $(OBJS)\layout_layout.res +$(OBJS)\layout.exe : $(LAYOUT_OBJECTS) $(OBJS)\layout_layout.res @%create $(OBJS)\layout.lbc @%append $(OBJS)\layout.lbc option quiet @%append $(OBJS)\layout.lbc name $^@ @%append $(OBJS)\layout.lbc option incremental - @%append $(OBJS)\layout.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\layout_layout.obj) do @%append $(OBJS)\layout.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\layout.lbc library %i + @%append $(OBJS)\layout.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(LAYOUT_OBJECTS)) do @%append $(OBJS)\layout.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\layout.lbc library %i @%append $(OBJS)\layout.lbc option resource=$(OBJS)\layout_layout.res wlink @$(OBJS)\layout.lbc diff --git a/samples/listbox/Makefile.in b/samples/listbox/Makefile.in index 9cc846422a..73d61666d6 100644 --- a/samples/listbox/Makefile.in +++ b/samples/listbox/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib LISTBOX_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +LISTBOX_OBJECTS = \ + listbox_listbox.o \ + $(__listbox___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ LISTBOX_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ LISTBOX_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ listbox$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o listbox$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: listbox$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f listbox$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -listbox$(EXEEXT): listbox_listbox.o $(__listbox___win32rc) - $(CXX) -o $@ listbox_listbox.o $(__listbox___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +listbox$(EXEEXT): $(LISTBOX_OBJECTS) $(__listbox___win32rc) + $(CXX) -o $@ $(LISTBOX_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__listbox___mac_rezcmd) $(__listbox___mac_setfilecmd) diff --git a/samples/listbox/makefile.bcc b/samples/listbox/makefile.bcc index 890dbca62c..e468986fdb 100644 --- a/samples/listbox/makefile.bcc +++ b/samples/listbox/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -LISTBOX_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LISTBOX_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LISTBOX_OBJECTS = \ + $(OBJS)\listbox_listbox.obj OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\listbox_listbox.obj: .\listbox.cpp $(CXX) -q -c -P -o$@ $(LISTBOX_CXXFLAGS) $** $(OBJS)\listbox_listbox.res: .\listbox.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\listbox.exe del $(OBJS)\listbox.exe -$(OBJS)\listbox.exe: $(OBJS)\listbox_listbox.obj $(OBJS)\listbox_listbox.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\listbox_listbox.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\listbox_listbox.res +$(OBJS)\listbox.exe: $(LISTBOX_OBJECTS) $(OBJS)\listbox_listbox.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(LISTBOX_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\listbox_listbox.res | diff --git a/samples/listbox/makefile.gcc b/samples/listbox/makefile.gcc index 8b8cd10000..4d35fe95e5 100644 --- a/samples/listbox/makefile.gcc +++ b/samples/listbox/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -LISTBOX_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LISTBOX_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LISTBOX_OBJECTS = \ + $(OBJS)\listbox_listbox.o \ + $(OBJS)\listbox_listbox_rc.o +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\listbox_listbox.o: .\listbox.cpp $(CXX) -c -o $@ $(LISTBOX_CXXFLAGS) $< $(OBJS)\listbox_listbox_rc.o: .\listbox.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\listbox.exe del $(OBJS)\listbox.exe -$(OBJS)\listbox.exe: $(OBJS)\listbox_listbox.o $(OBJS)\listbox_listbox_rc.o - $(CXX) -o $@ $(OBJS)\listbox_listbox.o $(OBJS)\listbox_listbox_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\listbox.exe: $(LISTBOX_OBJECTS) $(OBJS)\listbox_listbox_rc.o + $(CXX) -o $@ $(LISTBOX_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/listbox/makefile.vc b/samples/listbox/makefile.vc index 6606098c45..5bfc11fcd1 100644 --- a/samples/listbox/makefile.vc +++ b/samples/listbox/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -LISTBOX_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\listbox.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LISTBOX_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\listbox.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LISTBOX_OBJECTS = \ + $(OBJS)\listbox_listbox.obj \ + $(OBJS)\listbox_listbox.res +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\listbox_listbox.obj: .\listbox.cpp $(CXX) /c /nologo /TP /Fo$@ $(LISTBOX_CXXFLAGS) $** $(OBJS)\listbox_listbox.res: .\listbox.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\listbox.exe del $(OBJS)\listbox.exe -$(OBJS)\listbox.exe: $(OBJS)\listbox_listbox.obj $(OBJS)\listbox_listbox.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\listbox_listbox.obj $(OBJS)\listbox_listbox.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\listbox.exe: $(LISTBOX_OBJECTS) $(OBJS)\listbox_listbox.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(LISTBOX_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/listbox/makefile.wat b/samples/listbox/makefile.wat index 529d9b53bd..ae26898f1e 100644 --- a/samples/listbox/makefile.wat +++ b/samples/listbox/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -LISTBOX_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LISTBOX_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +LISTBOX_OBJECTS = & + $(OBJS)\listbox_listbox.obj +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\listbox_listbox.obj : .AUTODEPEND .\listbox.cpp $(CXX) -zq -fo=$^@ $(LISTBOX_CXXFLAGS) $< $(OBJS)\listbox_listbox.res : .AUTODEPEND .\listbox.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\listbox.exe del $(OBJS)\listbox.exe -$(OBJS)\listbox.exe : $(OBJS)\listbox_listbox.obj $(OBJS)\listbox_listbox.res +$(OBJS)\listbox.exe : $(LISTBOX_OBJECTS) $(OBJS)\listbox_listbox.res @%create $(OBJS)\listbox.lbc @%append $(OBJS)\listbox.lbc option quiet @%append $(OBJS)\listbox.lbc name $^@ @%append $(OBJS)\listbox.lbc option incremental - @%append $(OBJS)\listbox.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\listbox_listbox.obj) do @%append $(OBJS)\listbox.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\listbox.lbc library %i + @%append $(OBJS)\listbox.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(LISTBOX_OBJECTS)) do @%append $(OBJS)\listbox.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\listbox.lbc library %i @%append $(OBJS)\listbox.lbc option resource=$(OBJS)\listbox_listbox.res wlink @$(OBJS)\listbox.lbc diff --git a/samples/listctrl/Makefile.in b/samples/listctrl/Makefile.in index 4896f3a411..ae85cc4167 100644 --- a/samples/listctrl/Makefile.in +++ b/samples/listctrl/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib LISTCTRL_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +LISTCTRL_OBJECTS = \ + listctrl_listtest.o \ + $(__listctrl___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ LISTCTRL_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ LISTCTRL_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ listctrl$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o listctrl$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: listctrl$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f listctrl$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -listctrl$(EXEEXT): listctrl_listtest.o $(__listctrl___win32rc) - $(CXX) -o $@ listctrl_listtest.o $(__listctrl___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +listctrl$(EXEEXT): $(LISTCTRL_OBJECTS) $(__listctrl___win32rc) + $(CXX) -o $@ $(LISTCTRL_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__listctrl___mac_rezcmd) $(__listctrl___mac_setfilecmd) diff --git a/samples/listctrl/makefile.bcc b/samples/listctrl/makefile.bcc index a8814f2f2c..0a61799a8f 100644 --- a/samples/listctrl/makefile.bcc +++ b/samples/listctrl/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -LISTCTRL_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LISTCTRL_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LISTCTRL_OBJECTS = \ + $(OBJS)\listctrl_listtest.obj OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\listctrl_listtest.obj: .\listtest.cpp $(CXX) -q -c -P -o$@ $(LISTCTRL_CXXFLAGS) $** $(OBJS)\listctrl_listtest.res: .\listtest.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\listctrl.exe del $(OBJS)\listctrl.exe -$(OBJS)\listctrl.exe: $(OBJS)\listctrl_listtest.obj $(OBJS)\listctrl_listtest.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\listctrl_listtest.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\listctrl_listtest.res +$(OBJS)\listctrl.exe: $(LISTCTRL_OBJECTS) $(OBJS)\listctrl_listtest.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(LISTCTRL_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\listctrl_listtest.res | diff --git a/samples/listctrl/makefile.gcc b/samples/listctrl/makefile.gcc index fc82fed406..293c3813dd 100644 --- a/samples/listctrl/makefile.gcc +++ b/samples/listctrl/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -LISTCTRL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LISTCTRL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LISTCTRL_OBJECTS = \ + $(OBJS)\listctrl_listtest.o \ + $(OBJS)\listctrl_listtest_rc.o +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\listctrl_listtest.o: .\listtest.cpp $(CXX) -c -o $@ $(LISTCTRL_CXXFLAGS) $< $(OBJS)\listctrl_listtest_rc.o: .\listtest.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\listctrl.exe del $(OBJS)\listctrl.exe -$(OBJS)\listctrl.exe: $(OBJS)\listctrl_listtest.o $(OBJS)\listctrl_listtest_rc.o - $(CXX) -o $@ $(OBJS)\listctrl_listtest.o $(OBJS)\listctrl_listtest_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\listctrl.exe: $(LISTCTRL_OBJECTS) $(OBJS)\listctrl_listtest_rc.o + $(CXX) -o $@ $(LISTCTRL_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/listctrl/makefile.vc b/samples/listctrl/makefile.vc index 5f6cb7f674..e0017f5176 100644 --- a/samples/listctrl/makefile.vc +++ b/samples/listctrl/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -LISTCTRL_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\listctrl.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LISTCTRL_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\listctrl.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LISTCTRL_OBJECTS = \ + $(OBJS)\listctrl_listtest.obj \ + $(OBJS)\listctrl_listtest.res +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\listctrl_listtest.obj: .\listtest.cpp $(CXX) /c /nologo /TP /Fo$@ $(LISTCTRL_CXXFLAGS) $** $(OBJS)\listctrl_listtest.res: .\listtest.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\listctrl.exe del $(OBJS)\listctrl.exe -$(OBJS)\listctrl.exe: $(OBJS)\listctrl_listtest.obj $(OBJS)\listctrl_listtest.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\listctrl_listtest.obj $(OBJS)\listctrl_listtest.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\listctrl.exe: $(LISTCTRL_OBJECTS) $(OBJS)\listctrl_listtest.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(LISTCTRL_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/listctrl/makefile.wat b/samples/listctrl/makefile.wat index 3b56ca0179..9662f06f51 100644 --- a/samples/listctrl/makefile.wat +++ b/samples/listctrl/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -LISTCTRL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LISTCTRL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +LISTCTRL_OBJECTS = & + $(OBJS)\listctrl_listtest.obj +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\listctrl_listtest.obj : .AUTODEPEND .\listtest.cpp $(CXX) -zq -fo=$^@ $(LISTCTRL_CXXFLAGS) $< $(OBJS)\listctrl_listtest.res : .AUTODEPEND .\listtest.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\listctrl.exe del $(OBJS)\listctrl.exe -$(OBJS)\listctrl.exe : $(OBJS)\listctrl_listtest.obj $(OBJS)\listctrl_listtest.res +$(OBJS)\listctrl.exe : $(LISTCTRL_OBJECTS) $(OBJS)\listctrl_listtest.res @%create $(OBJS)\listctrl.lbc @%append $(OBJS)\listctrl.lbc option quiet @%append $(OBJS)\listctrl.lbc name $^@ @%append $(OBJS)\listctrl.lbc option incremental - @%append $(OBJS)\listctrl.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\listctrl_listtest.obj) do @%append $(OBJS)\listctrl.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\listctrl.lbc library %i + @%append $(OBJS)\listctrl.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(LISTCTRL_OBJECTS)) do @%append $(OBJS)\listctrl.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\listctrl.lbc library %i @%append $(OBJS)\listctrl.lbc option resource=$(OBJS)\listctrl_listtest.res wlink @$(OBJS)\listctrl.lbc diff --git a/samples/memcheck/Makefile.in b/samples/memcheck/Makefile.in index afbdc96658..738af231f2 100644 --- a/samples/memcheck/Makefile.in +++ b/samples/memcheck/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib MEMCHECK_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +MEMCHECK_OBJECTS = \ + memcheck_memcheck.o \ + $(__memcheck___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ MEMCHECK_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ MEMCHECK_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ memcheck$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o memcheck$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: memcheck$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f memcheck$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -memcheck$(EXEEXT): memcheck_memcheck.o $(__memcheck___win32rc) - $(CXX) -o $@ memcheck_memcheck.o $(__memcheck___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +memcheck$(EXEEXT): $(MEMCHECK_OBJECTS) $(__memcheck___win32rc) + $(CXX) -o $@ $(MEMCHECK_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__memcheck___mac_rezcmd) $(__memcheck___mac_setfilecmd) diff --git a/samples/memcheck/makefile.bcc b/samples/memcheck/makefile.bcc index a1d78892ed..7e829f8c94 100644 --- a/samples/memcheck/makefile.bcc +++ b/samples/memcheck/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -MEMCHECK_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MEMCHECK_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +MEMCHECK_OBJECTS = \ + $(OBJS)\memcheck_memcheck.obj OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\memcheck_memcheck.obj: .\memcheck.cpp $(CXX) -q -c -P -o$@ $(MEMCHECK_CXXFLAGS) $** $(OBJS)\memcheck_memcheck.res: .\memcheck.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\memcheck.exe del $(OBJS)\memcheck.exe -$(OBJS)\memcheck.exe: $(OBJS)\memcheck_memcheck.obj $(OBJS)\memcheck_memcheck.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\memcheck_memcheck.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\memcheck_memcheck.res +$(OBJS)\memcheck.exe: $(MEMCHECK_OBJECTS) $(OBJS)\memcheck_memcheck.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(MEMCHECK_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\memcheck_memcheck.res | diff --git a/samples/memcheck/makefile.gcc b/samples/memcheck/makefile.gcc index c243a3455d..10cd3456d0 100644 --- a/samples/memcheck/makefile.gcc +++ b/samples/memcheck/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -MEMCHECK_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MEMCHECK_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +MEMCHECK_OBJECTS = \ + $(OBJS)\memcheck_memcheck.o \ + $(OBJS)\memcheck_memcheck_rc.o +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\memcheck_memcheck.o: .\memcheck.cpp $(CXX) -c -o $@ $(MEMCHECK_CXXFLAGS) $< $(OBJS)\memcheck_memcheck_rc.o: .\memcheck.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\memcheck.exe del $(OBJS)\memcheck.exe -$(OBJS)\memcheck.exe: $(OBJS)\memcheck_memcheck.o $(OBJS)\memcheck_memcheck_rc.o - $(CXX) -o $@ $(OBJS)\memcheck_memcheck.o $(OBJS)\memcheck_memcheck_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\memcheck.exe: $(MEMCHECK_OBJECTS) $(OBJS)\memcheck_memcheck_rc.o + $(CXX) -o $@ $(MEMCHECK_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/memcheck/makefile.vc b/samples/memcheck/makefile.vc index 72bee1d9b8..444224b155 100644 --- a/samples/memcheck/makefile.vc +++ b/samples/memcheck/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -MEMCHECK_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\memcheck.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MEMCHECK_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\memcheck.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +MEMCHECK_OBJECTS = \ + $(OBJS)\memcheck_memcheck.obj \ + $(OBJS)\memcheck_memcheck.res +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\memcheck_memcheck.obj: .\memcheck.cpp $(CXX) /c /nologo /TP /Fo$@ $(MEMCHECK_CXXFLAGS) $** $(OBJS)\memcheck_memcheck.res: .\memcheck.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\memcheck.exe del $(OBJS)\memcheck.exe -$(OBJS)\memcheck.exe: $(OBJS)\memcheck_memcheck.obj $(OBJS)\memcheck_memcheck.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\memcheck_memcheck.obj $(OBJS)\memcheck_memcheck.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\memcheck.exe: $(MEMCHECK_OBJECTS) $(OBJS)\memcheck_memcheck.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(MEMCHECK_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/memcheck/makefile.wat b/samples/memcheck/makefile.wat index acaf240d15..2a0432417e 100644 --- a/samples/memcheck/makefile.wat +++ b/samples/memcheck/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -MEMCHECK_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MEMCHECK_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +MEMCHECK_OBJECTS = & + $(OBJS)\memcheck_memcheck.obj +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\memcheck_memcheck.obj : .AUTODEPEND .\memcheck.cpp $(CXX) -zq -fo=$^@ $(MEMCHECK_CXXFLAGS) $< $(OBJS)\memcheck_memcheck.res : .AUTODEPEND .\memcheck.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\memcheck.exe del $(OBJS)\memcheck.exe -$(OBJS)\memcheck.exe : $(OBJS)\memcheck_memcheck.obj $(OBJS)\memcheck_memcheck.res +$(OBJS)\memcheck.exe : $(MEMCHECK_OBJECTS) $(OBJS)\memcheck_memcheck.res @%create $(OBJS)\memcheck.lbc @%append $(OBJS)\memcheck.lbc option quiet @%append $(OBJS)\memcheck.lbc name $^@ @%append $(OBJS)\memcheck.lbc option incremental - @%append $(OBJS)\memcheck.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\memcheck_memcheck.obj) do @%append $(OBJS)\memcheck.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\memcheck.lbc library %i + @%append $(OBJS)\memcheck.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(MEMCHECK_OBJECTS)) do @%append $(OBJS)\memcheck.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\memcheck.lbc library %i @%append $(OBJS)\memcheck.lbc option resource=$(OBJS)\memcheck_memcheck.res wlink @$(OBJS)\memcheck.lbc diff --git a/samples/menu/Makefile.in b/samples/menu/Makefile.in index 2e6e238f44..6e13434820 100644 --- a/samples/menu/Makefile.in +++ b/samples/menu/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib MENU_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +MENU_OBJECTS = \ + menu_menu.o \ + $(__menu___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ MENU_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ MENU_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ menu$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o menu$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: menu$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f menu$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -menu$(EXEEXT): menu_menu.o $(__menu___win32rc) - $(CXX) -o $@ menu_menu.o $(__menu___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +menu$(EXEEXT): $(MENU_OBJECTS) $(__menu___win32rc) + $(CXX) -o $@ $(MENU_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__menu___mac_rezcmd) $(__menu___mac_setfilecmd) diff --git a/samples/menu/makefile.bcc b/samples/menu/makefile.bcc index b997517256..1cb4419161 100644 --- a/samples/menu/makefile.bcc +++ b/samples/menu/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -MENU_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MENU_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +MENU_OBJECTS = \ + $(OBJS)\menu_menu.obj OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\menu_menu.obj: .\menu.cpp $(CXX) -q -c -P -o$@ $(MENU_CXXFLAGS) $** $(OBJS)\menu_menu.res: .\menu.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\menu.exe del $(OBJS)\menu.exe -$(OBJS)\menu.exe: $(OBJS)\menu_menu.obj $(OBJS)\menu_menu.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\menu_menu.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\menu_menu.res +$(OBJS)\menu.exe: $(MENU_OBJECTS) $(OBJS)\menu_menu.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(MENU_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\menu_menu.res | diff --git a/samples/menu/makefile.gcc b/samples/menu/makefile.gcc index 22f4dd0d51..3dce0b51b1 100644 --- a/samples/menu/makefile.gcc +++ b/samples/menu/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -MENU_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MENU_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +MENU_OBJECTS = \ + $(OBJS)\menu_menu.o \ + $(OBJS)\menu_menu_rc.o +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\menu_menu.o: .\menu.cpp $(CXX) -c -o $@ $(MENU_CXXFLAGS) $< $(OBJS)\menu_menu_rc.o: .\menu.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\menu.exe del $(OBJS)\menu.exe -$(OBJS)\menu.exe: $(OBJS)\menu_menu.o $(OBJS)\menu_menu_rc.o - $(CXX) -o $@ $(OBJS)\menu_menu.o $(OBJS)\menu_menu_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\menu.exe: $(MENU_OBJECTS) $(OBJS)\menu_menu_rc.o + $(CXX) -o $@ $(MENU_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/menu/makefile.vc b/samples/menu/makefile.vc index a7f3b50b0d..a6a9f09476 100644 --- a/samples/menu/makefile.vc +++ b/samples/menu/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -MENU_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\menu.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MENU_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) /DWIN32 \ + $(__DEBUGINFO_0) /Fd$(OBJS)\menu.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +MENU_OBJECTS = \ + $(OBJS)\menu_menu.obj \ + $(OBJS)\menu_menu.res +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\menu_menu.obj: .\menu.cpp $(CXX) /c /nologo /TP /Fo$@ $(MENU_CXXFLAGS) $** $(OBJS)\menu_menu.res: .\menu.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\menu.exe del $(OBJS)\menu.exe -$(OBJS)\menu.exe: $(OBJS)\menu_menu.obj $(OBJS)\menu_menu.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\menu_menu.obj $(OBJS)\menu_menu.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\menu.exe: $(MENU_OBJECTS) $(OBJS)\menu_menu.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(MENU_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/menu/makefile.wat b/samples/menu/makefile.wat index c8299bcd32..0b201efd8d 100644 --- a/samples/menu/makefile.wat +++ b/samples/menu/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -MENU_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MENU_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +MENU_OBJECTS = & + $(OBJS)\menu_menu.obj +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\menu_menu.obj : .AUTODEPEND .\menu.cpp $(CXX) -zq -fo=$^@ $(MENU_CXXFLAGS) $< $(OBJS)\menu_menu.res : .AUTODEPEND .\menu.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\menu.exe del $(OBJS)\menu.exe -$(OBJS)\menu.exe : $(OBJS)\menu_menu.obj $(OBJS)\menu_menu.res +$(OBJS)\menu.exe : $(MENU_OBJECTS) $(OBJS)\menu_menu.res @%create $(OBJS)\menu.lbc @%append $(OBJS)\menu.lbc option quiet @%append $(OBJS)\menu.lbc name $^@ @%append $(OBJS)\menu.lbc option incremental - @%append $(OBJS)\menu.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\menu_menu.obj) do @%append $(OBJS)\menu.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\menu.lbc library %i + @%append $(OBJS)\menu.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(MENU_OBJECTS)) do @%append $(OBJS)\menu.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\menu.lbc library %i @%append $(OBJS)\menu.lbc option resource=$(OBJS)\menu_menu.res wlink @$(OBJS)\menu.lbc diff --git a/samples/minifram/Makefile.in b/samples/minifram/Makefile.in index 97bd711ef8..ffa292c218 100644 --- a/samples/minifram/Makefile.in +++ b/samples/minifram/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib MINIFRAM_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +MINIFRAM_OBJECTS = \ + minifram_minifram.o \ + $(__minifram___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ MINIFRAM_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ MINIFRAM_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ minifram$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o minifram$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: minifram$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f minifram$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -minifram$(EXEEXT): minifram_minifram.o $(__minifram___win32rc) - $(CXX) -o $@ minifram_minifram.o $(__minifram___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +minifram$(EXEEXT): $(MINIFRAM_OBJECTS) $(__minifram___win32rc) + $(CXX) -o $@ $(MINIFRAM_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__minifram___mac_rezcmd) $(__minifram___mac_setfilecmd) diff --git a/samples/minifram/makefile.bcc b/samples/minifram/makefile.bcc index 1be563245e..62de7473cc 100644 --- a/samples/minifram/makefile.bcc +++ b/samples/minifram/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -MINIFRAM_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MINIFRAM_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +MINIFRAM_OBJECTS = \ + $(OBJS)\minifram_minifram.obj OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\minifram_minifram.obj: .\minifram.cpp $(CXX) -q -c -P -o$@ $(MINIFRAM_CXXFLAGS) $** $(OBJS)\minifram_minifram.res: .\minifram.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\minifram.exe del $(OBJS)\minifram.exe -$(OBJS)\minifram.exe: $(OBJS)\minifram_minifram.obj $(OBJS)\minifram_minifram.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\minifram_minifram.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\minifram_minifram.res +$(OBJS)\minifram.exe: $(MINIFRAM_OBJECTS) $(OBJS)\minifram_minifram.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(MINIFRAM_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\minifram_minifram.res | diff --git a/samples/minifram/makefile.gcc b/samples/minifram/makefile.gcc index a2035fdb58..faf27571e2 100644 --- a/samples/minifram/makefile.gcc +++ b/samples/minifram/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -MINIFRAM_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MINIFRAM_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +MINIFRAM_OBJECTS = \ + $(OBJS)\minifram_minifram.o \ + $(OBJS)\minifram_minifram_rc.o +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\minifram_minifram.o: .\minifram.cpp $(CXX) -c -o $@ $(MINIFRAM_CXXFLAGS) $< $(OBJS)\minifram_minifram_rc.o: .\minifram.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\minifram.exe del $(OBJS)\minifram.exe -$(OBJS)\minifram.exe: $(OBJS)\minifram_minifram.o $(OBJS)\minifram_minifram_rc.o - $(CXX) -o $@ $(OBJS)\minifram_minifram.o $(OBJS)\minifram_minifram_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\minifram.exe: $(MINIFRAM_OBJECTS) $(OBJS)\minifram_minifram_rc.o + $(CXX) -o $@ $(MINIFRAM_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/minifram/makefile.vc b/samples/minifram/makefile.vc index 865845f107..bff7626074 100644 --- a/samples/minifram/makefile.vc +++ b/samples/minifram/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -MINIFRAM_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\minifram.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MINIFRAM_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\minifram.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +MINIFRAM_OBJECTS = \ + $(OBJS)\minifram_minifram.obj \ + $(OBJS)\minifram_minifram.res +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\minifram_minifram.obj: .\minifram.cpp $(CXX) /c /nologo /TP /Fo$@ $(MINIFRAM_CXXFLAGS) $** $(OBJS)\minifram_minifram.res: .\minifram.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\minifram.exe del $(OBJS)\minifram.exe -$(OBJS)\minifram.exe: $(OBJS)\minifram_minifram.obj $(OBJS)\minifram_minifram.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\minifram_minifram.obj $(OBJS)\minifram_minifram.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\minifram.exe: $(MINIFRAM_OBJECTS) $(OBJS)\minifram_minifram.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(MINIFRAM_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/minifram/makefile.wat b/samples/minifram/makefile.wat index 586dce1571..3a99fd8a23 100644 --- a/samples/minifram/makefile.wat +++ b/samples/minifram/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -MINIFRAM_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MINIFRAM_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +MINIFRAM_OBJECTS = & + $(OBJS)\minifram_minifram.obj +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\minifram_minifram.obj : .AUTODEPEND .\minifram.cpp $(CXX) -zq -fo=$^@ $(MINIFRAM_CXXFLAGS) $< $(OBJS)\minifram_minifram.res : .AUTODEPEND .\minifram.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\minifram.exe del $(OBJS)\minifram.exe -$(OBJS)\minifram.exe : $(OBJS)\minifram_minifram.obj $(OBJS)\minifram_minifram.res +$(OBJS)\minifram.exe : $(MINIFRAM_OBJECTS) $(OBJS)\minifram_minifram.res @%create $(OBJS)\minifram.lbc @%append $(OBJS)\minifram.lbc option quiet @%append $(OBJS)\minifram.lbc name $^@ @%append $(OBJS)\minifram.lbc option incremental - @%append $(OBJS)\minifram.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\minifram_minifram.obj) do @%append $(OBJS)\minifram.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\minifram.lbc library %i + @%append $(OBJS)\minifram.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(MINIFRAM_OBJECTS)) do @%append $(OBJS)\minifram.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\minifram.lbc library %i @%append $(OBJS)\minifram.lbc option resource=$(OBJS)\minifram_minifram.res wlink @$(OBJS)\minifram.lbc diff --git a/samples/minimal/Makefile.in b/samples/minimal/Makefile.in index 93d9846fe5..fb1977d336 100644 --- a/samples/minimal/Makefile.in +++ b/samples/minimal/Makefile.in @@ -32,21 +32,26 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib MINIMAL_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +MINIMAL_OBJECTS = \ + minimal_minimal.o \ + $(__minimal___win32rc) ### Conditionally set variables: ### @COND_DEPS_TRACKING_0@CXXC = $(CXX) @COND_DEPS_TRACKING_1@CXXC = $(top_builddir)./bk-deps $(CXX) @COND_TOOLKIT_MAC@MACOSX_RESOURCES = Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@ $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -82,35 +87,38 @@ MINIMAL_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ -@COND_PLATFORM_MAC_1@__minimal___mac_rezcmd = \ -@COND_PLATFORM_MAC_1@ $(RESCOMP) -d __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_PLATFORM_MAC_1@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_PLATFORM_MAC_1@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_PLATFORM_MAC_1@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) \ -@COND_PLATFORM_MAC_1@ $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ -@COND_PLATFORM_MAC_1@ $(__DLLFLAG_p_1) -o minimal$(EXEEXT) \ -@COND_PLATFORM_MAC_1@ $(MACOSX_RESOURCES) mondrian.r +COND_PLATFORM_MAC_1___minimal___mac_rezcmd = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o minimal$(EXEEXT) $(MACOSX_RESOURCES) mondrian.r +@COND_PLATFORM_MAC_1@__minimal___mac_rezcmd = $(COND_PLATFORM_MAC_1___minimal___mac_rezcmd) @COND_PLATFORM_MAC_1@__minimal___mac_setfilecmd = \ @COND_PLATFORM_MAC_1@ $(SETFILE) -a C minimal$(EXEEXT) @COND_PLATFORM_WIN32_1@__minimal___win32rc = minimal_minimal_rc.o @@ -121,7 +129,7 @@ all: minimal$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f minimal$(EXEEXT) distclean: clean @@ -132,8 +140,8 @@ install: all install-strip: install -minimal$(EXEEXT): minimal_minimal.o $(__minimal___win32rc) - $(CXX) -o $@ minimal_minimal.o $(__minimal___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +minimal$(EXEEXT): $(MINIMAL_OBJECTS) $(__minimal___win32rc) + $(CXX) -o $@ $(MINIMAL_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__minimal___mac_rezcmd) $(__minimal___mac_setfilecmd) diff --git a/samples/minimal/makefile.bcc b/samples/minimal/makefile.bcc index 71fb71182e..149e8011f8 100644 --- a/samples/minimal/makefile.bcc +++ b/samples/minimal/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -MINIMAL_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MINIMAL_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +MINIMAL_OBJECTS = \ + $(OBJS)\minimal_minimal.obj OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\minimal_minimal.obj: .\minimal.cpp $(CXX) -q -c -P -o$@ $(MINIMAL_CXXFLAGS) $** $(OBJS)\minimal_minimal.res: .\minimal.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\minimal.exe del $(OBJS)\minimal.exe -$(OBJS)\minimal.exe: $(OBJS)\minimal_minimal.obj $(OBJS)\minimal_minimal.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\minimal_minimal.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\minimal_minimal.res +$(OBJS)\minimal.exe: $(MINIMAL_OBJECTS) $(OBJS)\minimal_minimal.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(MINIMAL_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\minimal_minimal.res | diff --git a/samples/minimal/makefile.gcc b/samples/minimal/makefile.gcc index e506c302fc..7fa4f62ef2 100644 --- a/samples/minimal/makefile.gcc +++ b/samples/minimal/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -MINIMAL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MINIMAL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +MINIMAL_OBJECTS = \ + $(OBJS)\minimal_minimal.o \ + $(OBJS)\minimal_minimal_rc.o +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\minimal_minimal.o: .\minimal.cpp $(CXX) -c -o $@ $(MINIMAL_CXXFLAGS) $< $(OBJS)\minimal_minimal_rc.o: .\minimal.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\minimal.exe del $(OBJS)\minimal.exe -$(OBJS)\minimal.exe: $(OBJS)\minimal_minimal.o $(OBJS)\minimal_minimal_rc.o - $(CXX) -o $@ $(OBJS)\minimal_minimal.o $(OBJS)\minimal_minimal_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\minimal.exe: $(MINIMAL_OBJECTS) $(OBJS)\minimal_minimal_rc.o + $(CXX) -o $@ $(MINIMAL_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/minimal/makefile.vc b/samples/minimal/makefile.vc index 9947596c4c..cd0d9a189e 100644 --- a/samples/minimal/makefile.vc +++ b/samples/minimal/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -MINIMAL_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\minimal.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MINIMAL_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\minimal.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +MINIMAL_OBJECTS = \ + $(OBJS)\minimal_minimal.obj \ + $(OBJS)\minimal_minimal.res +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\minimal_minimal.obj: .\minimal.cpp $(CXX) /c /nologo /TP /Fo$@ $(MINIMAL_CXXFLAGS) $** $(OBJS)\minimal_minimal.res: .\minimal.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\minimal.exe del $(OBJS)\minimal.exe -$(OBJS)\minimal.exe: $(OBJS)\minimal_minimal.obj $(OBJS)\minimal_minimal.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\minimal_minimal.obj $(OBJS)\minimal_minimal.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\minimal.exe: $(MINIMAL_OBJECTS) $(OBJS)\minimal_minimal.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(MINIMAL_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/minimal/makefile.wat b/samples/minimal/makefile.wat index ce9e55d121..d9abbe875b 100644 --- a/samples/minimal/makefile.wat +++ b/samples/minimal/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -MINIMAL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MINIMAL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +MINIMAL_OBJECTS = & + $(OBJS)\minimal_minimal.obj +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\minimal_minimal.obj : .AUTODEPEND .\minimal.cpp $(CXX) -zq -fo=$^@ $(MINIMAL_CXXFLAGS) $< $(OBJS)\minimal_minimal.res : .AUTODEPEND .\minimal.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\minimal.exe del $(OBJS)\minimal.exe -$(OBJS)\minimal.exe : $(OBJS)\minimal_minimal.obj $(OBJS)\minimal_minimal.res +$(OBJS)\minimal.exe : $(MINIMAL_OBJECTS) $(OBJS)\minimal_minimal.res @%create $(OBJS)\minimal.lbc @%append $(OBJS)\minimal.lbc option quiet @%append $(OBJS)\minimal.lbc name $^@ @%append $(OBJS)\minimal.lbc option incremental - @%append $(OBJS)\minimal.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\minimal_minimal.obj) do @%append $(OBJS)\minimal.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\minimal.lbc library %i + @%append $(OBJS)\minimal.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(MINIMAL_OBJECTS)) do @%append $(OBJS)\minimal.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\minimal.lbc library %i @%append $(OBJS)\minimal.lbc option resource=$(OBJS)\minimal_minimal.res wlink @$(OBJS)\minimal.lbc diff --git a/samples/mobile/Makefile.in b/samples/mobile/Makefile.in index e0df92ba0c..e6ed297ccc 100644 --- a/samples/mobile/Makefile.in +++ b/samples/mobile/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib MOBILE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +MOBILE_OBJECTS = \ + mobile_mobile.o \ + $(__mobile___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ MOBILE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ MOBILE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ mobile$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o mobile$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: mobile$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f mobile$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -mobile$(EXEEXT): mobile_mobile.o $(__mobile___win32rc) - $(CXX) -o $@ mobile_mobile.o $(__mobile___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +mobile$(EXEEXT): $(MOBILE_OBJECTS) $(__mobile___win32rc) + $(CXX) -o $@ $(MOBILE_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__mobile___mac_rezcmd) $(__mobile___mac_setfilecmd) diff --git a/samples/mobile/makefile.bcc b/samples/mobile/makefile.bcc index 05d6055fe9..498c507716 100644 --- a/samples/mobile/makefile.bcc +++ b/samples/mobile/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -MOBILE_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MOBILE_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +MOBILE_OBJECTS = \ + $(OBJS)\mobile_mobile.obj OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\mobile_mobile.obj: .\mobile.cpp $(CXX) -q -c -P -o$@ $(MOBILE_CXXFLAGS) $** $(OBJS)\mobile_mobile.res: .\mobile.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\mobile.exe del $(OBJS)\mobile.exe -$(OBJS)\mobile.exe: $(OBJS)\mobile_mobile.obj $(OBJS)\mobile_mobile.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\mobile_mobile.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\mobile_mobile.res +$(OBJS)\mobile.exe: $(MOBILE_OBJECTS) $(OBJS)\mobile_mobile.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(MOBILE_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\mobile_mobile.res | diff --git a/samples/mobile/makefile.gcc b/samples/mobile/makefile.gcc index 6c5e9d5208..01c4b65847 100644 --- a/samples/mobile/makefile.gcc +++ b/samples/mobile/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -MOBILE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MOBILE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +MOBILE_OBJECTS = \ + $(OBJS)\mobile_mobile.o \ + $(OBJS)\mobile_mobile_rc.o +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\mobile_mobile.o: .\mobile.cpp $(CXX) -c -o $@ $(MOBILE_CXXFLAGS) $< $(OBJS)\mobile_mobile_rc.o: .\mobile.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\mobile.exe del $(OBJS)\mobile.exe -$(OBJS)\mobile.exe: $(OBJS)\mobile_mobile.o $(OBJS)\mobile_mobile_rc.o - $(CXX) -o $@ $(OBJS)\mobile_mobile.o $(OBJS)\mobile_mobile_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\mobile.exe: $(MOBILE_OBJECTS) $(OBJS)\mobile_mobile_rc.o + $(CXX) -o $@ $(MOBILE_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/mobile/makefile.vc b/samples/mobile/makefile.vc index ca554e23a5..bbc49683cc 100644 --- a/samples/mobile/makefile.vc +++ b/samples/mobile/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -MOBILE_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\mobile.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MOBILE_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) /DWIN32 \ + $(__DEBUGINFO_0) /Fd$(OBJS)\mobile.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +MOBILE_OBJECTS = \ + $(OBJS)\mobile_mobile.obj \ + $(OBJS)\mobile_mobile.res +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\mobile_mobile.obj: .\mobile.cpp $(CXX) /c /nologo /TP /Fo$@ $(MOBILE_CXXFLAGS) $** $(OBJS)\mobile_mobile.res: .\mobile.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\mobile.exe del $(OBJS)\mobile.exe -$(OBJS)\mobile.exe: $(OBJS)\mobile_mobile.obj $(OBJS)\mobile_mobile.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\mobile_mobile.obj $(OBJS)\mobile_mobile.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\mobile.exe: $(MOBILE_OBJECTS) $(OBJS)\mobile_mobile.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(MOBILE_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/mobile/makefile.wat b/samples/mobile/makefile.wat index bd295a219d..2c6fac539c 100644 --- a/samples/mobile/makefile.wat +++ b/samples/mobile/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -MOBILE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MOBILE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +MOBILE_OBJECTS = & + $(OBJS)\mobile_mobile.obj +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\mobile_mobile.obj : .AUTODEPEND .\mobile.cpp $(CXX) -zq -fo=$^@ $(MOBILE_CXXFLAGS) $< $(OBJS)\mobile_mobile.res : .AUTODEPEND .\mobile.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\mobile.exe del $(OBJS)\mobile.exe -$(OBJS)\mobile.exe : $(OBJS)\mobile_mobile.obj $(OBJS)\mobile_mobile.res +$(OBJS)\mobile.exe : $(MOBILE_OBJECTS) $(OBJS)\mobile_mobile.res @%create $(OBJS)\mobile.lbc @%append $(OBJS)\mobile.lbc option quiet @%append $(OBJS)\mobile.lbc name $^@ @%append $(OBJS)\mobile.lbc option incremental - @%append $(OBJS)\mobile.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\mobile_mobile.obj) do @%append $(OBJS)\mobile.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\mobile.lbc library %i + @%append $(OBJS)\mobile.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(MOBILE_OBJECTS)) do @%append $(OBJS)\mobile.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\mobile.lbc library %i @%append $(OBJS)\mobile.lbc option resource=$(OBJS)\mobile_mobile.res wlink @$(OBJS)\mobile.lbc diff --git a/samples/multimon/Makefile.in b/samples/multimon/Makefile.in index 2f7fd3f614..c15f974d48 100644 --- a/samples/multimon/Makefile.in +++ b/samples/multimon/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib MULTIMON_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +MULTIMON_OBJECTS = \ + multimon_multimon.o \ + $(__multimon___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ MULTIMON_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ MULTIMON_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ multimon$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o multimon$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: multimon$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f multimon$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -multimon$(EXEEXT): multimon_multimon.o $(__multimon___win32rc) - $(CXX) -o $@ multimon_multimon.o $(__multimon___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +multimon$(EXEEXT): $(MULTIMON_OBJECTS) $(__multimon___win32rc) + $(CXX) -o $@ $(MULTIMON_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__multimon___mac_rezcmd) $(__multimon___mac_setfilecmd) diff --git a/samples/multimon/makefile.bcc b/samples/multimon/makefile.bcc index 7bfcbaa3cf..8e9ba626ea 100644 --- a/samples/multimon/makefile.bcc +++ b/samples/multimon/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -MULTIMON_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MULTIMON_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +MULTIMON_OBJECTS = \ + $(OBJS)\multimon_multimon.obj OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\multimon_multimon.obj: .\multimon.cpp $(CXX) -q -c -P -o$@ $(MULTIMON_CXXFLAGS) $** $(OBJS)\multimon_multimon.res: .\multimon.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\multimon.exe del $(OBJS)\multimon.exe -$(OBJS)\multimon.exe: $(OBJS)\multimon_multimon.obj $(OBJS)\multimon_multimon.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\multimon_multimon.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\multimon_multimon.res +$(OBJS)\multimon.exe: $(MULTIMON_OBJECTS) $(OBJS)\multimon_multimon.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(MULTIMON_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\multimon_multimon.res | diff --git a/samples/multimon/makefile.gcc b/samples/multimon/makefile.gcc index 4ee8fea3ab..3a6974b18b 100644 --- a/samples/multimon/makefile.gcc +++ b/samples/multimon/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -MULTIMON_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MULTIMON_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +MULTIMON_OBJECTS = \ + $(OBJS)\multimon_multimon.o \ + $(OBJS)\multimon_multimon_rc.o +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\multimon_multimon.o: .\multimon.cpp $(CXX) -c -o $@ $(MULTIMON_CXXFLAGS) $< $(OBJS)\multimon_multimon_rc.o: .\multimon.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\multimon.exe del $(OBJS)\multimon.exe -$(OBJS)\multimon.exe: $(OBJS)\multimon_multimon.o $(OBJS)\multimon_multimon_rc.o - $(CXX) -o $@ $(OBJS)\multimon_multimon.o $(OBJS)\multimon_multimon_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\multimon.exe: $(MULTIMON_OBJECTS) $(OBJS)\multimon_multimon_rc.o + $(CXX) -o $@ $(MULTIMON_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/multimon/makefile.vc b/samples/multimon/makefile.vc index adbced1281..9481ec156c 100644 --- a/samples/multimon/makefile.vc +++ b/samples/multimon/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -MULTIMON_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\multimon.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MULTIMON_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\multimon.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +MULTIMON_OBJECTS = \ + $(OBJS)\multimon_multimon.obj \ + $(OBJS)\multimon_multimon.res +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\multimon_multimon.obj: .\multimon.cpp $(CXX) /c /nologo /TP /Fo$@ $(MULTIMON_CXXFLAGS) $** $(OBJS)\multimon_multimon.res: .\multimon.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\multimon.exe del $(OBJS)\multimon.exe -$(OBJS)\multimon.exe: $(OBJS)\multimon_multimon.obj $(OBJS)\multimon_multimon.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\multimon_multimon.obj $(OBJS)\multimon_multimon.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\multimon.exe: $(MULTIMON_OBJECTS) $(OBJS)\multimon_multimon.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(MULTIMON_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/multimon/makefile.wat b/samples/multimon/makefile.wat index 64ef02ec0a..64a56aeb77 100644 --- a/samples/multimon/makefile.wat +++ b/samples/multimon/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -MULTIMON_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +MULTIMON_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +MULTIMON_OBJECTS = & + $(OBJS)\multimon_multimon.obj +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\multimon_multimon.obj : .AUTODEPEND .\multimon.cpp $(CXX) -zq -fo=$^@ $(MULTIMON_CXXFLAGS) $< $(OBJS)\multimon_multimon.res : .AUTODEPEND .\multimon.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\multimon.exe del $(OBJS)\multimon.exe -$(OBJS)\multimon.exe : $(OBJS)\multimon_multimon.obj $(OBJS)\multimon_multimon.res +$(OBJS)\multimon.exe : $(MULTIMON_OBJECTS) $(OBJS)\multimon_multimon.res @%create $(OBJS)\multimon.lbc @%append $(OBJS)\multimon.lbc option quiet @%append $(OBJS)\multimon.lbc name $^@ @%append $(OBJS)\multimon.lbc option incremental - @%append $(OBJS)\multimon.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\multimon_multimon.obj) do @%append $(OBJS)\multimon.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\multimon.lbc library %i + @%append $(OBJS)\multimon.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(MULTIMON_OBJECTS)) do @%append $(OBJS)\multimon.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\multimon.lbc library %i @%append $(OBJS)\multimon.lbc option resource=$(OBJS)\multimon_multimon.res wlink @$(OBJS)\multimon.lbc diff --git a/samples/nativdlg/Makefile.in b/samples/nativdlg/Makefile.in index 60ee6b5edb..c5e7423b14 100644 --- a/samples/nativdlg/Makefile.in +++ b/samples/nativdlg/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib NATIVDLG_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +NATIVDLG_OBJECTS = \ + nativdlg_nativdlg.o \ + $(__nativdlg___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ NATIVDLG_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ NATIVDLG_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ nativdlg$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o nativdlg$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: nativdlg$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f nativdlg$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -nativdlg$(EXEEXT): nativdlg_nativdlg.o $(__nativdlg___win32rc) - $(CXX) -o $@ nativdlg_nativdlg.o $(__nativdlg___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +nativdlg$(EXEEXT): $(NATIVDLG_OBJECTS) $(__nativdlg___win32rc) + $(CXX) -o $@ $(NATIVDLG_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__nativdlg___mac_rezcmd) $(__nativdlg___mac_setfilecmd) diff --git a/samples/nativdlg/makefile.bcc b/samples/nativdlg/makefile.bcc index 2ac5f18202..43ce2c6ec5 100644 --- a/samples/nativdlg/makefile.bcc +++ b/samples/nativdlg/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -NATIVDLG_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +NATIVDLG_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +NATIVDLG_OBJECTS = \ + $(OBJS)\nativdlg_nativdlg.obj OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\nativdlg_nativdlg.obj: .\nativdlg.cpp $(CXX) -q -c -P -o$@ $(NATIVDLG_CXXFLAGS) $** $(OBJS)\nativdlg_nativdlg.res: .\nativdlg.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\nativdlg.exe del $(OBJS)\nativdlg.exe -$(OBJS)\nativdlg.exe: $(OBJS)\nativdlg_nativdlg.obj $(OBJS)\nativdlg_nativdlg.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\nativdlg_nativdlg.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\nativdlg_nativdlg.res +$(OBJS)\nativdlg.exe: $(NATIVDLG_OBJECTS) $(OBJS)\nativdlg_nativdlg.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(NATIVDLG_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\nativdlg_nativdlg.res | diff --git a/samples/nativdlg/makefile.gcc b/samples/nativdlg/makefile.gcc index c0d78a23ef..d091ae6831 100644 --- a/samples/nativdlg/makefile.gcc +++ b/samples/nativdlg/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -NATIVDLG_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +NATIVDLG_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +NATIVDLG_OBJECTS = \ + $(OBJS)\nativdlg_nativdlg.o \ + $(OBJS)\nativdlg_nativdlg_rc.o +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\nativdlg_nativdlg.o: .\nativdlg.cpp $(CXX) -c -o $@ $(NATIVDLG_CXXFLAGS) $< $(OBJS)\nativdlg_nativdlg_rc.o: .\nativdlg.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\nativdlg.exe del $(OBJS)\nativdlg.exe -$(OBJS)\nativdlg.exe: $(OBJS)\nativdlg_nativdlg.o $(OBJS)\nativdlg_nativdlg_rc.o - $(CXX) -o $@ $(OBJS)\nativdlg_nativdlg.o $(OBJS)\nativdlg_nativdlg_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\nativdlg.exe: $(NATIVDLG_OBJECTS) $(OBJS)\nativdlg_nativdlg_rc.o + $(CXX) -o $@ $(NATIVDLG_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/nativdlg/makefile.vc b/samples/nativdlg/makefile.vc index 54964deb29..5bf2bcdccc 100644 --- a/samples/nativdlg/makefile.vc +++ b/samples/nativdlg/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -NATIVDLG_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\nativdlg.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +NATIVDLG_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\nativdlg.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +NATIVDLG_OBJECTS = \ + $(OBJS)\nativdlg_nativdlg.obj \ + $(OBJS)\nativdlg_nativdlg.res +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\nativdlg_nativdlg.obj: .\nativdlg.cpp $(CXX) /c /nologo /TP /Fo$@ $(NATIVDLG_CXXFLAGS) $** $(OBJS)\nativdlg_nativdlg.res: .\nativdlg.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\nativdlg.exe del $(OBJS)\nativdlg.exe -$(OBJS)\nativdlg.exe: $(OBJS)\nativdlg_nativdlg.obj $(OBJS)\nativdlg_nativdlg.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\nativdlg_nativdlg.obj $(OBJS)\nativdlg_nativdlg.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\nativdlg.exe: $(NATIVDLG_OBJECTS) $(OBJS)\nativdlg_nativdlg.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(NATIVDLG_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/nativdlg/makefile.wat b/samples/nativdlg/makefile.wat index fb29d1ef99..5c6d72e5aa 100644 --- a/samples/nativdlg/makefile.wat +++ b/samples/nativdlg/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -NATIVDLG_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +NATIVDLG_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +NATIVDLG_OBJECTS = & + $(OBJS)\nativdlg_nativdlg.obj +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\nativdlg_nativdlg.obj : .AUTODEPEND .\nativdlg.cpp $(CXX) -zq -fo=$^@ $(NATIVDLG_CXXFLAGS) $< $(OBJS)\nativdlg_nativdlg.res : .AUTODEPEND .\nativdlg.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\nativdlg.exe del $(OBJS)\nativdlg.exe -$(OBJS)\nativdlg.exe : $(OBJS)\nativdlg_nativdlg.obj $(OBJS)\nativdlg_nativdlg.res +$(OBJS)\nativdlg.exe : $(NATIVDLG_OBJECTS) $(OBJS)\nativdlg_nativdlg.res @%create $(OBJS)\nativdlg.lbc @%append $(OBJS)\nativdlg.lbc option quiet @%append $(OBJS)\nativdlg.lbc name $^@ @%append $(OBJS)\nativdlg.lbc option incremental - @%append $(OBJS)\nativdlg.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\nativdlg_nativdlg.obj) do @%append $(OBJS)\nativdlg.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\nativdlg.lbc library %i + @%append $(OBJS)\nativdlg.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(NATIVDLG_OBJECTS)) do @%append $(OBJS)\nativdlg.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\nativdlg.lbc library %i @%append $(OBJS)\nativdlg.lbc option resource=$(OBJS)\nativdlg_nativdlg.res wlink @$(OBJS)\nativdlg.lbc diff --git a/samples/newgrid/Makefile.in b/samples/newgrid/Makefile.in index 23538f2f45..97f72882a8 100644 --- a/samples/newgrid/Makefile.in +++ b/samples/newgrid/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib NEWGRID_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +NEWGRID_OBJECTS = \ + newgrid_newgrid.o \ + $(__newgrid___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ NEWGRID_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ NEWGRID_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ newgrid$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o newgrid$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: newgrid$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f newgrid$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -newgrid$(EXEEXT): newgrid_newgrid.o $(__newgrid___win32rc) - $(CXX) -o $@ newgrid_newgrid.o $(__newgrid___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +newgrid$(EXEEXT): $(NEWGRID_OBJECTS) $(__newgrid___win32rc) + $(CXX) -o $@ $(NEWGRID_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__newgrid___mac_rezcmd) $(__newgrid___mac_setfilecmd) diff --git a/samples/newgrid/makefile.bcc b/samples/newgrid/makefile.bcc index 6a8ea4735a..8e6bd8fba5 100644 --- a/samples/newgrid/makefile.bcc +++ b/samples/newgrid/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -NEWGRID_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +NEWGRID_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +NEWGRID_OBJECTS = \ + $(OBJS)\newgrid_newgrid.obj OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\newgrid_newgrid.obj: .\newgrid.cpp $(CXX) -q -c -P -o$@ $(NEWGRID_CXXFLAGS) $** $(OBJS)\newgrid_newgrid.res: .\newgrid.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\newgrid.exe del $(OBJS)\newgrid.exe -$(OBJS)\newgrid.exe: $(OBJS)\newgrid_newgrid.obj $(OBJS)\newgrid_newgrid.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\newgrid_newgrid.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\newgrid_newgrid.res +$(OBJS)\newgrid.exe: $(NEWGRID_OBJECTS) $(OBJS)\newgrid_newgrid.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(NEWGRID_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\newgrid_newgrid.res | diff --git a/samples/newgrid/makefile.gcc b/samples/newgrid/makefile.gcc index fdf1ada707..84ad0f3111 100644 --- a/samples/newgrid/makefile.gcc +++ b/samples/newgrid/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -NEWGRID_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +NEWGRID_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +NEWGRID_OBJECTS = \ + $(OBJS)\newgrid_newgrid.o \ + $(OBJS)\newgrid_newgrid_rc.o +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\newgrid_newgrid.o: .\newgrid.cpp $(CXX) -c -o $@ $(NEWGRID_CXXFLAGS) $< $(OBJS)\newgrid_newgrid_rc.o: .\newgrid.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\newgrid.exe del $(OBJS)\newgrid.exe -$(OBJS)\newgrid.exe: $(OBJS)\newgrid_newgrid.o $(OBJS)\newgrid_newgrid_rc.o - $(CXX) -o $@ $(OBJS)\newgrid_newgrid.o $(OBJS)\newgrid_newgrid_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\newgrid.exe: $(NEWGRID_OBJECTS) $(OBJS)\newgrid_newgrid_rc.o + $(CXX) -o $@ $(NEWGRID_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/newgrid/makefile.vc b/samples/newgrid/makefile.vc index d6a98bd898..cb8b5c5793 100644 --- a/samples/newgrid/makefile.vc +++ b/samples/newgrid/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -NEWGRID_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\newgrid.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +NEWGRID_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\newgrid.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +NEWGRID_OBJECTS = \ + $(OBJS)\newgrid_newgrid.obj \ + $(OBJS)\newgrid_newgrid.res +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\newgrid_newgrid.obj: .\newgrid.cpp $(CXX) /c /nologo /TP /Fo$@ $(NEWGRID_CXXFLAGS) $** $(OBJS)\newgrid_newgrid.res: .\newgrid.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\newgrid.exe del $(OBJS)\newgrid.exe -$(OBJS)\newgrid.exe: $(OBJS)\newgrid_newgrid.obj $(OBJS)\newgrid_newgrid.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\newgrid_newgrid.obj $(OBJS)\newgrid_newgrid.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\newgrid.exe: $(NEWGRID_OBJECTS) $(OBJS)\newgrid_newgrid.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(NEWGRID_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/newgrid/makefile.wat b/samples/newgrid/makefile.wat index 75c0f748df..6605978b93 100644 --- a/samples/newgrid/makefile.wat +++ b/samples/newgrid/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -NEWGRID_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +NEWGRID_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +NEWGRID_OBJECTS = & + $(OBJS)\newgrid_newgrid.obj +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\newgrid_newgrid.obj : .AUTODEPEND .\newgrid.cpp $(CXX) -zq -fo=$^@ $(NEWGRID_CXXFLAGS) $< $(OBJS)\newgrid_newgrid.res : .AUTODEPEND .\newgrid.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\newgrid.exe del $(OBJS)\newgrid.exe -$(OBJS)\newgrid.exe : $(OBJS)\newgrid_newgrid.obj $(OBJS)\newgrid_newgrid.res +$(OBJS)\newgrid.exe : $(NEWGRID_OBJECTS) $(OBJS)\newgrid_newgrid.res @%create $(OBJS)\newgrid.lbc @%append $(OBJS)\newgrid.lbc option quiet @%append $(OBJS)\newgrid.lbc name $^@ @%append $(OBJS)\newgrid.lbc option incremental - @%append $(OBJS)\newgrid.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\newgrid_newgrid.obj) do @%append $(OBJS)\newgrid.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\newgrid.lbc library %i + @%append $(OBJS)\newgrid.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(NEWGRID_OBJECTS)) do @%append $(OBJS)\newgrid.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\newgrid.lbc library %i @%append $(OBJS)\newgrid.lbc option resource=$(OBJS)\newgrid_newgrid.res wlink @$(OBJS)\newgrid.lbc diff --git a/samples/notebook/Makefile.in b/samples/notebook/Makefile.in index 26443a5fb7..e07e7a200c 100644 --- a/samples/notebook/Makefile.in +++ b/samples/notebook/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib NOTEBOOK_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +NOTEBOOK_OBJECTS = \ + notebook_notebook.o \ + $(__notebook___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ NOTEBOOK_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ NOTEBOOK_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ notebook$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o notebook$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: notebook$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f notebook$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -notebook$(EXEEXT): notebook_notebook.o $(__notebook___win32rc) - $(CXX) -o $@ notebook_notebook.o $(__notebook___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +notebook$(EXEEXT): $(NOTEBOOK_OBJECTS) $(__notebook___win32rc) + $(CXX) -o $@ $(NOTEBOOK_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__notebook___mac_rezcmd) $(__notebook___mac_setfilecmd) diff --git a/samples/notebook/makefile.bcc b/samples/notebook/makefile.bcc index 3a57297346..b645131bf5 100644 --- a/samples/notebook/makefile.bcc +++ b/samples/notebook/makefile.bcc @@ -20,12 +20,15 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -NOTEBOOK_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +NOTEBOOK_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +NOTEBOOK_OBJECTS = \ + $(OBJS)\notebook_notebook.obj OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\notebook_notebook.obj: .\notebook.cpp $(CXX) -q -c -P -o$@ $(NOTEBOOK_CXXFLAGS) $** $(OBJS)\notebook_notebook.res: .\notebook.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\notebook.exe del $(OBJS)\notebook.exe -$(OBJS)\notebook.exe: $(OBJS)\notebook_notebook.obj $(OBJS)\notebook_notebook.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\notebook_notebook.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\notebook_notebook.res +$(OBJS)\notebook.exe: $(NOTEBOOK_OBJECTS) $(OBJS)\notebook_notebook.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(NOTEBOOK_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\notebook_notebook.res | diff --git a/samples/notebook/makefile.gcc b/samples/notebook/makefile.gcc index 94f735d6e7..3f6ad4ac57 100644 --- a/samples/notebook/makefile.gcc +++ b/samples/notebook/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -NOTEBOOK_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +NOTEBOOK_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +NOTEBOOK_OBJECTS = \ + $(OBJS)\notebook_notebook.o \ + $(OBJS)\notebook_notebook_rc.o +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\notebook_notebook.o: .\notebook.cpp $(CXX) -c -o $@ $(NOTEBOOK_CXXFLAGS) $< $(OBJS)\notebook_notebook_rc.o: .\notebook.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\notebook.exe del $(OBJS)\notebook.exe -$(OBJS)\notebook.exe: $(OBJS)\notebook_notebook.o $(OBJS)\notebook_notebook_rc.o - $(CXX) -o $@ $(OBJS)\notebook_notebook.o $(OBJS)\notebook_notebook_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\notebook.exe: $(NOTEBOOK_OBJECTS) $(OBJS)\notebook_notebook_rc.o + $(CXX) -o $@ $(NOTEBOOK_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/notebook/makefile.vc b/samples/notebook/makefile.vc index f95d3cb4b9..d8d564ddcb 100644 --- a/samples/notebook/makefile.vc +++ b/samples/notebook/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -NOTEBOOK_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\notebook.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +NOTEBOOK_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\notebook.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +NOTEBOOK_OBJECTS = \ + $(OBJS)\notebook_notebook.obj \ + $(OBJS)\notebook_notebook.res +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\notebook_notebook.obj: .\notebook.cpp $(CXX) /c /nologo /TP /Fo$@ $(NOTEBOOK_CXXFLAGS) $** $(OBJS)\notebook_notebook.res: .\notebook.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\notebook.exe del $(OBJS)\notebook.exe -$(OBJS)\notebook.exe: $(OBJS)\notebook_notebook.obj $(OBJS)\notebook_notebook.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\notebook_notebook.obj $(OBJS)\notebook_notebook.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\notebook.exe: $(NOTEBOOK_OBJECTS) $(OBJS)\notebook_notebook.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(NOTEBOOK_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/notebook/makefile.wat b/samples/notebook/makefile.wat index d01be382e4..30bf135841 100644 --- a/samples/notebook/makefile.wat +++ b/samples/notebook/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -NOTEBOOK_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +NOTEBOOK_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +NOTEBOOK_OBJECTS = & + $(OBJS)\notebook_notebook.obj +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) @@ -126,7 +180,7 @@ $(OBJS)\notebook_notebook.obj : .AUTODEPEND .\notebook.cpp $(CXX) -zq -fo=$^@ $(NOTEBOOK_CXXFLAGS) $< $(OBJS)\notebook_notebook.res : .AUTODEPEND .\notebook.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\notebook.exe del $(OBJS)\notebook.exe -$(OBJS)\notebook.exe : $(OBJS)\notebook_notebook.obj $(OBJS)\notebook_notebook.res +$(OBJS)\notebook.exe : $(NOTEBOOK_OBJECTS) $(OBJS)\notebook_notebook.res @%create $(OBJS)\notebook.lbc @%append $(OBJS)\notebook.lbc option quiet @%append $(OBJS)\notebook.lbc name $^@ @%append $(OBJS)\notebook.lbc option incremental - @%append $(OBJS)\notebook.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\notebook_notebook.obj) do @%append $(OBJS)\notebook.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\notebook.lbc library %i + @%append $(OBJS)\notebook.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(NOTEBOOK_OBJECTS)) do @%append $(OBJS)\notebook.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\notebook.lbc library %i @%append $(OBJS)\notebook.lbc option resource=$(OBJS)\notebook_notebook.res wlink @$(OBJS)\notebook.lbc diff --git a/samples/oleauto/Makefile.in b/samples/oleauto/Makefile.in index 72148f3d0b..404e19be31 100644 --- a/samples/oleauto/Makefile.in +++ b/samples/oleauto/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib OLEAUTO_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +OLEAUTO_OBJECTS = \ + oleauto_oleauto.o \ + $(__oleauto___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ OLEAUTO_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ OLEAUTO_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ oleauto$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o oleauto$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: oleauto$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f oleauto$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -oleauto$(EXEEXT): oleauto_oleauto.o $(__oleauto___win32rc) - $(CXX) -o $@ oleauto_oleauto.o $(__oleauto___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +oleauto$(EXEEXT): $(OLEAUTO_OBJECTS) $(__oleauto___win32rc) + $(CXX) -o $@ $(OLEAUTO_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__oleauto___mac_rezcmd) $(__oleauto___mac_setfilecmd) diff --git a/samples/oleauto/makefile.bcc b/samples/oleauto/makefile.bcc index 3c8835bd5a..4fd1dbb7aa 100644 --- a/samples/oleauto/makefile.bcc +++ b/samples/oleauto/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -OLEAUTO_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +OLEAUTO_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +OLEAUTO_OBJECTS = \ + $(OBJS)\oleauto_oleauto.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\oleauto_oleauto.obj: .\oleauto.cpp $(CXX) -q -c -P -o$@ $(OLEAUTO_CXXFLAGS) $** $(OBJS)\oleauto_oleauto.res: .\oleauto.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\oleauto.exe del $(OBJS)\oleauto.exe -$(OBJS)\oleauto.exe: $(OBJS)\oleauto_oleauto.obj $(OBJS)\oleauto_oleauto.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\oleauto_oleauto.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\oleauto_oleauto.res +$(OBJS)\oleauto.exe: $(OLEAUTO_OBJECTS) $(OBJS)\oleauto_oleauto.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(OLEAUTO_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\oleauto_oleauto.res | diff --git a/samples/oleauto/makefile.gcc b/samples/oleauto/makefile.gcc index 51e8a7406c..c2cdb1490c 100644 --- a/samples/oleauto/makefile.gcc +++ b/samples/oleauto/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -OLEAUTO_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OLEAUTO_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +OLEAUTO_OBJECTS = \ + $(OBJS)\oleauto_oleauto.o \ + $(OBJS)\oleauto_oleauto_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\oleauto_oleauto.o: .\oleauto.cpp $(CXX) -c -o $@ $(OLEAUTO_CXXFLAGS) $< $(OBJS)\oleauto_oleauto_rc.o: .\oleauto.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\oleauto.exe del $(OBJS)\oleauto.exe -$(OBJS)\oleauto.exe: $(OBJS)\oleauto_oleauto.o $(OBJS)\oleauto_oleauto_rc.o - $(CXX) -o $@ $(OBJS)\oleauto_oleauto.o $(OBJS)\oleauto_oleauto_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\oleauto.exe: $(OLEAUTO_OBJECTS) $(OBJS)\oleauto_oleauto_rc.o + $(CXX) -o $@ $(OLEAUTO_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/oleauto/makefile.vc b/samples/oleauto/makefile.vc index 285d87070f..b93dfbd635 100644 --- a/samples/oleauto/makefile.vc +++ b/samples/oleauto/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -OLEAUTO_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\oleauto.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OLEAUTO_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\oleauto.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +OLEAUTO_OBJECTS = \ + $(OBJS)\oleauto_oleauto.obj \ + $(OBJS)\oleauto_oleauto.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\oleauto_oleauto.obj: .\oleauto.cpp $(CXX) /c /nologo /TP /Fo$@ $(OLEAUTO_CXXFLAGS) $** $(OBJS)\oleauto_oleauto.res: .\oleauto.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\oleauto.exe del $(OBJS)\oleauto.exe -$(OBJS)\oleauto.exe: $(OBJS)\oleauto_oleauto.obj $(OBJS)\oleauto_oleauto.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\oleauto_oleauto.obj $(OBJS)\oleauto_oleauto.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\oleauto.exe: $(OLEAUTO_OBJECTS) $(OBJS)\oleauto_oleauto.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(OLEAUTO_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/oleauto/makefile.wat b/samples/oleauto/makefile.wat index 6ba4bb729c..c74089a224 100644 --- a/samples/oleauto/makefile.wat +++ b/samples/oleauto/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -OLEAUTO_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OLEAUTO_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +OLEAUTO_OBJECTS = & + $(OBJS)\oleauto_oleauto.obj @@ -126,7 +180,7 @@ $(OBJS)\oleauto_oleauto.obj : .AUTODEPEND .\oleauto.cpp $(CXX) -zq -fo=$^@ $(OLEAUTO_CXXFLAGS) $< $(OBJS)\oleauto_oleauto.res : .AUTODEPEND .\oleauto.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\oleauto.exe del $(OBJS)\oleauto.exe -$(OBJS)\oleauto.exe : $(OBJS)\oleauto_oleauto.obj $(OBJS)\oleauto_oleauto.res +$(OBJS)\oleauto.exe : $(OLEAUTO_OBJECTS) $(OBJS)\oleauto_oleauto.res @%create $(OBJS)\oleauto.lbc @%append $(OBJS)\oleauto.lbc option quiet @%append $(OBJS)\oleauto.lbc name $^@ @%append $(OBJS)\oleauto.lbc option incremental - @%append $(OBJS)\oleauto.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\oleauto_oleauto.obj) do @%append $(OBJS)\oleauto.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\oleauto.lbc library %i + @%append $(OBJS)\oleauto.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(OLEAUTO_OBJECTS)) do @%append $(OBJS)\oleauto.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\oleauto.lbc library %i @%append $(OBJS)\oleauto.lbc option resource=$(OBJS)\oleauto_oleauto.res wlink @$(OBJS)\oleauto.lbc diff --git a/samples/opengl/Makefile.in b/samples/opengl/Makefile.in index 64233ddb54..a2700f7586 100644 --- a/samples/opengl/Makefile.in +++ b/samples/opengl/Makefile.in @@ -23,7 +23,7 @@ all: cube clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o (cd cube && $(MAKE) clean) cube: diff --git a/samples/ownerdrw/Makefile.in b/samples/ownerdrw/Makefile.in index 5274612d3f..64c7d28efa 100644 --- a/samples/ownerdrw/Makefile.in +++ b/samples/ownerdrw/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib OWNERDRW_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +OWNERDRW_OBJECTS = \ + ownerdrw_ownerdrw.o \ + $(__ownerdrw___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ OWNERDRW_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ OWNERDRW_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ ownerdrw$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o ownerdrw$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: ownerdrw$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f ownerdrw$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -ownerdrw$(EXEEXT): ownerdrw_ownerdrw.o $(__ownerdrw___win32rc) - $(CXX) -o $@ ownerdrw_ownerdrw.o $(__ownerdrw___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +ownerdrw$(EXEEXT): $(OWNERDRW_OBJECTS) $(__ownerdrw___win32rc) + $(CXX) -o $@ $(OWNERDRW_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__ownerdrw___mac_rezcmd) $(__ownerdrw___mac_setfilecmd) diff --git a/samples/ownerdrw/makefile.bcc b/samples/ownerdrw/makefile.bcc index f6567023ba..cfc5e19126 100644 --- a/samples/ownerdrw/makefile.bcc +++ b/samples/ownerdrw/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -OWNERDRW_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +OWNERDRW_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +OWNERDRW_OBJECTS = \ + $(OBJS)\ownerdrw_ownerdrw.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\ownerdrw_ownerdrw.obj: .\ownerdrw.cpp $(CXX) -q -c -P -o$@ $(OWNERDRW_CXXFLAGS) $** $(OBJS)\ownerdrw_ownerdrw.res: .\ownerdrw.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\ownerdrw.exe del $(OBJS)\ownerdrw.exe -$(OBJS)\ownerdrw.exe: $(OBJS)\ownerdrw_ownerdrw.obj $(OBJS)\ownerdrw_ownerdrw.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\ownerdrw_ownerdrw.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\ownerdrw_ownerdrw.res +$(OBJS)\ownerdrw.exe: $(OWNERDRW_OBJECTS) $(OBJS)\ownerdrw_ownerdrw.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(OWNERDRW_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\ownerdrw_ownerdrw.res | diff --git a/samples/ownerdrw/makefile.gcc b/samples/ownerdrw/makefile.gcc index 0dacf2bdd4..6456d30b2c 100644 --- a/samples/ownerdrw/makefile.gcc +++ b/samples/ownerdrw/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -OWNERDRW_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OWNERDRW_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +OWNERDRW_OBJECTS = \ + $(OBJS)\ownerdrw_ownerdrw.o \ + $(OBJS)\ownerdrw_ownerdrw_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\ownerdrw_ownerdrw.o: .\ownerdrw.cpp $(CXX) -c -o $@ $(OWNERDRW_CXXFLAGS) $< $(OBJS)\ownerdrw_ownerdrw_rc.o: .\ownerdrw.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\ownerdrw.exe del $(OBJS)\ownerdrw.exe -$(OBJS)\ownerdrw.exe: $(OBJS)\ownerdrw_ownerdrw.o $(OBJS)\ownerdrw_ownerdrw_rc.o - $(CXX) -o $@ $(OBJS)\ownerdrw_ownerdrw.o $(OBJS)\ownerdrw_ownerdrw_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\ownerdrw.exe: $(OWNERDRW_OBJECTS) $(OBJS)\ownerdrw_ownerdrw_rc.o + $(CXX) -o $@ $(OWNERDRW_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/ownerdrw/makefile.vc b/samples/ownerdrw/makefile.vc index 11f2b8758e..37eaaad403 100644 --- a/samples/ownerdrw/makefile.vc +++ b/samples/ownerdrw/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -OWNERDRW_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\ownerdrw.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OWNERDRW_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\ownerdrw.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +OWNERDRW_OBJECTS = \ + $(OBJS)\ownerdrw_ownerdrw.obj \ + $(OBJS)\ownerdrw_ownerdrw.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\ownerdrw_ownerdrw.obj: .\ownerdrw.cpp $(CXX) /c /nologo /TP /Fo$@ $(OWNERDRW_CXXFLAGS) $** $(OBJS)\ownerdrw_ownerdrw.res: .\ownerdrw.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\ownerdrw.exe del $(OBJS)\ownerdrw.exe -$(OBJS)\ownerdrw.exe: $(OBJS)\ownerdrw_ownerdrw.obj $(OBJS)\ownerdrw_ownerdrw.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\ownerdrw_ownerdrw.obj $(OBJS)\ownerdrw_ownerdrw.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\ownerdrw.exe: $(OWNERDRW_OBJECTS) $(OBJS)\ownerdrw_ownerdrw.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(OWNERDRW_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/ownerdrw/makefile.wat b/samples/ownerdrw/makefile.wat index 325c84c067..716750845f 100644 --- a/samples/ownerdrw/makefile.wat +++ b/samples/ownerdrw/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -OWNERDRW_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OWNERDRW_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +OWNERDRW_OBJECTS = & + $(OBJS)\ownerdrw_ownerdrw.obj @@ -126,7 +180,7 @@ $(OBJS)\ownerdrw_ownerdrw.obj : .AUTODEPEND .\ownerdrw.cpp $(CXX) -zq -fo=$^@ $(OWNERDRW_CXXFLAGS) $< $(OBJS)\ownerdrw_ownerdrw.res : .AUTODEPEND .\ownerdrw.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\ownerdrw.exe del $(OBJS)\ownerdrw.exe -$(OBJS)\ownerdrw.exe : $(OBJS)\ownerdrw_ownerdrw.obj $(OBJS)\ownerdrw_ownerdrw.res +$(OBJS)\ownerdrw.exe : $(OWNERDRW_OBJECTS) $(OBJS)\ownerdrw_ownerdrw.res @%create $(OBJS)\ownerdrw.lbc @%append $(OBJS)\ownerdrw.lbc option quiet @%append $(OBJS)\ownerdrw.lbc name $^@ @%append $(OBJS)\ownerdrw.lbc option incremental - @%append $(OBJS)\ownerdrw.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\ownerdrw_ownerdrw.obj) do @%append $(OBJS)\ownerdrw.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\ownerdrw.lbc library %i + @%append $(OBJS)\ownerdrw.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(OWNERDRW_OBJECTS)) do @%append $(OBJS)\ownerdrw.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\ownerdrw.lbc library %i @%append $(OBJS)\ownerdrw.lbc option resource=$(OBJS)\ownerdrw_ownerdrw.res wlink @$(OBJS)\ownerdrw.lbc diff --git a/samples/printing/Makefile.in b/samples/printing/Makefile.in index 82054bc3f8..ae8840f2fe 100644 --- a/samples/printing/Makefile.in +++ b/samples/printing/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib PRINTING_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +PRINTING_OBJECTS = \ + printing_printing.o \ + $(__printing___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ PRINTING_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ PRINTING_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ printing$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o printing$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: printing$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f printing$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -printing$(EXEEXT): printing_printing.o $(__printing___win32rc) - $(CXX) -o $@ printing_printing.o $(__printing___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +printing$(EXEEXT): $(PRINTING_OBJECTS) $(__printing___win32rc) + $(CXX) -o $@ $(PRINTING_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__printing___mac_rezcmd) $(__printing___mac_setfilecmd) diff --git a/samples/printing/makefile.bcc b/samples/printing/makefile.bcc index 28191ded2d..690e812931 100644 --- a/samples/printing/makefile.bcc +++ b/samples/printing/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -PRINTING_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +PRINTING_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +PRINTING_OBJECTS = \ + $(OBJS)\printing_printing.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\printing_printing.obj: .\printing.cpp $(CXX) -q -c -P -o$@ $(PRINTING_CXXFLAGS) $** $(OBJS)\printing_printing.res: .\printing.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\printing.exe del $(OBJS)\printing.exe -$(OBJS)\printing.exe: $(OBJS)\printing_printing.obj $(OBJS)\printing_printing.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\printing_printing.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\printing_printing.res +$(OBJS)\printing.exe: $(PRINTING_OBJECTS) $(OBJS)\printing_printing.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(PRINTING_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\printing_printing.res | diff --git a/samples/printing/makefile.gcc b/samples/printing/makefile.gcc index 451b5b815e..753a14ba0e 100644 --- a/samples/printing/makefile.gcc +++ b/samples/printing/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -PRINTING_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +PRINTING_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +PRINTING_OBJECTS = \ + $(OBJS)\printing_printing.o \ + $(OBJS)\printing_printing_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\printing_printing.o: .\printing.cpp $(CXX) -c -o $@ $(PRINTING_CXXFLAGS) $< $(OBJS)\printing_printing_rc.o: .\printing.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\printing.exe del $(OBJS)\printing.exe -$(OBJS)\printing.exe: $(OBJS)\printing_printing.o $(OBJS)\printing_printing_rc.o - $(CXX) -o $@ $(OBJS)\printing_printing.o $(OBJS)\printing_printing_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\printing.exe: $(PRINTING_OBJECTS) $(OBJS)\printing_printing_rc.o + $(CXX) -o $@ $(PRINTING_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/printing/makefile.vc b/samples/printing/makefile.vc index 756fee60aa..996b10d165 100644 --- a/samples/printing/makefile.vc +++ b/samples/printing/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -PRINTING_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\printing.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +PRINTING_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\printing.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +PRINTING_OBJECTS = \ + $(OBJS)\printing_printing.obj \ + $(OBJS)\printing_printing.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\printing_printing.obj: .\printing.cpp $(CXX) /c /nologo /TP /Fo$@ $(PRINTING_CXXFLAGS) $** $(OBJS)\printing_printing.res: .\printing.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\printing.exe del $(OBJS)\printing.exe -$(OBJS)\printing.exe: $(OBJS)\printing_printing.obj $(OBJS)\printing_printing.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\printing_printing.obj $(OBJS)\printing_printing.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\printing.exe: $(PRINTING_OBJECTS) $(OBJS)\printing_printing.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(PRINTING_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/printing/makefile.wat b/samples/printing/makefile.wat index c69be9eaf7..be3bca5016 100644 --- a/samples/printing/makefile.wat +++ b/samples/printing/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -PRINTING_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +PRINTING_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +PRINTING_OBJECTS = & + $(OBJS)\printing_printing.obj @@ -126,7 +180,7 @@ $(OBJS)\printing_printing.obj : .AUTODEPEND .\printing.cpp $(CXX) -zq -fo=$^@ $(PRINTING_CXXFLAGS) $< $(OBJS)\printing_printing.res : .AUTODEPEND .\printing.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\printing.exe del $(OBJS)\printing.exe -$(OBJS)\printing.exe : $(OBJS)\printing_printing.obj $(OBJS)\printing_printing.res +$(OBJS)\printing.exe : $(PRINTING_OBJECTS) $(OBJS)\printing_printing.res @%create $(OBJS)\printing.lbc @%append $(OBJS)\printing.lbc option quiet @%append $(OBJS)\printing.lbc name $^@ @%append $(OBJS)\printing.lbc option incremental - @%append $(OBJS)\printing.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\printing_printing.obj) do @%append $(OBJS)\printing.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\printing.lbc library %i + @%append $(OBJS)\printing.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(PRINTING_OBJECTS)) do @%append $(OBJS)\printing.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\printing.lbc library %i @%append $(OBJS)\printing.lbc option resource=$(OBJS)\printing_printing.res wlink @$(OBJS)\printing.lbc diff --git a/samples/propsize/Makefile.in b/samples/propsize/Makefile.in index a3cd33856d..ab8379cc2e 100644 --- a/samples/propsize/Makefile.in +++ b/samples/propsize/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib PROPSIZE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +PROPSIZE_OBJECTS = \ + propsize_propsize.o \ + $(__propsize___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ PROPSIZE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ PROPSIZE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ propsize$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o propsize$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: propsize$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f propsize$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -propsize$(EXEEXT): propsize_propsize.o $(__propsize___win32rc) - $(CXX) -o $@ propsize_propsize.o $(__propsize___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +propsize$(EXEEXT): $(PROPSIZE_OBJECTS) $(__propsize___win32rc) + $(CXX) -o $@ $(PROPSIZE_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__propsize___mac_rezcmd) $(__propsize___mac_setfilecmd) diff --git a/samples/propsize/makefile.bcc b/samples/propsize/makefile.bcc index 95ca102f78..4b307399f6 100644 --- a/samples/propsize/makefile.bcc +++ b/samples/propsize/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -PROPSIZE_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +PROPSIZE_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +PROPSIZE_OBJECTS = \ + $(OBJS)\propsize_propsize.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\propsize_propsize.obj: .\propsize.cpp $(CXX) -q -c -P -o$@ $(PROPSIZE_CXXFLAGS) $** $(OBJS)\propsize_propsize.res: .\propsize.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\propsize.exe del $(OBJS)\propsize.exe -$(OBJS)\propsize.exe: $(OBJS)\propsize_propsize.obj $(OBJS)\propsize_propsize.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\propsize_propsize.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\propsize_propsize.res +$(OBJS)\propsize.exe: $(PROPSIZE_OBJECTS) $(OBJS)\propsize_propsize.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(PROPSIZE_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\propsize_propsize.res | diff --git a/samples/propsize/makefile.gcc b/samples/propsize/makefile.gcc index 9a0cd84e84..a56744653a 100644 --- a/samples/propsize/makefile.gcc +++ b/samples/propsize/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -PROPSIZE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +PROPSIZE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +PROPSIZE_OBJECTS = \ + $(OBJS)\propsize_propsize.o \ + $(OBJS)\propsize_propsize_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\propsize_propsize.o: .\propsize.cpp $(CXX) -c -o $@ $(PROPSIZE_CXXFLAGS) $< $(OBJS)\propsize_propsize_rc.o: .\propsize.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\propsize.exe del $(OBJS)\propsize.exe -$(OBJS)\propsize.exe: $(OBJS)\propsize_propsize.o $(OBJS)\propsize_propsize_rc.o - $(CXX) -o $@ $(OBJS)\propsize_propsize.o $(OBJS)\propsize_propsize_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\propsize.exe: $(PROPSIZE_OBJECTS) $(OBJS)\propsize_propsize_rc.o + $(CXX) -o $@ $(PROPSIZE_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/propsize/makefile.vc b/samples/propsize/makefile.vc index b81a280ce6..907ffba182 100644 --- a/samples/propsize/makefile.vc +++ b/samples/propsize/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -PROPSIZE_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\propsize.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +PROPSIZE_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\propsize.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +PROPSIZE_OBJECTS = \ + $(OBJS)\propsize_propsize.obj \ + $(OBJS)\propsize_propsize.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\propsize_propsize.obj: .\propsize.cpp $(CXX) /c /nologo /TP /Fo$@ $(PROPSIZE_CXXFLAGS) $** $(OBJS)\propsize_propsize.res: .\propsize.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\propsize.exe del $(OBJS)\propsize.exe -$(OBJS)\propsize.exe: $(OBJS)\propsize_propsize.obj $(OBJS)\propsize_propsize.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\propsize_propsize.obj $(OBJS)\propsize_propsize.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\propsize.exe: $(PROPSIZE_OBJECTS) $(OBJS)\propsize_propsize.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(PROPSIZE_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/propsize/makefile.wat b/samples/propsize/makefile.wat index e70ff468ee..461ffef2f7 100644 --- a/samples/propsize/makefile.wat +++ b/samples/propsize/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -PROPSIZE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +PROPSIZE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +PROPSIZE_OBJECTS = & + $(OBJS)\propsize_propsize.obj @@ -126,7 +180,7 @@ $(OBJS)\propsize_propsize.obj : .AUTODEPEND .\propsize.cpp $(CXX) -zq -fo=$^@ $(PROPSIZE_CXXFLAGS) $< $(OBJS)\propsize_propsize.res : .AUTODEPEND .\propsize.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\propsize.exe del $(OBJS)\propsize.exe -$(OBJS)\propsize.exe : $(OBJS)\propsize_propsize.obj $(OBJS)\propsize_propsize.res +$(OBJS)\propsize.exe : $(PROPSIZE_OBJECTS) $(OBJS)\propsize_propsize.res @%create $(OBJS)\propsize.lbc @%append $(OBJS)\propsize.lbc option quiet @%append $(OBJS)\propsize.lbc name $^@ @%append $(OBJS)\propsize.lbc option incremental - @%append $(OBJS)\propsize.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\propsize_propsize.obj) do @%append $(OBJS)\propsize.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\propsize.lbc library %i + @%append $(OBJS)\propsize.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(PROPSIZE_OBJECTS)) do @%append $(OBJS)\propsize.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\propsize.lbc library %i @%append $(OBJS)\propsize.lbc option resource=$(OBJS)\propsize_propsize.res wlink @$(OBJS)\propsize.lbc diff --git a/samples/regtest/Makefile.in b/samples/regtest/Makefile.in index 8f066f800a..54ffe7ce3c 100644 --- a/samples/regtest/Makefile.in +++ b/samples/regtest/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib REGTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +REGTEST_OBJECTS = \ + regtest_regtest.o \ + $(__regtest___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ REGTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ REGTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ regtest$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o regtest$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: regtest$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f regtest$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -regtest$(EXEEXT): regtest_regtest.o $(__regtest___win32rc) - $(CXX) -o $@ regtest_regtest.o $(__regtest___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +regtest$(EXEEXT): $(REGTEST_OBJECTS) $(__regtest___win32rc) + $(CXX) -o $@ $(REGTEST_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__regtest___mac_rezcmd) $(__regtest___mac_setfilecmd) diff --git a/samples/regtest/makefile.bcc b/samples/regtest/makefile.bcc index b6c859a44b..489de7a0d9 100644 --- a/samples/regtest/makefile.bcc +++ b/samples/regtest/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -REGTEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +REGTEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +REGTEST_OBJECTS = \ + $(OBJS)\regtest_regtest.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\regtest_regtest.obj: .\regtest.cpp $(CXX) -q -c -P -o$@ $(REGTEST_CXXFLAGS) $** $(OBJS)\regtest_regtest.res: .\regtest.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\regtest.exe del $(OBJS)\regtest.exe -$(OBJS)\regtest.exe: $(OBJS)\regtest_regtest.obj $(OBJS)\regtest_regtest.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\regtest_regtest.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\regtest_regtest.res +$(OBJS)\regtest.exe: $(REGTEST_OBJECTS) $(OBJS)\regtest_regtest.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(REGTEST_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\regtest_regtest.res | diff --git a/samples/regtest/makefile.gcc b/samples/regtest/makefile.gcc index 7faacad592..64f993f689 100644 --- a/samples/regtest/makefile.gcc +++ b/samples/regtest/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -REGTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +REGTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +REGTEST_OBJECTS = \ + $(OBJS)\regtest_regtest.o \ + $(OBJS)\regtest_regtest_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\regtest_regtest.o: .\regtest.cpp $(CXX) -c -o $@ $(REGTEST_CXXFLAGS) $< $(OBJS)\regtest_regtest_rc.o: .\regtest.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\regtest.exe del $(OBJS)\regtest.exe -$(OBJS)\regtest.exe: $(OBJS)\regtest_regtest.o $(OBJS)\regtest_regtest_rc.o - $(CXX) -o $@ $(OBJS)\regtest_regtest.o $(OBJS)\regtest_regtest_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\regtest.exe: $(REGTEST_OBJECTS) $(OBJS)\regtest_regtest_rc.o + $(CXX) -o $@ $(REGTEST_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/regtest/makefile.vc b/samples/regtest/makefile.vc index b1b661cf02..47886482f7 100644 --- a/samples/regtest/makefile.vc +++ b/samples/regtest/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -REGTEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\regtest.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +REGTEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\regtest.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +REGTEST_OBJECTS = \ + $(OBJS)\regtest_regtest.obj \ + $(OBJS)\regtest_regtest.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\regtest_regtest.obj: .\regtest.cpp $(CXX) /c /nologo /TP /Fo$@ $(REGTEST_CXXFLAGS) $** $(OBJS)\regtest_regtest.res: .\regtest.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\regtest.exe del $(OBJS)\regtest.exe -$(OBJS)\regtest.exe: $(OBJS)\regtest_regtest.obj $(OBJS)\regtest_regtest.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\regtest_regtest.obj $(OBJS)\regtest_regtest.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\regtest.exe: $(REGTEST_OBJECTS) $(OBJS)\regtest_regtest.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(REGTEST_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/regtest/makefile.wat b/samples/regtest/makefile.wat index 2265303534..682fe6977b 100644 --- a/samples/regtest/makefile.wat +++ b/samples/regtest/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -REGTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +REGTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +REGTEST_OBJECTS = & + $(OBJS)\regtest_regtest.obj @@ -126,7 +180,7 @@ $(OBJS)\regtest_regtest.obj : .AUTODEPEND .\regtest.cpp $(CXX) -zq -fo=$^@ $(REGTEST_CXXFLAGS) $< $(OBJS)\regtest_regtest.res : .AUTODEPEND .\regtest.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\regtest.exe del $(OBJS)\regtest.exe -$(OBJS)\regtest.exe : $(OBJS)\regtest_regtest.obj $(OBJS)\regtest_regtest.res +$(OBJS)\regtest.exe : $(REGTEST_OBJECTS) $(OBJS)\regtest_regtest.res @%create $(OBJS)\regtest.lbc @%append $(OBJS)\regtest.lbc option quiet @%append $(OBJS)\regtest.lbc name $^@ @%append $(OBJS)\regtest.lbc option incremental - @%append $(OBJS)\regtest.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\regtest_regtest.obj) do @%append $(OBJS)\regtest.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\regtest.lbc library %i + @%append $(OBJS)\regtest.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(REGTEST_OBJECTS)) do @%append $(OBJS)\regtest.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\regtest.lbc library %i @%append $(OBJS)\regtest.lbc option resource=$(OBJS)\regtest_regtest.res wlink @$(OBJS)\regtest.lbc diff --git a/samples/richedit/Makefile.in b/samples/richedit/Makefile.in index 30932dfa7e..bdc5da0bf1 100644 --- a/samples/richedit/Makefile.in +++ b/samples/richedit/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib RICHEDIT_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +RICHEDIT_OBJECTS = \ + richedit_richedit.o \ + $(__richedit___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ RICHEDIT_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ RICHEDIT_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ richedit$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o richedit$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: richedit$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f richedit$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -richedit$(EXEEXT): richedit_richedit.o $(__richedit___win32rc) - $(CXX) -o $@ richedit_richedit.o $(__richedit___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +richedit$(EXEEXT): $(RICHEDIT_OBJECTS) $(__richedit___win32rc) + $(CXX) -o $@ $(RICHEDIT_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__richedit___mac_rezcmd) $(__richedit___mac_setfilecmd) diff --git a/samples/richedit/makefile.bcc b/samples/richedit/makefile.bcc index c74c030773..f738b3175e 100644 --- a/samples/richedit/makefile.bcc +++ b/samples/richedit/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -RICHEDIT_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +RICHEDIT_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +RICHEDIT_OBJECTS = \ + $(OBJS)\richedit_richedit.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\richedit_richedit.obj: .\richedit.cpp $(CXX) -q -c -P -o$@ $(RICHEDIT_CXXFLAGS) $** $(OBJS)\richedit_richedit.res: .\richedit.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\richedit.exe del $(OBJS)\richedit.exe -$(OBJS)\richedit.exe: $(OBJS)\richedit_richedit.obj $(OBJS)\richedit_richedit.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\richedit_richedit.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\richedit_richedit.res +$(OBJS)\richedit.exe: $(RICHEDIT_OBJECTS) $(OBJS)\richedit_richedit.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(RICHEDIT_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\richedit_richedit.res | diff --git a/samples/richedit/makefile.gcc b/samples/richedit/makefile.gcc index df4ee9e8c3..c0d09cbca8 100644 --- a/samples/richedit/makefile.gcc +++ b/samples/richedit/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -RICHEDIT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +RICHEDIT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +RICHEDIT_OBJECTS = \ + $(OBJS)\richedit_richedit.o \ + $(OBJS)\richedit_richedit_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\richedit_richedit.o: .\richedit.cpp $(CXX) -c -o $@ $(RICHEDIT_CXXFLAGS) $< $(OBJS)\richedit_richedit_rc.o: .\richedit.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\richedit.exe del $(OBJS)\richedit.exe -$(OBJS)\richedit.exe: $(OBJS)\richedit_richedit.o $(OBJS)\richedit_richedit_rc.o - $(CXX) -o $@ $(OBJS)\richedit_richedit.o $(OBJS)\richedit_richedit_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\richedit.exe: $(RICHEDIT_OBJECTS) $(OBJS)\richedit_richedit_rc.o + $(CXX) -o $@ $(RICHEDIT_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/richedit/makefile.vc b/samples/richedit/makefile.vc index b644cb6095..a6c46c295f 100644 --- a/samples/richedit/makefile.vc +++ b/samples/richedit/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -RICHEDIT_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\richedit.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +RICHEDIT_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\richedit.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +RICHEDIT_OBJECTS = \ + $(OBJS)\richedit_richedit.obj \ + $(OBJS)\richedit_richedit.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\richedit_richedit.obj: .\richedit.cpp $(CXX) /c /nologo /TP /Fo$@ $(RICHEDIT_CXXFLAGS) $** $(OBJS)\richedit_richedit.res: .\richedit.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\richedit.exe del $(OBJS)\richedit.exe -$(OBJS)\richedit.exe: $(OBJS)\richedit_richedit.obj $(OBJS)\richedit_richedit.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\richedit_richedit.obj $(OBJS)\richedit_richedit.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\richedit.exe: $(RICHEDIT_OBJECTS) $(OBJS)\richedit_richedit.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(RICHEDIT_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/richedit/makefile.wat b/samples/richedit/makefile.wat index 2b97c7ca7d..66a42869d8 100644 --- a/samples/richedit/makefile.wat +++ b/samples/richedit/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -RICHEDIT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +RICHEDIT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +RICHEDIT_OBJECTS = & + $(OBJS)\richedit_richedit.obj @@ -126,7 +180,7 @@ $(OBJS)\richedit_richedit.obj : .AUTODEPEND .\richedit.cpp $(CXX) -zq -fo=$^@ $(RICHEDIT_CXXFLAGS) $< $(OBJS)\richedit_richedit.res : .AUTODEPEND .\richedit.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\richedit.exe del $(OBJS)\richedit.exe -$(OBJS)\richedit.exe : $(OBJS)\richedit_richedit.obj $(OBJS)\richedit_richedit.res +$(OBJS)\richedit.exe : $(RICHEDIT_OBJECTS) $(OBJS)\richedit_richedit.res @%create $(OBJS)\richedit.lbc @%append $(OBJS)\richedit.lbc option quiet @%append $(OBJS)\richedit.lbc name $^@ @%append $(OBJS)\richedit.lbc option incremental - @%append $(OBJS)\richedit.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\richedit_richedit.obj) do @%append $(OBJS)\richedit.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\richedit.lbc library %i + @%append $(OBJS)\richedit.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(RICHEDIT_OBJECTS)) do @%append $(OBJS)\richedit.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\richedit.lbc library %i @%append $(OBJS)\richedit.lbc option resource=$(OBJS)\richedit_richedit.res wlink @$(OBJS)\richedit.lbc diff --git a/samples/rotate/Makefile.in b/samples/rotate/Makefile.in index bc4d78ba21..1028243c76 100644 --- a/samples/rotate/Makefile.in +++ b/samples/rotate/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib ROTATE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +ROTATE_OBJECTS = \ + rotate_rotate.o \ + $(__rotate___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ ROTATE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ ROTATE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ rotate$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o rotate$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: rotate$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f rotate$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -rotate$(EXEEXT): rotate_rotate.o $(__rotate___win32rc) - $(CXX) -o $@ rotate_rotate.o $(__rotate___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +rotate$(EXEEXT): $(ROTATE_OBJECTS) $(__rotate___win32rc) + $(CXX) -o $@ $(ROTATE_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__rotate___mac_rezcmd) $(__rotate___mac_setfilecmd) diff --git a/samples/rotate/makefile.bcc b/samples/rotate/makefile.bcc index d048df787a..4869c9e07c 100644 --- a/samples/rotate/makefile.bcc +++ b/samples/rotate/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -ROTATE_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +ROTATE_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +ROTATE_OBJECTS = \ + $(OBJS)\rotate_rotate.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\rotate_rotate.obj: .\rotate.cpp $(CXX) -q -c -P -o$@ $(ROTATE_CXXFLAGS) $** $(OBJS)\rotate_rotate.res: .\rotate.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\rotate.exe del $(OBJS)\rotate.exe -$(OBJS)\rotate.exe: $(OBJS)\rotate_rotate.obj $(OBJS)\rotate_rotate.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\rotate_rotate.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\rotate_rotate.res +$(OBJS)\rotate.exe: $(ROTATE_OBJECTS) $(OBJS)\rotate_rotate.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(ROTATE_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\rotate_rotate.res | diff --git a/samples/rotate/makefile.gcc b/samples/rotate/makefile.gcc index 6e9bdc2e92..9893f78aa1 100644 --- a/samples/rotate/makefile.gcc +++ b/samples/rotate/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -ROTATE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +ROTATE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +ROTATE_OBJECTS = \ + $(OBJS)\rotate_rotate.o \ + $(OBJS)\rotate_rotate_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\rotate_rotate.o: .\rotate.cpp $(CXX) -c -o $@ $(ROTATE_CXXFLAGS) $< $(OBJS)\rotate_rotate_rc.o: .\rotate.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\rotate.exe del $(OBJS)\rotate.exe -$(OBJS)\rotate.exe: $(OBJS)\rotate_rotate.o $(OBJS)\rotate_rotate_rc.o - $(CXX) -o $@ $(OBJS)\rotate_rotate.o $(OBJS)\rotate_rotate_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\rotate.exe: $(ROTATE_OBJECTS) $(OBJS)\rotate_rotate_rc.o + $(CXX) -o $@ $(ROTATE_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/rotate/makefile.vc b/samples/rotate/makefile.vc index 4f5c37d907..17fc676f8e 100644 --- a/samples/rotate/makefile.vc +++ b/samples/rotate/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -ROTATE_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\rotate.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +ROTATE_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) /DWIN32 \ + $(__DEBUGINFO_0) /Fd$(OBJS)\rotate.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +ROTATE_OBJECTS = \ + $(OBJS)\rotate_rotate.obj \ + $(OBJS)\rotate_rotate.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\rotate_rotate.obj: .\rotate.cpp $(CXX) /c /nologo /TP /Fo$@ $(ROTATE_CXXFLAGS) $** $(OBJS)\rotate_rotate.res: .\rotate.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\rotate.exe del $(OBJS)\rotate.exe -$(OBJS)\rotate.exe: $(OBJS)\rotate_rotate.obj $(OBJS)\rotate_rotate.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\rotate_rotate.obj $(OBJS)\rotate_rotate.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\rotate.exe: $(ROTATE_OBJECTS) $(OBJS)\rotate_rotate.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(ROTATE_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/rotate/makefile.wat b/samples/rotate/makefile.wat index f36ef52270..73f8781de9 100644 --- a/samples/rotate/makefile.wat +++ b/samples/rotate/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -ROTATE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +ROTATE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +ROTATE_OBJECTS = & + $(OBJS)\rotate_rotate.obj @@ -126,7 +180,7 @@ $(OBJS)\rotate_rotate.obj : .AUTODEPEND .\rotate.cpp $(CXX) -zq -fo=$^@ $(ROTATE_CXXFLAGS) $< $(OBJS)\rotate_rotate.res : .AUTODEPEND .\rotate.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\rotate.exe del $(OBJS)\rotate.exe -$(OBJS)\rotate.exe : $(OBJS)\rotate_rotate.obj $(OBJS)\rotate_rotate.res +$(OBJS)\rotate.exe : $(ROTATE_OBJECTS) $(OBJS)\rotate_rotate.res @%create $(OBJS)\rotate.lbc @%append $(OBJS)\rotate.lbc option quiet @%append $(OBJS)\rotate.lbc name $^@ @%append $(OBJS)\rotate.lbc option incremental - @%append $(OBJS)\rotate.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\rotate_rotate.obj) do @%append $(OBJS)\rotate.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\rotate.lbc library %i + @%append $(OBJS)\rotate.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(ROTATE_OBJECTS)) do @%append $(OBJS)\rotate.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\rotate.lbc library %i @%append $(OBJS)\rotate.lbc option resource=$(OBJS)\rotate_rotate.res wlink @$(OBJS)\rotate.lbc diff --git a/samples/sashtest/Makefile.in b/samples/sashtest/Makefile.in index a756f5a09a..2f0540cef8 100644 --- a/samples/sashtest/Makefile.in +++ b/samples/sashtest/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib SASHTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +SASHTEST_OBJECTS = \ + sashtest_sashtest.o \ + $(__sashtest___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ SASHTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ SASHTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ sashtest$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o sashtest$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: sashtest$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f sashtest$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -sashtest$(EXEEXT): sashtest_sashtest.o $(__sashtest___win32rc) - $(CXX) -o $@ sashtest_sashtest.o $(__sashtest___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +sashtest$(EXEEXT): $(SASHTEST_OBJECTS) $(__sashtest___win32rc) + $(CXX) -o $@ $(SASHTEST_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__sashtest___mac_rezcmd) $(__sashtest___mac_setfilecmd) diff --git a/samples/sashtest/makefile.bcc b/samples/sashtest/makefile.bcc index 853d3575b9..b11ee7ea92 100644 --- a/samples/sashtest/makefile.bcc +++ b/samples/sashtest/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SASHTEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +SASHTEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +SASHTEST_OBJECTS = \ + $(OBJS)\sashtest_sashtest.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\sashtest_sashtest.obj: .\sashtest.cpp $(CXX) -q -c -P -o$@ $(SASHTEST_CXXFLAGS) $** $(OBJS)\sashtest_sashtest.res: .\sashtest.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\sashtest.exe del $(OBJS)\sashtest.exe -$(OBJS)\sashtest.exe: $(OBJS)\sashtest_sashtest.obj $(OBJS)\sashtest_sashtest.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\sashtest_sashtest.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\sashtest_sashtest.res +$(OBJS)\sashtest.exe: $(SASHTEST_OBJECTS) $(OBJS)\sashtest_sashtest.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(SASHTEST_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\sashtest_sashtest.res | diff --git a/samples/sashtest/makefile.gcc b/samples/sashtest/makefile.gcc index 019385d3e4..d9c0ea1b72 100644 --- a/samples/sashtest/makefile.gcc +++ b/samples/sashtest/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SASHTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +SASHTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +SASHTEST_OBJECTS = \ + $(OBJS)\sashtest_sashtest.o \ + $(OBJS)\sashtest_sashtest_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\sashtest_sashtest.o: .\sashtest.cpp $(CXX) -c -o $@ $(SASHTEST_CXXFLAGS) $< $(OBJS)\sashtest_sashtest_rc.o: .\sashtest.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\sashtest.exe del $(OBJS)\sashtest.exe -$(OBJS)\sashtest.exe: $(OBJS)\sashtest_sashtest.o $(OBJS)\sashtest_sashtest_rc.o - $(CXX) -o $@ $(OBJS)\sashtest_sashtest.o $(OBJS)\sashtest_sashtest_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\sashtest.exe: $(SASHTEST_OBJECTS) $(OBJS)\sashtest_sashtest_rc.o + $(CXX) -o $@ $(SASHTEST_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/sashtest/makefile.vc b/samples/sashtest/makefile.vc index afd65e0799..d514f61ade 100644 --- a/samples/sashtest/makefile.vc +++ b/samples/sashtest/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SASHTEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\sashtest.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +SASHTEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\sashtest.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +SASHTEST_OBJECTS = \ + $(OBJS)\sashtest_sashtest.obj \ + $(OBJS)\sashtest_sashtest.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\sashtest_sashtest.obj: .\sashtest.cpp $(CXX) /c /nologo /TP /Fo$@ $(SASHTEST_CXXFLAGS) $** $(OBJS)\sashtest_sashtest.res: .\sashtest.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\sashtest.exe del $(OBJS)\sashtest.exe -$(OBJS)\sashtest.exe: $(OBJS)\sashtest_sashtest.obj $(OBJS)\sashtest_sashtest.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\sashtest_sashtest.obj $(OBJS)\sashtest_sashtest.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\sashtest.exe: $(SASHTEST_OBJECTS) $(OBJS)\sashtest_sashtest.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(SASHTEST_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/sashtest/makefile.wat b/samples/sashtest/makefile.wat index b906d2fe75..160bc666df 100644 --- a/samples/sashtest/makefile.wat +++ b/samples/sashtest/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SASHTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +SASHTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +SASHTEST_OBJECTS = & + $(OBJS)\sashtest_sashtest.obj @@ -126,7 +180,7 @@ $(OBJS)\sashtest_sashtest.obj : .AUTODEPEND .\sashtest.cpp $(CXX) -zq -fo=$^@ $(SASHTEST_CXXFLAGS) $< $(OBJS)\sashtest_sashtest.res : .AUTODEPEND .\sashtest.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\sashtest.exe del $(OBJS)\sashtest.exe -$(OBJS)\sashtest.exe : $(OBJS)\sashtest_sashtest.obj $(OBJS)\sashtest_sashtest.res +$(OBJS)\sashtest.exe : $(SASHTEST_OBJECTS) $(OBJS)\sashtest_sashtest.res @%create $(OBJS)\sashtest.lbc @%append $(OBJS)\sashtest.lbc option quiet @%append $(OBJS)\sashtest.lbc name $^@ @%append $(OBJS)\sashtest.lbc option incremental - @%append $(OBJS)\sashtest.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\sashtest_sashtest.obj) do @%append $(OBJS)\sashtest.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\sashtest.lbc library %i + @%append $(OBJS)\sashtest.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(SASHTEST_OBJECTS)) do @%append $(OBJS)\sashtest.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\sashtest.lbc library %i @%append $(OBJS)\sashtest.lbc option resource=$(OBJS)\sashtest_sashtest.res wlink @$(OBJS)\sashtest.lbc diff --git a/samples/scroll/Makefile.in b/samples/scroll/Makefile.in index b1dba40dff..7b9bdd8eed 100644 --- a/samples/scroll/Makefile.in +++ b/samples/scroll/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib SCROLL_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +SCROLL_OBJECTS = \ + scroll_scroll.o \ + $(__scroll___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ SCROLL_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ SCROLL_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ scroll$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o scroll$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: scroll$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f scroll$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -scroll$(EXEEXT): scroll_scroll.o $(__scroll___win32rc) - $(CXX) -o $@ scroll_scroll.o $(__scroll___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +scroll$(EXEEXT): $(SCROLL_OBJECTS) $(__scroll___win32rc) + $(CXX) -o $@ $(SCROLL_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__scroll___mac_rezcmd) $(__scroll___mac_setfilecmd) diff --git a/samples/scroll/makefile.bcc b/samples/scroll/makefile.bcc index 7574d7656e..1007d46bfa 100644 --- a/samples/scroll/makefile.bcc +++ b/samples/scroll/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SCROLL_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +SCROLL_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +SCROLL_OBJECTS = \ + $(OBJS)\scroll_scroll.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\scroll_scroll.obj: .\scroll.cpp $(CXX) -q -c -P -o$@ $(SCROLL_CXXFLAGS) $** $(OBJS)\scroll_scroll.res: .\scroll.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\scroll.exe del $(OBJS)\scroll.exe -$(OBJS)\scroll.exe: $(OBJS)\scroll_scroll.obj $(OBJS)\scroll_scroll.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\scroll_scroll.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\scroll_scroll.res +$(OBJS)\scroll.exe: $(SCROLL_OBJECTS) $(OBJS)\scroll_scroll.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(SCROLL_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\scroll_scroll.res | diff --git a/samples/scroll/makefile.gcc b/samples/scroll/makefile.gcc index 87e65201c2..caa86423e5 100644 --- a/samples/scroll/makefile.gcc +++ b/samples/scroll/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SCROLL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +SCROLL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +SCROLL_OBJECTS = \ + $(OBJS)\scroll_scroll.o \ + $(OBJS)\scroll_scroll_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\scroll_scroll.o: .\scroll.cpp $(CXX) -c -o $@ $(SCROLL_CXXFLAGS) $< $(OBJS)\scroll_scroll_rc.o: .\scroll.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\scroll.exe del $(OBJS)\scroll.exe -$(OBJS)\scroll.exe: $(OBJS)\scroll_scroll.o $(OBJS)\scroll_scroll_rc.o - $(CXX) -o $@ $(OBJS)\scroll_scroll.o $(OBJS)\scroll_scroll_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\scroll.exe: $(SCROLL_OBJECTS) $(OBJS)\scroll_scroll_rc.o + $(CXX) -o $@ $(SCROLL_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/scroll/makefile.vc b/samples/scroll/makefile.vc index 25a7440d12..67e4839224 100644 --- a/samples/scroll/makefile.vc +++ b/samples/scroll/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SCROLL_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\scroll.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +SCROLL_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) /DWIN32 \ + $(__DEBUGINFO_0) /Fd$(OBJS)\scroll.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +SCROLL_OBJECTS = \ + $(OBJS)\scroll_scroll.obj \ + $(OBJS)\scroll_scroll.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\scroll_scroll.obj: .\scroll.cpp $(CXX) /c /nologo /TP /Fo$@ $(SCROLL_CXXFLAGS) $** $(OBJS)\scroll_scroll.res: .\scroll.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\scroll.exe del $(OBJS)\scroll.exe -$(OBJS)\scroll.exe: $(OBJS)\scroll_scroll.obj $(OBJS)\scroll_scroll.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\scroll_scroll.obj $(OBJS)\scroll_scroll.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\scroll.exe: $(SCROLL_OBJECTS) $(OBJS)\scroll_scroll.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(SCROLL_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/scroll/makefile.wat b/samples/scroll/makefile.wat index f7697da160..1e3fe4a229 100644 --- a/samples/scroll/makefile.wat +++ b/samples/scroll/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SCROLL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +SCROLL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +SCROLL_OBJECTS = & + $(OBJS)\scroll_scroll.obj @@ -126,7 +180,7 @@ $(OBJS)\scroll_scroll.obj : .AUTODEPEND .\scroll.cpp $(CXX) -zq -fo=$^@ $(SCROLL_CXXFLAGS) $< $(OBJS)\scroll_scroll.res : .AUTODEPEND .\scroll.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\scroll.exe del $(OBJS)\scroll.exe -$(OBJS)\scroll.exe : $(OBJS)\scroll_scroll.obj $(OBJS)\scroll_scroll.res +$(OBJS)\scroll.exe : $(SCROLL_OBJECTS) $(OBJS)\scroll_scroll.res @%create $(OBJS)\scroll.lbc @%append $(OBJS)\scroll.lbc option quiet @%append $(OBJS)\scroll.lbc name $^@ @%append $(OBJS)\scroll.lbc option incremental - @%append $(OBJS)\scroll.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\scroll_scroll.obj) do @%append $(OBJS)\scroll.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\scroll.lbc library %i + @%append $(OBJS)\scroll.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(SCROLL_OBJECTS)) do @%append $(OBJS)\scroll.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\scroll.lbc library %i @%append $(OBJS)\scroll.lbc option resource=$(OBJS)\scroll_scroll.res wlink @$(OBJS)\scroll.lbc diff --git a/samples/scrollsub/Makefile.in b/samples/scrollsub/Makefile.in index 2a63d350a7..997ed3d6dd 100644 --- a/samples/scrollsub/Makefile.in +++ b/samples/scrollsub/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib SCROLLSUB_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +SCROLLSUB_OBJECTS = \ + scrollsub_scrollsub.o \ + $(__scrollsub___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ SCROLLSUB_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ SCROLLSUB_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ scrollsub$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o scrollsub$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: scrollsub$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f scrollsub$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -scrollsub$(EXEEXT): scrollsub_scrollsub.o $(__scrollsub___win32rc) - $(CXX) -o $@ scrollsub_scrollsub.o $(__scrollsub___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +scrollsub$(EXEEXT): $(SCROLLSUB_OBJECTS) $(__scrollsub___win32rc) + $(CXX) -o $@ $(SCROLLSUB_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__scrollsub___mac_rezcmd) $(__scrollsub___mac_setfilecmd) diff --git a/samples/scrollsub/makefile.bcc b/samples/scrollsub/makefile.bcc index ce8b33067b..e3cd072911 100644 --- a/samples/scrollsub/makefile.bcc +++ b/samples/scrollsub/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SCROLLSUB_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +SCROLLSUB_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +SCROLLSUB_OBJECTS = \ + $(OBJS)\scrollsub_scrollsub.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\scrollsub_scrollsub.obj: .\scrollsub.cpp $(CXX) -q -c -P -o$@ $(SCROLLSUB_CXXFLAGS) $** $(OBJS)\scrollsub_scrollsub.res: .\scrollsub.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\scrollsub.exe del $(OBJS)\scrollsub.exe -$(OBJS)\scrollsub.exe: $(OBJS)\scrollsub_scrollsub.obj $(OBJS)\scrollsub_scrollsub.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\scrollsub_scrollsub.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\scrollsub_scrollsub.res +$(OBJS)\scrollsub.exe: $(SCROLLSUB_OBJECTS) $(OBJS)\scrollsub_scrollsub.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(SCROLLSUB_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\scrollsub_scrollsub.res | diff --git a/samples/scrollsub/makefile.gcc b/samples/scrollsub/makefile.gcc index 8ca6355703..11a0ad36e7 100644 --- a/samples/scrollsub/makefile.gcc +++ b/samples/scrollsub/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SCROLLSUB_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +SCROLLSUB_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +SCROLLSUB_OBJECTS = \ + $(OBJS)\scrollsub_scrollsub.o \ + $(OBJS)\scrollsub_scrollsub_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\scrollsub_scrollsub.o: .\scrollsub.cpp $(CXX) -c -o $@ $(SCROLLSUB_CXXFLAGS) $< $(OBJS)\scrollsub_scrollsub_rc.o: .\scrollsub.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\scrollsub.exe del $(OBJS)\scrollsub.exe -$(OBJS)\scrollsub.exe: $(OBJS)\scrollsub_scrollsub.o $(OBJS)\scrollsub_scrollsub_rc.o - $(CXX) -o $@ $(OBJS)\scrollsub_scrollsub.o $(OBJS)\scrollsub_scrollsub_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\scrollsub.exe: $(SCROLLSUB_OBJECTS) $(OBJS)\scrollsub_scrollsub_rc.o + $(CXX) -o $@ $(SCROLLSUB_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/scrollsub/makefile.vc b/samples/scrollsub/makefile.vc index ba532cdec3..713a7dd187 100644 --- a/samples/scrollsub/makefile.vc +++ b/samples/scrollsub/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SCROLLSUB_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\scrollsub.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +SCROLLSUB_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\scrollsub.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +SCROLLSUB_OBJECTS = \ + $(OBJS)\scrollsub_scrollsub.obj \ + $(OBJS)\scrollsub_scrollsub.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\scrollsub_scrollsub.obj: .\scrollsub.cpp $(CXX) /c /nologo /TP /Fo$@ $(SCROLLSUB_CXXFLAGS) $** $(OBJS)\scrollsub_scrollsub.res: .\scrollsub.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\scrollsub.exe del $(OBJS)\scrollsub.exe -$(OBJS)\scrollsub.exe: $(OBJS)\scrollsub_scrollsub.obj $(OBJS)\scrollsub_scrollsub.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\scrollsub_scrollsub.obj $(OBJS)\scrollsub_scrollsub.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\scrollsub.exe: $(SCROLLSUB_OBJECTS) $(OBJS)\scrollsub_scrollsub.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(SCROLLSUB_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/scrollsub/makefile.wat b/samples/scrollsub/makefile.wat index 2d1dbb9ae1..da6c39f9f9 100644 --- a/samples/scrollsub/makefile.wat +++ b/samples/scrollsub/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SCROLLSUB_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +SCROLLSUB_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +SCROLLSUB_OBJECTS = & + $(OBJS)\scrollsub_scrollsub.obj @@ -126,7 +180,7 @@ $(OBJS)\scrollsub_scrollsub.obj : .AUTODEPEND .\scrollsub.cpp $(CXX) -zq -fo=$^@ $(SCROLLSUB_CXXFLAGS) $< $(OBJS)\scrollsub_scrollsub.res : .AUTODEPEND .\scrollsub.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\scrollsub.exe del $(OBJS)\scrollsub.exe -$(OBJS)\scrollsub.exe : $(OBJS)\scrollsub_scrollsub.obj $(OBJS)\scrollsub_scrollsub.res +$(OBJS)\scrollsub.exe : $(SCROLLSUB_OBJECTS) $(OBJS)\scrollsub_scrollsub.res @%create $(OBJS)\scrollsub.lbc @%append $(OBJS)\scrollsub.lbc option quiet @%append $(OBJS)\scrollsub.lbc name $^@ @%append $(OBJS)\scrollsub.lbc option incremental - @%append $(OBJS)\scrollsub.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\scrollsub_scrollsub.obj) do @%append $(OBJS)\scrollsub.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\scrollsub.lbc library %i + @%append $(OBJS)\scrollsub.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(SCROLLSUB_OBJECTS)) do @%append $(OBJS)\scrollsub.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\scrollsub.lbc library %i @%append $(OBJS)\scrollsub.lbc option resource=$(OBJS)\scrollsub_scrollsub.res wlink @$(OBJS)\scrollsub.lbc diff --git a/samples/shaped/Makefile.in b/samples/shaped/Makefile.in index de8951e3e9..d4d345d081 100644 --- a/samples/shaped/Makefile.in +++ b/samples/shaped/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib SHAPED_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +SHAPED_OBJECTS = \ + shaped_shaped.o \ + $(__shaped___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ SHAPED_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ SHAPED_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ shaped$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o shaped$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: shaped$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f shaped$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -shaped$(EXEEXT): shaped_shaped.o $(__shaped___win32rc) - $(CXX) -o $@ shaped_shaped.o $(__shaped___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +shaped$(EXEEXT): $(SHAPED_OBJECTS) $(__shaped___win32rc) + $(CXX) -o $@ $(SHAPED_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__shaped___mac_rezcmd) $(__shaped___mac_setfilecmd) diff --git a/samples/shaped/makefile.bcc b/samples/shaped/makefile.bcc index 37f12447f4..fa8cc01c99 100644 --- a/samples/shaped/makefile.bcc +++ b/samples/shaped/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SHAPED_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +SHAPED_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +SHAPED_OBJECTS = \ + $(OBJS)\shaped_shaped.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\shaped_shaped.obj: .\shaped.cpp $(CXX) -q -c -P -o$@ $(SHAPED_CXXFLAGS) $** $(OBJS)\shaped_shaped.res: .\shaped.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\shaped.exe del $(OBJS)\shaped.exe -$(OBJS)\shaped.exe: $(OBJS)\shaped_shaped.obj $(OBJS)\shaped_shaped.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\shaped_shaped.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\shaped_shaped.res +$(OBJS)\shaped.exe: $(SHAPED_OBJECTS) $(OBJS)\shaped_shaped.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(SHAPED_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\shaped_shaped.res | diff --git a/samples/shaped/makefile.gcc b/samples/shaped/makefile.gcc index 6b4546f007..fb71b4d3d2 100644 --- a/samples/shaped/makefile.gcc +++ b/samples/shaped/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SHAPED_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +SHAPED_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +SHAPED_OBJECTS = \ + $(OBJS)\shaped_shaped.o \ + $(OBJS)\shaped_shaped_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\shaped_shaped.o: .\shaped.cpp $(CXX) -c -o $@ $(SHAPED_CXXFLAGS) $< $(OBJS)\shaped_shaped_rc.o: .\shaped.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\shaped.exe del $(OBJS)\shaped.exe -$(OBJS)\shaped.exe: $(OBJS)\shaped_shaped.o $(OBJS)\shaped_shaped_rc.o - $(CXX) -o $@ $(OBJS)\shaped_shaped.o $(OBJS)\shaped_shaped_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\shaped.exe: $(SHAPED_OBJECTS) $(OBJS)\shaped_shaped_rc.o + $(CXX) -o $@ $(SHAPED_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/shaped/makefile.vc b/samples/shaped/makefile.vc index cf8ed53df8..c09ce80c94 100644 --- a/samples/shaped/makefile.vc +++ b/samples/shaped/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SHAPED_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\shaped.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +SHAPED_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) /DWIN32 \ + $(__DEBUGINFO_0) /Fd$(OBJS)\shaped.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +SHAPED_OBJECTS = \ + $(OBJS)\shaped_shaped.obj \ + $(OBJS)\shaped_shaped.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\shaped_shaped.obj: .\shaped.cpp $(CXX) /c /nologo /TP /Fo$@ $(SHAPED_CXXFLAGS) $** $(OBJS)\shaped_shaped.res: .\shaped.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\shaped.exe del $(OBJS)\shaped.exe -$(OBJS)\shaped.exe: $(OBJS)\shaped_shaped.obj $(OBJS)\shaped_shaped.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\shaped_shaped.obj $(OBJS)\shaped_shaped.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\shaped.exe: $(SHAPED_OBJECTS) $(OBJS)\shaped_shaped.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(SHAPED_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/shaped/makefile.wat b/samples/shaped/makefile.wat index b5625a27f3..bcfe197eb0 100644 --- a/samples/shaped/makefile.wat +++ b/samples/shaped/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SHAPED_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +SHAPED_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +SHAPED_OBJECTS = & + $(OBJS)\shaped_shaped.obj @@ -126,7 +180,7 @@ $(OBJS)\shaped_shaped.obj : .AUTODEPEND .\shaped.cpp $(CXX) -zq -fo=$^@ $(SHAPED_CXXFLAGS) $< $(OBJS)\shaped_shaped.res : .AUTODEPEND .\shaped.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\shaped.exe del $(OBJS)\shaped.exe -$(OBJS)\shaped.exe : $(OBJS)\shaped_shaped.obj $(OBJS)\shaped_shaped.res +$(OBJS)\shaped.exe : $(SHAPED_OBJECTS) $(OBJS)\shaped_shaped.res @%create $(OBJS)\shaped.lbc @%append $(OBJS)\shaped.lbc option quiet @%append $(OBJS)\shaped.lbc name $^@ @%append $(OBJS)\shaped.lbc option incremental - @%append $(OBJS)\shaped.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\shaped_shaped.obj) do @%append $(OBJS)\shaped.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\shaped.lbc library %i + @%append $(OBJS)\shaped.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(SHAPED_OBJECTS)) do @%append $(OBJS)\shaped.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\shaped.lbc library %i @%append $(OBJS)\shaped.lbc option resource=$(OBJS)\shaped_shaped.res wlink @$(OBJS)\shaped.lbc diff --git a/samples/sockets/Makefile.in b/samples/sockets/Makefile.in index 837ac5cdf6..83378c29b8 100644 --- a/samples/sockets/Makefile.in +++ b/samples/sockets/Makefile.in @@ -55,7 +55,8 @@ SERVER_OBJECTS = \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL diff --git a/samples/sockets/makefile.bcc b/samples/sockets/makefile.bcc index 0bd53bdbd5..2b383b3d2c 100644 --- a/samples/sockets/makefile.bcc +++ b/samples/sockets/makefile.bcc @@ -20,7 +20,7 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### -CLIENT_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS) $(__DEBUGFLAG) \ +CLIENT_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ @@ -31,7 +31,7 @@ LIBDIRNAME = \ .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SERVER_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS) $(__DEBUGFLAG) \ +SERVER_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ @@ -47,7 +47,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -59,16 +62,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_0 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_0 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -159,11 +174,11 @@ clean: -if exist $(OBJS)\server.exe del $(OBJS)\server.exe $(OBJS)\client.exe: $(CLIENT_OBJECTS) $(OBJS)\client_client.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L$(LIBDIRNAME) -aa @&&| + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| c0w32.obj $(CLIENT_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_0).lib,, $(OBJS)\client_client.res | $(OBJS)\server.exe: $(SERVER_OBJECTS) $(OBJS)\server_server.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L$(LIBDIRNAME) -aa @&&| + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| c0w32.obj $(SERVER_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_0).lib,, $(OBJS)\server_server.res | diff --git a/samples/sockets/makefile.gcc b/samples/sockets/makefile.gcc index fc9bb93a3b..e68434ce39 100644 --- a/samples/sockets/makefile.gcc +++ b/samples/sockets/makefile.gcc @@ -12,29 +12,23 @@ include ../../build/config.gcc ### Variables: ### -CLIENT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -CLIENT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG) $(GCCFLAGS) \ +CLIENT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(GCCFLAGS) \ -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -CLIENT_OBJECTS = $(OBJS)\client_client.o $(OBJS)\client_client_rc.o CLIENT_OBJECTS = \ $(OBJS)\client_client.o \ $(OBJS)\client_client_rc.o -LIBDIRNAME = .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) LIBDIRNAME = \ .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SERVER_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -SERVER_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG) $(GCCFLAGS) \ +SERVER_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(GCCFLAGS) \ -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) -SERVER_OBJECTS = $(OBJS)\server_server.o $(OBJS)\server_server_rc.o SERVER_OBJECTS = \ $(OBJS)\server_server.o \ $(OBJS)\server_server_rc.o @@ -51,6 +45,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -63,15 +62,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_0 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_0 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -149,9 +168,9 @@ clean: -if exist $(OBJS)\server.exe del $(OBJS)\server.exe $(OBJS)\client.exe: $(CLIENT_OBJECTS) $(OBJS)\client_client_rc.o - $(CXX) -o $@ $(CLIENT_OBJECTS) $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 + $(CXX) -o $@ $(CLIENT_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 $(OBJS)\server.exe: $(SERVER_OBJECTS) $(OBJS)\server_server_rc.o - $(CXX) -o $@ $(SERVER_OBJECTS) $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 + $(CXX) -o $@ $(SERVER_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/sockets/makefile.vc b/samples/sockets/makefile.vc index 18ebbe3d40..429b31891a 100644 --- a/samples/sockets/makefile.vc +++ b/samples/sockets/makefile.vc @@ -12,11 +12,11 @@ ### Variables: ### -CLIENT_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS)$(__DEBUGFLAG_2) /DWIN32 \ - $(__DEBUGFLAG) $(____DEBUGFLAG_0) /Fd$(OBJS)\client.pdb $(__OPTIMIZEFLAG) \ - /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) \ - /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff /I.\..\..\src\jpeg \ - /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ +CLIENT_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS)$(__DEBUGRUNTIME_3) /DWIN32 \ + $(__DEBUGINFO) /Fd$(OBJS)\client.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) CLIENT_OBJECTS = \ $(OBJS)\client_client.obj \ @@ -25,11 +25,11 @@ LIBDIRNAME = \ .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SERVER_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS)$(__DEBUGFLAG_2) /DWIN32 \ - $(__DEBUGFLAG) $(____DEBUGFLAG_0) /Fd$(OBJS)\server.pdb $(__OPTIMIZEFLAG) \ - /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) \ - /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff /I.\..\..\src\jpeg \ - /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ +SERVER_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS)$(__DEBUGRUNTIME_13) /DWIN32 \ + $(__DEBUGINFO) /Fd$(OBJS)\server.pdb $(____DEBUGRUNTIME_12_p) \ + $(__OPTIMIZEFLAG) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) SERVER_OBJECTS = \ $(OBJS)\server_server.obj \ @@ -43,7 +43,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -55,28 +58,70 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_2 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_2 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_2 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_2 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_13 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_13 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_13 = $(__DEBUGINFO_2) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_2) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_0 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_0 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -132,17 +177,65 @@ __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p_0 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG = /d _DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO = /d _DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG = /d NDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO = /d NDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_0 = /D_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO = /d NDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_0 = /DNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO = /d _DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_0 = /D_DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_0 = /DNDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_0 = /DNDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_0 = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_12_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_12_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_12_p = $(____DEBUGINFO_0) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_12_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_12_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_12_p_1 = $(____DEBUGINFO) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_0) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO) !endif @@ -158,13 +251,13 @@ $(OBJS)\client_client.obj: .\client.cpp $(CXX) /c /nologo /TP /Fo$@ $(CLIENT_CXXFLAGS) $** $(OBJS)\client_client.res: .\client.rc - rc /fo$@ /d WIN32 $(____DEBUGFLAG) /d __WXMSW__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__UNICODE_DEFINE_p_0) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_0) /d _WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__UNICODE_DEFINE_p_0) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_0) /d _WINDOWS $** $(OBJS)\server_server.obj: .\server.cpp $(CXX) /c /nologo /TP /Fo$@ $(SERVER_CXXFLAGS) $** $(OBJS)\server_server.res: .\server.rc - rc /fo$@ /d WIN32 $(____DEBUGFLAG) /d __WXMSW__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__UNICODE_DEFINE_p_0) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_0) /d _WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_12_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__UNICODE_DEFINE_p_0) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_0) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -173,11 +266,11 @@ clean: -if exist $(OBJS)\server.exe del $(OBJS)\server.exe $(OBJS)\client.exe: $(CLIENT_OBJECTS) $(OBJS)\client_client.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< $(CLIENT_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << $(OBJS)\server.exe: $(SERVER_OBJECTS) $(OBJS)\server_server.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< $(SERVER_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/sockets/makefile.wat b/samples/sockets/makefile.wat index 932bc4d8ed..e41aec045a 100644 --- a/samples/sockets/makefile.wat +++ b/samples/sockets/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,22 +55,47 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG = +__DEBUGINFO = !ifeq BUILD debug -__DEBUGFLAG = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG = +!ifeq DEBUG_INFO default +__DEBUGINFO = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO = debug all !endif -__DEBUGFLAG_2 = +__DEBUGINFO_2 = !ifeq BUILD debug -__DEBUGFLAG_2 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_2 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_2 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_2 = -d0 +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_2 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_2 = -d2 !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = @@ -127,7 +157,7 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -CLIENT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_2) $(__OPTIMIZEFLAG) -bm & +CLIENT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_2) $(__OPTIMIZEFLAG) -bm & $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & @@ -139,7 +169,7 @@ LIBDIRNAME = & .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = & wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SERVER_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_2) $(__OPTIMIZEFLAG) -bm & +SERVER_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_2) $(__OPTIMIZEFLAG) -bm & $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & @@ -183,7 +213,7 @@ $(OBJS)\client.exe : $(CLIENT_OBJECTS) $(OBJS)\client_client.res @%append $(OBJS)\client.lbc option quiet @%append $(OBJS)\client.lbc name $^@ @%append $(OBJS)\client.lbc option incremental - @%append $(OBJS)\client.lbc $(LDFLAGS) $(__DEBUGFLAG) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @%append $(OBJS)\client.lbc $(LDFLAGS) $(__DEBUGINFO) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' @for %i in ($(CLIENT_OBJECTS)) do @%append $(OBJS)\client.lbc file %i @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\client.lbc library %i @%append $(OBJS)\client.lbc option resource=$(OBJS)\client_client.res @@ -194,7 +224,7 @@ $(OBJS)\server.exe : $(SERVER_OBJECTS) $(OBJS)\server_server.res @%append $(OBJS)\server.lbc option quiet @%append $(OBJS)\server.lbc name $^@ @%append $(OBJS)\server.lbc option incremental - @%append $(OBJS)\server.lbc $(LDFLAGS) $(__DEBUGFLAG) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @%append $(OBJS)\server.lbc $(LDFLAGS) $(__DEBUGINFO) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' @for %i in ($(SERVER_OBJECTS)) do @%append $(OBJS)\server.lbc file %i @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\server.lbc library %i @%append $(OBJS)\server.lbc option resource=$(OBJS)\server_server.res diff --git a/samples/splitter/Makefile.in b/samples/splitter/Makefile.in index a0ec7073a7..d3bd935fd1 100644 --- a/samples/splitter/Makefile.in +++ b/samples/splitter/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib SPLITTER_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +SPLITTER_OBJECTS = \ + splitter_splitter.o \ + $(__splitter___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ SPLITTER_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ SPLITTER_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ splitter$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o splitter$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: splitter$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f splitter$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -splitter$(EXEEXT): splitter_splitter.o $(__splitter___win32rc) - $(CXX) -o $@ splitter_splitter.o $(__splitter___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +splitter$(EXEEXT): $(SPLITTER_OBJECTS) $(__splitter___win32rc) + $(CXX) -o $@ $(SPLITTER_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__splitter___mac_rezcmd) $(__splitter___mac_setfilecmd) diff --git a/samples/splitter/makefile.bcc b/samples/splitter/makefile.bcc index 5564f10e56..bce1e1ca5e 100644 --- a/samples/splitter/makefile.bcc +++ b/samples/splitter/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SPLITTER_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +SPLITTER_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +SPLITTER_OBJECTS = \ + $(OBJS)\splitter_splitter.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\splitter_splitter.obj: .\splitter.cpp $(CXX) -q -c -P -o$@ $(SPLITTER_CXXFLAGS) $** $(OBJS)\splitter_splitter.res: .\splitter.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\splitter.exe del $(OBJS)\splitter.exe -$(OBJS)\splitter.exe: $(OBJS)\splitter_splitter.obj $(OBJS)\splitter_splitter.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\splitter_splitter.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\splitter_splitter.res +$(OBJS)\splitter.exe: $(SPLITTER_OBJECTS) $(OBJS)\splitter_splitter.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(SPLITTER_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\splitter_splitter.res | diff --git a/samples/splitter/makefile.gcc b/samples/splitter/makefile.gcc index 2c72b442db..f493365132 100644 --- a/samples/splitter/makefile.gcc +++ b/samples/splitter/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SPLITTER_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +SPLITTER_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +SPLITTER_OBJECTS = \ + $(OBJS)\splitter_splitter.o \ + $(OBJS)\splitter_splitter_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\splitter_splitter.o: .\splitter.cpp $(CXX) -c -o $@ $(SPLITTER_CXXFLAGS) $< $(OBJS)\splitter_splitter_rc.o: .\splitter.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\splitter.exe del $(OBJS)\splitter.exe -$(OBJS)\splitter.exe: $(OBJS)\splitter_splitter.o $(OBJS)\splitter_splitter_rc.o - $(CXX) -o $@ $(OBJS)\splitter_splitter.o $(OBJS)\splitter_splitter_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\splitter.exe: $(SPLITTER_OBJECTS) $(OBJS)\splitter_splitter_rc.o + $(CXX) -o $@ $(SPLITTER_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/splitter/makefile.vc b/samples/splitter/makefile.vc index 0d7ce2406a..0fadb0d417 100644 --- a/samples/splitter/makefile.vc +++ b/samples/splitter/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SPLITTER_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\splitter.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +SPLITTER_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\splitter.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +SPLITTER_OBJECTS = \ + $(OBJS)\splitter_splitter.obj \ + $(OBJS)\splitter_splitter.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\splitter_splitter.obj: .\splitter.cpp $(CXX) /c /nologo /TP /Fo$@ $(SPLITTER_CXXFLAGS) $** $(OBJS)\splitter_splitter.res: .\splitter.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\splitter.exe del $(OBJS)\splitter.exe -$(OBJS)\splitter.exe: $(OBJS)\splitter_splitter.obj $(OBJS)\splitter_splitter.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\splitter_splitter.obj $(OBJS)\splitter_splitter.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\splitter.exe: $(SPLITTER_OBJECTS) $(OBJS)\splitter_splitter.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(SPLITTER_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/splitter/makefile.wat b/samples/splitter/makefile.wat index e99c89cf2c..de136cd6b0 100644 --- a/samples/splitter/makefile.wat +++ b/samples/splitter/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -SPLITTER_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +SPLITTER_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +SPLITTER_OBJECTS = & + $(OBJS)\splitter_splitter.obj @@ -126,7 +180,7 @@ $(OBJS)\splitter_splitter.obj : .AUTODEPEND .\splitter.cpp $(CXX) -zq -fo=$^@ $(SPLITTER_CXXFLAGS) $< $(OBJS)\splitter_splitter.res : .AUTODEPEND .\splitter.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\splitter.exe del $(OBJS)\splitter.exe -$(OBJS)\splitter.exe : $(OBJS)\splitter_splitter.obj $(OBJS)\splitter_splitter.res +$(OBJS)\splitter.exe : $(SPLITTER_OBJECTS) $(OBJS)\splitter_splitter.res @%create $(OBJS)\splitter.lbc @%append $(OBJS)\splitter.lbc option quiet @%append $(OBJS)\splitter.lbc name $^@ @%append $(OBJS)\splitter.lbc option incremental - @%append $(OBJS)\splitter.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\splitter_splitter.obj) do @%append $(OBJS)\splitter.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\splitter.lbc library %i + @%append $(OBJS)\splitter.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(SPLITTER_OBJECTS)) do @%append $(OBJS)\splitter.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\splitter.lbc library %i @%append $(OBJS)\splitter.lbc option resource=$(OBJS)\splitter_splitter.res wlink @$(OBJS)\splitter.lbc diff --git a/samples/statbar/Makefile.in b/samples/statbar/Makefile.in index 4b9f466596..fb648c7f00 100644 --- a/samples/statbar/Makefile.in +++ b/samples/statbar/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib STATBAR_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +STATBAR_OBJECTS = \ + statbar_statbar.o \ + $(__statbar___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ STATBAR_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ STATBAR_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ statbar$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o statbar$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: statbar$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f statbar$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -statbar$(EXEEXT): statbar_statbar.o $(__statbar___win32rc) - $(CXX) -o $@ statbar_statbar.o $(__statbar___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +statbar$(EXEEXT): $(STATBAR_OBJECTS) $(__statbar___win32rc) + $(CXX) -o $@ $(STATBAR_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__statbar___mac_rezcmd) $(__statbar___mac_setfilecmd) diff --git a/samples/statbar/makefile.bcc b/samples/statbar/makefile.bcc index 2107cb32c5..f9e322761c 100644 --- a/samples/statbar/makefile.bcc +++ b/samples/statbar/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -STATBAR_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +STATBAR_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +STATBAR_OBJECTS = \ + $(OBJS)\statbar_statbar.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\statbar_statbar.obj: .\statbar.cpp $(CXX) -q -c -P -o$@ $(STATBAR_CXXFLAGS) $** $(OBJS)\statbar_statbar.res: .\statbar.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\statbar.exe del $(OBJS)\statbar.exe -$(OBJS)\statbar.exe: $(OBJS)\statbar_statbar.obj $(OBJS)\statbar_statbar.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\statbar_statbar.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\statbar_statbar.res +$(OBJS)\statbar.exe: $(STATBAR_OBJECTS) $(OBJS)\statbar_statbar.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(STATBAR_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\statbar_statbar.res | diff --git a/samples/statbar/makefile.gcc b/samples/statbar/makefile.gcc index 226cd254fc..04032c7889 100644 --- a/samples/statbar/makefile.gcc +++ b/samples/statbar/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -STATBAR_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +STATBAR_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +STATBAR_OBJECTS = \ + $(OBJS)\statbar_statbar.o \ + $(OBJS)\statbar_statbar_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\statbar_statbar.o: .\statbar.cpp $(CXX) -c -o $@ $(STATBAR_CXXFLAGS) $< $(OBJS)\statbar_statbar_rc.o: .\statbar.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\statbar.exe del $(OBJS)\statbar.exe -$(OBJS)\statbar.exe: $(OBJS)\statbar_statbar.o $(OBJS)\statbar_statbar_rc.o - $(CXX) -o $@ $(OBJS)\statbar_statbar.o $(OBJS)\statbar_statbar_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\statbar.exe: $(STATBAR_OBJECTS) $(OBJS)\statbar_statbar_rc.o + $(CXX) -o $@ $(STATBAR_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/statbar/makefile.vc b/samples/statbar/makefile.vc index 902decf741..31898e9004 100644 --- a/samples/statbar/makefile.vc +++ b/samples/statbar/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -STATBAR_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\statbar.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +STATBAR_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\statbar.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +STATBAR_OBJECTS = \ + $(OBJS)\statbar_statbar.obj \ + $(OBJS)\statbar_statbar.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\statbar_statbar.obj: .\statbar.cpp $(CXX) /c /nologo /TP /Fo$@ $(STATBAR_CXXFLAGS) $** $(OBJS)\statbar_statbar.res: .\statbar.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\statbar.exe del $(OBJS)\statbar.exe -$(OBJS)\statbar.exe: $(OBJS)\statbar_statbar.obj $(OBJS)\statbar_statbar.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\statbar_statbar.obj $(OBJS)\statbar_statbar.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\statbar.exe: $(STATBAR_OBJECTS) $(OBJS)\statbar_statbar.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(STATBAR_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/statbar/makefile.wat b/samples/statbar/makefile.wat index e84c63c310..d1fdd4a28b 100644 --- a/samples/statbar/makefile.wat +++ b/samples/statbar/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -STATBAR_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +STATBAR_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +STATBAR_OBJECTS = & + $(OBJS)\statbar_statbar.obj @@ -126,7 +180,7 @@ $(OBJS)\statbar_statbar.obj : .AUTODEPEND .\statbar.cpp $(CXX) -zq -fo=$^@ $(STATBAR_CXXFLAGS) $< $(OBJS)\statbar_statbar.res : .AUTODEPEND .\statbar.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\statbar.exe del $(OBJS)\statbar.exe -$(OBJS)\statbar.exe : $(OBJS)\statbar_statbar.obj $(OBJS)\statbar_statbar.res +$(OBJS)\statbar.exe : $(STATBAR_OBJECTS) $(OBJS)\statbar_statbar.res @%create $(OBJS)\statbar.lbc @%append $(OBJS)\statbar.lbc option quiet @%append $(OBJS)\statbar.lbc name $^@ @%append $(OBJS)\statbar.lbc option incremental - @%append $(OBJS)\statbar.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\statbar_statbar.obj) do @%append $(OBJS)\statbar.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\statbar.lbc library %i + @%append $(OBJS)\statbar.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(STATBAR_OBJECTS)) do @%append $(OBJS)\statbar.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\statbar.lbc library %i @%append $(OBJS)\statbar.lbc option resource=$(OBJS)\statbar_statbar.res wlink @$(OBJS)\statbar.lbc diff --git a/samples/taskbar/Makefile.in b/samples/taskbar/Makefile.in index dd8762528c..dd5e391094 100644 --- a/samples/taskbar/Makefile.in +++ b/samples/taskbar/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib TASKBAR_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +TASKBAR_OBJECTS = \ + taskbar_tbtest.o \ + $(__taskbar___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ TASKBAR_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ TASKBAR_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ taskbar$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o taskbar$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: taskbar$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f taskbar$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -taskbar$(EXEEXT): taskbar_tbtest.o $(__taskbar___win32rc) - $(CXX) -o $@ taskbar_tbtest.o $(__taskbar___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +taskbar$(EXEEXT): $(TASKBAR_OBJECTS) $(__taskbar___win32rc) + $(CXX) -o $@ $(TASKBAR_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__taskbar___mac_rezcmd) $(__taskbar___mac_setfilecmd) diff --git a/samples/taskbar/makefile.bcc b/samples/taskbar/makefile.bcc index f8d19eb7a4..202da34fe5 100644 --- a/samples/taskbar/makefile.bcc +++ b/samples/taskbar/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TASKBAR_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +TASKBAR_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +TASKBAR_OBJECTS = \ + $(OBJS)\taskbar_tbtest.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\taskbar_tbtest.obj: .\tbtest.cpp $(CXX) -q -c -P -o$@ $(TASKBAR_CXXFLAGS) $** $(OBJS)\taskbar_tbtest.res: .\tbtest.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\taskbar.exe del $(OBJS)\taskbar.exe -$(OBJS)\taskbar.exe: $(OBJS)\taskbar_tbtest.obj $(OBJS)\taskbar_tbtest.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\taskbar_tbtest.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\taskbar_tbtest.res +$(OBJS)\taskbar.exe: $(TASKBAR_OBJECTS) $(OBJS)\taskbar_tbtest.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(TASKBAR_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\taskbar_tbtest.res | diff --git a/samples/taskbar/makefile.gcc b/samples/taskbar/makefile.gcc index a78f27f3c4..da6683b6af 100644 --- a/samples/taskbar/makefile.gcc +++ b/samples/taskbar/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TASKBAR_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +TASKBAR_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +TASKBAR_OBJECTS = \ + $(OBJS)\taskbar_tbtest.o \ + $(OBJS)\taskbar_tbtest_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\taskbar_tbtest.o: .\tbtest.cpp $(CXX) -c -o $@ $(TASKBAR_CXXFLAGS) $< $(OBJS)\taskbar_tbtest_rc.o: .\tbtest.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\taskbar.exe del $(OBJS)\taskbar.exe -$(OBJS)\taskbar.exe: $(OBJS)\taskbar_tbtest.o $(OBJS)\taskbar_tbtest_rc.o - $(CXX) -o $@ $(OBJS)\taskbar_tbtest.o $(OBJS)\taskbar_tbtest_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\taskbar.exe: $(TASKBAR_OBJECTS) $(OBJS)\taskbar_tbtest_rc.o + $(CXX) -o $@ $(TASKBAR_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/taskbar/makefile.vc b/samples/taskbar/makefile.vc index 29934148a4..2295c8f130 100644 --- a/samples/taskbar/makefile.vc +++ b/samples/taskbar/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TASKBAR_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\taskbar.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +TASKBAR_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\taskbar.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +TASKBAR_OBJECTS = \ + $(OBJS)\taskbar_tbtest.obj \ + $(OBJS)\taskbar_tbtest.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\taskbar_tbtest.obj: .\tbtest.cpp $(CXX) /c /nologo /TP /Fo$@ $(TASKBAR_CXXFLAGS) $** $(OBJS)\taskbar_tbtest.res: .\tbtest.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\taskbar.exe del $(OBJS)\taskbar.exe -$(OBJS)\taskbar.exe: $(OBJS)\taskbar_tbtest.obj $(OBJS)\taskbar_tbtest.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\taskbar_tbtest.obj $(OBJS)\taskbar_tbtest.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\taskbar.exe: $(TASKBAR_OBJECTS) $(OBJS)\taskbar_tbtest.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(TASKBAR_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/taskbar/makefile.wat b/samples/taskbar/makefile.wat index 7bb1dfe04a..8b1d679c36 100644 --- a/samples/taskbar/makefile.wat +++ b/samples/taskbar/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TASKBAR_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +TASKBAR_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +TASKBAR_OBJECTS = & + $(OBJS)\taskbar_tbtest.obj @@ -126,7 +180,7 @@ $(OBJS)\taskbar_tbtest.obj : .AUTODEPEND .\tbtest.cpp $(CXX) -zq -fo=$^@ $(TASKBAR_CXXFLAGS) $< $(OBJS)\taskbar_tbtest.res : .AUTODEPEND .\tbtest.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\taskbar.exe del $(OBJS)\taskbar.exe -$(OBJS)\taskbar.exe : $(OBJS)\taskbar_tbtest.obj $(OBJS)\taskbar_tbtest.res +$(OBJS)\taskbar.exe : $(TASKBAR_OBJECTS) $(OBJS)\taskbar_tbtest.res @%create $(OBJS)\taskbar.lbc @%append $(OBJS)\taskbar.lbc option quiet @%append $(OBJS)\taskbar.lbc name $^@ @%append $(OBJS)\taskbar.lbc option incremental - @%append $(OBJS)\taskbar.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\taskbar_tbtest.obj) do @%append $(OBJS)\taskbar.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\taskbar.lbc library %i + @%append $(OBJS)\taskbar.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(TASKBAR_OBJECTS)) do @%append $(OBJS)\taskbar.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\taskbar.lbc library %i @%append $(OBJS)\taskbar.lbc option resource=$(OBJS)\taskbar_tbtest.res wlink @$(OBJS)\taskbar.lbc diff --git a/samples/text/Makefile.in b/samples/text/Makefile.in index 46ebca55a4..c12579de8a 100644 --- a/samples/text/Makefile.in +++ b/samples/text/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib TEXT_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +TEXT_OBJECTS = \ + text_text.o \ + $(__text___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ TEXT_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ TEXT_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ text$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o text$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: text$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f text$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -text$(EXEEXT): text_text.o $(__text___win32rc) - $(CXX) -o $@ text_text.o $(__text___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +text$(EXEEXT): $(TEXT_OBJECTS) $(__text___win32rc) + $(CXX) -o $@ $(TEXT_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__text___mac_rezcmd) $(__text___mac_setfilecmd) diff --git a/samples/text/makefile.bcc b/samples/text/makefile.bcc index a971f47c7e..c4d896d827 100644 --- a/samples/text/makefile.bcc +++ b/samples/text/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TEXT_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +TEXT_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +TEXT_OBJECTS = \ + $(OBJS)\text_text.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\text_text.obj: .\text.cpp $(CXX) -q -c -P -o$@ $(TEXT_CXXFLAGS) $** $(OBJS)\text_text.res: .\text.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\text.exe del $(OBJS)\text.exe -$(OBJS)\text.exe: $(OBJS)\text_text.obj $(OBJS)\text_text.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\text_text.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\text_text.res +$(OBJS)\text.exe: $(TEXT_OBJECTS) $(OBJS)\text_text.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(TEXT_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\text_text.res | diff --git a/samples/text/makefile.gcc b/samples/text/makefile.gcc index 01089b4edf..d8c7a256e4 100644 --- a/samples/text/makefile.gcc +++ b/samples/text/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TEXT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +TEXT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +TEXT_OBJECTS = \ + $(OBJS)\text_text.o \ + $(OBJS)\text_text_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\text_text.o: .\text.cpp $(CXX) -c -o $@ $(TEXT_CXXFLAGS) $< $(OBJS)\text_text_rc.o: .\text.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\text.exe del $(OBJS)\text.exe -$(OBJS)\text.exe: $(OBJS)\text_text.o $(OBJS)\text_text_rc.o - $(CXX) -o $@ $(OBJS)\text_text.o $(OBJS)\text_text_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\text.exe: $(TEXT_OBJECTS) $(OBJS)\text_text_rc.o + $(CXX) -o $@ $(TEXT_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/text/makefile.vc b/samples/text/makefile.vc index 6028d333a5..453789bb24 100644 --- a/samples/text/makefile.vc +++ b/samples/text/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TEXT_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\text.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +TEXT_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) /DWIN32 \ + $(__DEBUGINFO_0) /Fd$(OBJS)\text.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +TEXT_OBJECTS = \ + $(OBJS)\text_text.obj \ + $(OBJS)\text_text.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\text_text.obj: .\text.cpp $(CXX) /c /nologo /TP /Fo$@ $(TEXT_CXXFLAGS) $** $(OBJS)\text_text.res: .\text.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\text.exe del $(OBJS)\text.exe -$(OBJS)\text.exe: $(OBJS)\text_text.obj $(OBJS)\text_text.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\text_text.obj $(OBJS)\text_text.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\text.exe: $(TEXT_OBJECTS) $(OBJS)\text_text.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(TEXT_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/text/makefile.wat b/samples/text/makefile.wat index 5b1ce791d0..23081f2452 100644 --- a/samples/text/makefile.wat +++ b/samples/text/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TEXT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +TEXT_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +TEXT_OBJECTS = & + $(OBJS)\text_text.obj @@ -126,7 +180,7 @@ $(OBJS)\text_text.obj : .AUTODEPEND .\text.cpp $(CXX) -zq -fo=$^@ $(TEXT_CXXFLAGS) $< $(OBJS)\text_text.res : .AUTODEPEND .\text.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\text.exe del $(OBJS)\text.exe -$(OBJS)\text.exe : $(OBJS)\text_text.obj $(OBJS)\text_text.res +$(OBJS)\text.exe : $(TEXT_OBJECTS) $(OBJS)\text_text.res @%create $(OBJS)\text.lbc @%append $(OBJS)\text.lbc option quiet @%append $(OBJS)\text.lbc name $^@ @%append $(OBJS)\text.lbc option incremental - @%append $(OBJS)\text.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\text_text.obj) do @%append $(OBJS)\text.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\text.lbc library %i + @%append $(OBJS)\text.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(TEXT_OBJECTS)) do @%append $(OBJS)\text.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\text.lbc library %i @%append $(OBJS)\text.lbc option resource=$(OBJS)\text_text.res wlink @$(OBJS)\text.lbc diff --git a/samples/thread/Makefile.in b/samples/thread/Makefile.in index ea51178bc3..7388557f76 100644 --- a/samples/thread/Makefile.in +++ b/samples/thread/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib THREAD_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +THREAD_OBJECTS = \ + thread_thread.o \ + $(__thread___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ THREAD_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ THREAD_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ thread$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o thread$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: thread$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f thread$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -thread$(EXEEXT): thread_thread.o $(__thread___win32rc) - $(CXX) -o $@ thread_thread.o $(__thread___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +thread$(EXEEXT): $(THREAD_OBJECTS) $(__thread___win32rc) + $(CXX) -o $@ $(THREAD_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__thread___mac_rezcmd) $(__thread___mac_setfilecmd) diff --git a/samples/thread/makefile.bcc b/samples/thread/makefile.bcc index 169fac6a8a..eedf9168be 100644 --- a/samples/thread/makefile.bcc +++ b/samples/thread/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -THREAD_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +THREAD_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +THREAD_OBJECTS = \ + $(OBJS)\thread_thread.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\thread_thread.obj: .\thread.cpp $(CXX) -q -c -P -o$@ $(THREAD_CXXFLAGS) $** $(OBJS)\thread_thread.res: .\thread.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\thread.exe del $(OBJS)\thread.exe -$(OBJS)\thread.exe: $(OBJS)\thread_thread.obj $(OBJS)\thread_thread.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\thread_thread.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\thread_thread.res +$(OBJS)\thread.exe: $(THREAD_OBJECTS) $(OBJS)\thread_thread.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(THREAD_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\thread_thread.res | diff --git a/samples/thread/makefile.gcc b/samples/thread/makefile.gcc index 5f27e825a6..b00c80fae5 100644 --- a/samples/thread/makefile.gcc +++ b/samples/thread/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -THREAD_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +THREAD_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +THREAD_OBJECTS = \ + $(OBJS)\thread_thread.o \ + $(OBJS)\thread_thread_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\thread_thread.o: .\thread.cpp $(CXX) -c -o $@ $(THREAD_CXXFLAGS) $< $(OBJS)\thread_thread_rc.o: .\thread.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\thread.exe del $(OBJS)\thread.exe -$(OBJS)\thread.exe: $(OBJS)\thread_thread.o $(OBJS)\thread_thread_rc.o - $(CXX) -o $@ $(OBJS)\thread_thread.o $(OBJS)\thread_thread_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\thread.exe: $(THREAD_OBJECTS) $(OBJS)\thread_thread_rc.o + $(CXX) -o $@ $(THREAD_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/thread/makefile.vc b/samples/thread/makefile.vc index e04fefd52d..718a0bb445 100644 --- a/samples/thread/makefile.vc +++ b/samples/thread/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -THREAD_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\thread.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +THREAD_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) /DWIN32 \ + $(__DEBUGINFO_0) /Fd$(OBJS)\thread.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +THREAD_OBJECTS = \ + $(OBJS)\thread_thread.obj \ + $(OBJS)\thread_thread.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\thread_thread.obj: .\thread.cpp $(CXX) /c /nologo /TP /Fo$@ $(THREAD_CXXFLAGS) $** $(OBJS)\thread_thread.res: .\thread.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\thread.exe del $(OBJS)\thread.exe -$(OBJS)\thread.exe: $(OBJS)\thread_thread.obj $(OBJS)\thread_thread.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\thread_thread.obj $(OBJS)\thread_thread.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\thread.exe: $(THREAD_OBJECTS) $(OBJS)\thread_thread.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(THREAD_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/thread/makefile.wat b/samples/thread/makefile.wat index f820a8fa20..5dd5d858fd 100644 --- a/samples/thread/makefile.wat +++ b/samples/thread/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -THREAD_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +THREAD_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +THREAD_OBJECTS = & + $(OBJS)\thread_thread.obj @@ -126,7 +180,7 @@ $(OBJS)\thread_thread.obj : .AUTODEPEND .\thread.cpp $(CXX) -zq -fo=$^@ $(THREAD_CXXFLAGS) $< $(OBJS)\thread_thread.res : .AUTODEPEND .\thread.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\thread.exe del $(OBJS)\thread.exe -$(OBJS)\thread.exe : $(OBJS)\thread_thread.obj $(OBJS)\thread_thread.res +$(OBJS)\thread.exe : $(THREAD_OBJECTS) $(OBJS)\thread_thread.res @%create $(OBJS)\thread.lbc @%append $(OBJS)\thread.lbc option quiet @%append $(OBJS)\thread.lbc name $^@ @%append $(OBJS)\thread.lbc option incremental - @%append $(OBJS)\thread.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\thread_thread.obj) do @%append $(OBJS)\thread.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\thread.lbc library %i + @%append $(OBJS)\thread.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(THREAD_OBJECTS)) do @%append $(OBJS)\thread.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\thread.lbc library %i @%append $(OBJS)\thread.lbc option resource=$(OBJS)\thread_thread.res wlink @$(OBJS)\thread.lbc diff --git a/samples/toolbar/Makefile.in b/samples/toolbar/Makefile.in index a52ea890cb..913ae1ed9a 100644 --- a/samples/toolbar/Makefile.in +++ b/samples/toolbar/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib TOOLBAR_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +TOOLBAR_OBJECTS = \ + toolbar_toolbar.o \ + $(__toolbar___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ TOOLBAR_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ TOOLBAR_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ toolbar$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o toolbar$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: toolbar$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f toolbar$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -toolbar$(EXEEXT): toolbar_toolbar.o $(__toolbar___win32rc) - $(CXX) -o $@ toolbar_toolbar.o $(__toolbar___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +toolbar$(EXEEXT): $(TOOLBAR_OBJECTS) $(__toolbar___win32rc) + $(CXX) -o $@ $(TOOLBAR_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__toolbar___mac_rezcmd) $(__toolbar___mac_setfilecmd) diff --git a/samples/toolbar/makefile.bcc b/samples/toolbar/makefile.bcc index 1cffeb7468..6ff5bcad5f 100644 --- a/samples/toolbar/makefile.bcc +++ b/samples/toolbar/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TOOLBAR_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +TOOLBAR_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +TOOLBAR_OBJECTS = \ + $(OBJS)\toolbar_toolbar.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\toolbar_toolbar.obj: .\toolbar.cpp $(CXX) -q -c -P -o$@ $(TOOLBAR_CXXFLAGS) $** $(OBJS)\toolbar_toolbar.res: .\toolbar.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\toolbar.exe del $(OBJS)\toolbar.exe -$(OBJS)\toolbar.exe: $(OBJS)\toolbar_toolbar.obj $(OBJS)\toolbar_toolbar.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\toolbar_toolbar.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\toolbar_toolbar.res +$(OBJS)\toolbar.exe: $(TOOLBAR_OBJECTS) $(OBJS)\toolbar_toolbar.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(TOOLBAR_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\toolbar_toolbar.res | diff --git a/samples/toolbar/makefile.gcc b/samples/toolbar/makefile.gcc index aed1998dc3..ddfdfa2aa3 100644 --- a/samples/toolbar/makefile.gcc +++ b/samples/toolbar/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TOOLBAR_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +TOOLBAR_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +TOOLBAR_OBJECTS = \ + $(OBJS)\toolbar_toolbar.o \ + $(OBJS)\toolbar_toolbar_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\toolbar_toolbar.o: .\toolbar.cpp $(CXX) -c -o $@ $(TOOLBAR_CXXFLAGS) $< $(OBJS)\toolbar_toolbar_rc.o: .\toolbar.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\toolbar.exe del $(OBJS)\toolbar.exe -$(OBJS)\toolbar.exe: $(OBJS)\toolbar_toolbar.o $(OBJS)\toolbar_toolbar_rc.o - $(CXX) -o $@ $(OBJS)\toolbar_toolbar.o $(OBJS)\toolbar_toolbar_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\toolbar.exe: $(TOOLBAR_OBJECTS) $(OBJS)\toolbar_toolbar_rc.o + $(CXX) -o $@ $(TOOLBAR_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/toolbar/makefile.vc b/samples/toolbar/makefile.vc index b073d0055f..7b2b4bfe91 100644 --- a/samples/toolbar/makefile.vc +++ b/samples/toolbar/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TOOLBAR_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\toolbar.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +TOOLBAR_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\toolbar.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +TOOLBAR_OBJECTS = \ + $(OBJS)\toolbar_toolbar.obj \ + $(OBJS)\toolbar_toolbar.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\toolbar_toolbar.obj: .\toolbar.cpp $(CXX) /c /nologo /TP /Fo$@ $(TOOLBAR_CXXFLAGS) $** $(OBJS)\toolbar_toolbar.res: .\toolbar.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\toolbar.exe del $(OBJS)\toolbar.exe -$(OBJS)\toolbar.exe: $(OBJS)\toolbar_toolbar.obj $(OBJS)\toolbar_toolbar.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\toolbar_toolbar.obj $(OBJS)\toolbar_toolbar.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\toolbar.exe: $(TOOLBAR_OBJECTS) $(OBJS)\toolbar_toolbar.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(TOOLBAR_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/toolbar/makefile.wat b/samples/toolbar/makefile.wat index f7897a42a8..71831a38c3 100644 --- a/samples/toolbar/makefile.wat +++ b/samples/toolbar/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TOOLBAR_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +TOOLBAR_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +TOOLBAR_OBJECTS = & + $(OBJS)\toolbar_toolbar.obj @@ -126,7 +180,7 @@ $(OBJS)\toolbar_toolbar.obj : .AUTODEPEND .\toolbar.cpp $(CXX) -zq -fo=$^@ $(TOOLBAR_CXXFLAGS) $< $(OBJS)\toolbar_toolbar.res : .AUTODEPEND .\toolbar.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\toolbar.exe del $(OBJS)\toolbar.exe -$(OBJS)\toolbar.exe : $(OBJS)\toolbar_toolbar.obj $(OBJS)\toolbar_toolbar.res +$(OBJS)\toolbar.exe : $(TOOLBAR_OBJECTS) $(OBJS)\toolbar_toolbar.res @%create $(OBJS)\toolbar.lbc @%append $(OBJS)\toolbar.lbc option quiet @%append $(OBJS)\toolbar.lbc name $^@ @%append $(OBJS)\toolbar.lbc option incremental - @%append $(OBJS)\toolbar.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\toolbar_toolbar.obj) do @%append $(OBJS)\toolbar.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\toolbar.lbc library %i + @%append $(OBJS)\toolbar.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(TOOLBAR_OBJECTS)) do @%append $(OBJS)\toolbar.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\toolbar.lbc library %i @%append $(OBJS)\toolbar.lbc option resource=$(OBJS)\toolbar_toolbar.res wlink @$(OBJS)\toolbar.lbc diff --git a/samples/treectrl/Makefile.in b/samples/treectrl/Makefile.in index 3b0a541445..b7ed12bd67 100644 --- a/samples/treectrl/Makefile.in +++ b/samples/treectrl/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib TREECTRL_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +TREECTRL_OBJECTS = \ + treectrl_treetest.o \ + $(__treectrl___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ TREECTRL_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ TREECTRL_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ treectrl$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o treectrl$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: treectrl$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f treectrl$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -treectrl$(EXEEXT): treectrl_treetest.o $(__treectrl___win32rc) - $(CXX) -o $@ treectrl_treetest.o $(__treectrl___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +treectrl$(EXEEXT): $(TREECTRL_OBJECTS) $(__treectrl___win32rc) + $(CXX) -o $@ $(TREECTRL_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__treectrl___mac_rezcmd) $(__treectrl___mac_setfilecmd) diff --git a/samples/treectrl/makefile.bcc b/samples/treectrl/makefile.bcc index 513ac906fc..fd4de79634 100644 --- a/samples/treectrl/makefile.bcc +++ b/samples/treectrl/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TREECTRL_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +TREECTRL_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +TREECTRL_OBJECTS = \ + $(OBJS)\treectrl_treetest.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\treectrl_treetest.obj: .\treetest.cpp $(CXX) -q -c -P -o$@ $(TREECTRL_CXXFLAGS) $** $(OBJS)\treectrl_treetest.res: .\treetest.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\treectrl.exe del $(OBJS)\treectrl.exe -$(OBJS)\treectrl.exe: $(OBJS)\treectrl_treetest.obj $(OBJS)\treectrl_treetest.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\treectrl_treetest.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\treectrl_treetest.res +$(OBJS)\treectrl.exe: $(TREECTRL_OBJECTS) $(OBJS)\treectrl_treetest.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(TREECTRL_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\treectrl_treetest.res | diff --git a/samples/treectrl/makefile.gcc b/samples/treectrl/makefile.gcc index f50a10ea2d..8b137506c3 100644 --- a/samples/treectrl/makefile.gcc +++ b/samples/treectrl/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TREECTRL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +TREECTRL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +TREECTRL_OBJECTS = \ + $(OBJS)\treectrl_treetest.o \ + $(OBJS)\treectrl_treetest_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\treectrl_treetest.o: .\treetest.cpp $(CXX) -c -o $@ $(TREECTRL_CXXFLAGS) $< $(OBJS)\treectrl_treetest_rc.o: .\treetest.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\treectrl.exe del $(OBJS)\treectrl.exe -$(OBJS)\treectrl.exe: $(OBJS)\treectrl_treetest.o $(OBJS)\treectrl_treetest_rc.o - $(CXX) -o $@ $(OBJS)\treectrl_treetest.o $(OBJS)\treectrl_treetest_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\treectrl.exe: $(TREECTRL_OBJECTS) $(OBJS)\treectrl_treetest_rc.o + $(CXX) -o $@ $(TREECTRL_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/treectrl/makefile.vc b/samples/treectrl/makefile.vc index de3970e08c..970df81757 100644 --- a/samples/treectrl/makefile.vc +++ b/samples/treectrl/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TREECTRL_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\treectrl.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +TREECTRL_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\treectrl.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +TREECTRL_OBJECTS = \ + $(OBJS)\treectrl_treetest.obj \ + $(OBJS)\treectrl_treetest.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\treectrl_treetest.obj: .\treetest.cpp $(CXX) /c /nologo /TP /Fo$@ $(TREECTRL_CXXFLAGS) $** $(OBJS)\treectrl_treetest.res: .\treetest.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\treectrl.exe del $(OBJS)\treectrl.exe -$(OBJS)\treectrl.exe: $(OBJS)\treectrl_treetest.obj $(OBJS)\treectrl_treetest.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\treectrl_treetest.obj $(OBJS)\treectrl_treetest.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\treectrl.exe: $(TREECTRL_OBJECTS) $(OBJS)\treectrl_treetest.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(TREECTRL_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/treectrl/makefile.wat b/samples/treectrl/makefile.wat index 5179c8cfc7..28785a3b86 100644 --- a/samples/treectrl/makefile.wat +++ b/samples/treectrl/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TREECTRL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +TREECTRL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +TREECTRL_OBJECTS = & + $(OBJS)\treectrl_treetest.obj @@ -126,7 +180,7 @@ $(OBJS)\treectrl_treetest.obj : .AUTODEPEND .\treetest.cpp $(CXX) -zq -fo=$^@ $(TREECTRL_CXXFLAGS) $< $(OBJS)\treectrl_treetest.res : .AUTODEPEND .\treetest.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\treectrl.exe del $(OBJS)\treectrl.exe -$(OBJS)\treectrl.exe : $(OBJS)\treectrl_treetest.obj $(OBJS)\treectrl_treetest.res +$(OBJS)\treectrl.exe : $(TREECTRL_OBJECTS) $(OBJS)\treectrl_treetest.res @%create $(OBJS)\treectrl.lbc @%append $(OBJS)\treectrl.lbc option quiet @%append $(OBJS)\treectrl.lbc name $^@ @%append $(OBJS)\treectrl.lbc option incremental - @%append $(OBJS)\treectrl.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\treectrl_treetest.obj) do @%append $(OBJS)\treectrl.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\treectrl.lbc library %i + @%append $(OBJS)\treectrl.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(TREECTRL_OBJECTS)) do @%append $(OBJS)\treectrl.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\treectrl.lbc library %i @%append $(OBJS)\treectrl.lbc option resource=$(OBJS)\treectrl_treetest.res wlink @$(OBJS)\treectrl.lbc diff --git a/samples/typetest/Makefile.in b/samples/typetest/Makefile.in index 9fc210f2d5..d0ad5f5ef9 100644 --- a/samples/typetest/Makefile.in +++ b/samples/typetest/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib TYPETEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +TYPETEST_OBJECTS = \ + typetest_typetest.o \ + $(__typetest___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ TYPETEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ TYPETEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ typetest$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o typetest$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: typetest$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f typetest$(EXEEXT) distclean: clean @@ -131,8 +140,8 @@ install: all install-strip: install -typetest$(EXEEXT): typetest_typetest.o $(__typetest___win32rc) - $(CXX) -o $@ typetest_typetest.o $(__typetest___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +typetest$(EXEEXT): $(TYPETEST_OBJECTS) $(__typetest___win32rc) + $(CXX) -o $@ $(TYPETEST_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__typetest___mac_rezcmd) $(__typetest___mac_setfilecmd) diff --git a/samples/typetest/makefile.bcc b/samples/typetest/makefile.bcc index cbe9256a5a..a28a88a690 100644 --- a/samples/typetest/makefile.bcc +++ b/samples/typetest/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TYPETEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +TYPETEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +TYPETEST_OBJECTS = \ + $(OBJS)\typetest_typetest.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\typetest_typetest.obj: .\typetest.cpp $(CXX) -q -c -P -o$@ $(TYPETEST_CXXFLAGS) $** $(OBJS)\typetest_typetest.res: .\typetest.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\typetest.exe del $(OBJS)\typetest.exe -$(OBJS)\typetest.exe: $(OBJS)\typetest_typetest.obj $(OBJS)\typetest_typetest.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\typetest_typetest.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\typetest_typetest.res +$(OBJS)\typetest.exe: $(TYPETEST_OBJECTS) $(OBJS)\typetest_typetest.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(TYPETEST_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\typetest_typetest.res | diff --git a/samples/typetest/makefile.gcc b/samples/typetest/makefile.gcc index 23872149f7..248657fcbd 100644 --- a/samples/typetest/makefile.gcc +++ b/samples/typetest/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TYPETEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +TYPETEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +TYPETEST_OBJECTS = \ + $(OBJS)\typetest_typetest.o \ + $(OBJS)\typetest_typetest_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\typetest_typetest.o: .\typetest.cpp $(CXX) -c -o $@ $(TYPETEST_CXXFLAGS) $< $(OBJS)\typetest_typetest_rc.o: .\typetest.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\typetest.exe del $(OBJS)\typetest.exe -$(OBJS)\typetest.exe: $(OBJS)\typetest_typetest.o $(OBJS)\typetest_typetest_rc.o - $(CXX) -o $@ $(OBJS)\typetest_typetest.o $(OBJS)\typetest_typetest_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\typetest.exe: $(TYPETEST_OBJECTS) $(OBJS)\typetest_typetest_rc.o + $(CXX) -o $@ $(TYPETEST_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/typetest/makefile.vc b/samples/typetest/makefile.vc index 1afc4dbe3b..3749b494ea 100644 --- a/samples/typetest/makefile.vc +++ b/samples/typetest/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TYPETEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\typetest.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +TYPETEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\typetest.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +TYPETEST_OBJECTS = \ + $(OBJS)\typetest_typetest.obj \ + $(OBJS)\typetest_typetest.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\typetest_typetest.obj: .\typetest.cpp $(CXX) /c /nologo /TP /Fo$@ $(TYPETEST_CXXFLAGS) $** $(OBJS)\typetest_typetest.res: .\typetest.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\typetest.exe del $(OBJS)\typetest.exe -$(OBJS)\typetest.exe: $(OBJS)\typetest_typetest.obj $(OBJS)\typetest_typetest.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\typetest_typetest.obj $(OBJS)\typetest_typetest.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\typetest.exe: $(TYPETEST_OBJECTS) $(OBJS)\typetest_typetest.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(TYPETEST_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/typetest/makefile.wat b/samples/typetest/makefile.wat index 1aed66d208..e7226d82ac 100644 --- a/samples/typetest/makefile.wat +++ b/samples/typetest/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -TYPETEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +TYPETEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +TYPETEST_OBJECTS = & + $(OBJS)\typetest_typetest.obj @@ -126,7 +180,7 @@ $(OBJS)\typetest_typetest.obj : .AUTODEPEND .\typetest.cpp $(CXX) -zq -fo=$^@ $(TYPETEST_CXXFLAGS) $< $(OBJS)\typetest_typetest.res : .AUTODEPEND .\typetest.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\typetest.exe del $(OBJS)\typetest.exe -$(OBJS)\typetest.exe : $(OBJS)\typetest_typetest.obj $(OBJS)\typetest_typetest.res +$(OBJS)\typetest.exe : $(TYPETEST_OBJECTS) $(OBJS)\typetest_typetest.res @%create $(OBJS)\typetest.lbc @%append $(OBJS)\typetest.lbc option quiet @%append $(OBJS)\typetest.lbc name $^@ @%append $(OBJS)\typetest.lbc option incremental - @%append $(OBJS)\typetest.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\typetest_typetest.obj) do @%append $(OBJS)\typetest.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\typetest.lbc library %i + @%append $(OBJS)\typetest.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(TYPETEST_OBJECTS)) do @%append $(OBJS)\typetest.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\typetest.lbc library %i @%append $(OBJS)\typetest.lbc option resource=$(OBJS)\typetest_typetest.res wlink @$(OBJS)\typetest.lbc diff --git a/samples/validate/Makefile.in b/samples/validate/Makefile.in index 9928a375d1..7b71d59146 100644 --- a/samples/validate/Makefile.in +++ b/samples/validate/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib VALIDATE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +VALIDATE_OBJECTS = \ + validate_validate.o \ + $(__validate___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ VALIDATE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ VALIDATE_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ validate$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o validate$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: validate$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f validate$(EXEEXT) distclean: clean @@ -133,8 +142,8 @@ install-strip: install uninstall: -validate$(EXEEXT): validate_validate.o $(__validate___win32rc) - $(CXX) -o $@ validate_validate.o $(__validate___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +validate$(EXEEXT): $(VALIDATE_OBJECTS) $(__validate___win32rc) + $(CXX) -o $@ $(VALIDATE_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__validate___mac_rezcmd) $(__validate___mac_setfilecmd) diff --git a/samples/validate/makefile.bcc b/samples/validate/makefile.bcc index fe466ded05..cd0229df57 100644 --- a/samples/validate/makefile.bcc +++ b/samples/validate/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -VALIDATE_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +VALIDATE_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +VALIDATE_OBJECTS = \ + $(OBJS)\validate_validate.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\validate_validate.obj: .\validate.cpp $(CXX) -q -c -P -o$@ $(VALIDATE_CXXFLAGS) $** $(OBJS)\validate_validate.res: .\validate.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\validate.exe del $(OBJS)\validate.exe -$(OBJS)\validate.exe: $(OBJS)\validate_validate.obj $(OBJS)\validate_validate.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\validate_validate.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\validate_validate.res +$(OBJS)\validate.exe: $(VALIDATE_OBJECTS) $(OBJS)\validate_validate.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(VALIDATE_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\validate_validate.res | diff --git a/samples/validate/makefile.gcc b/samples/validate/makefile.gcc index ea52962487..a81fcb7284 100644 --- a/samples/validate/makefile.gcc +++ b/samples/validate/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -VALIDATE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +VALIDATE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +VALIDATE_OBJECTS = \ + $(OBJS)\validate_validate.o \ + $(OBJS)\validate_validate_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\validate_validate.o: .\validate.cpp $(CXX) -c -o $@ $(VALIDATE_CXXFLAGS) $< $(OBJS)\validate_validate_rc.o: .\validate.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\validate.exe del $(OBJS)\validate.exe -$(OBJS)\validate.exe: $(OBJS)\validate_validate.o $(OBJS)\validate_validate_rc.o - $(CXX) -o $@ $(OBJS)\validate_validate.o $(OBJS)\validate_validate_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\validate.exe: $(VALIDATE_OBJECTS) $(OBJS)\validate_validate_rc.o + $(CXX) -o $@ $(VALIDATE_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/validate/makefile.vc b/samples/validate/makefile.vc index e5ec70d254..02e7b917ad 100644 --- a/samples/validate/makefile.vc +++ b/samples/validate/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -VALIDATE_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\validate.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +VALIDATE_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\validate.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +VALIDATE_OBJECTS = \ + $(OBJS)\validate_validate.obj \ + $(OBJS)\validate_validate.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\validate_validate.obj: .\validate.cpp $(CXX) /c /nologo /TP /Fo$@ $(VALIDATE_CXXFLAGS) $** $(OBJS)\validate_validate.res: .\validate.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\validate.exe del $(OBJS)\validate.exe -$(OBJS)\validate.exe: $(OBJS)\validate_validate.obj $(OBJS)\validate_validate.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\validate_validate.obj $(OBJS)\validate_validate.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\validate.exe: $(VALIDATE_OBJECTS) $(OBJS)\validate_validate.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(VALIDATE_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/validate/makefile.wat b/samples/validate/makefile.wat index 1605607ef3..cccee8a8ab 100644 --- a/samples/validate/makefile.wat +++ b/samples/validate/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -VALIDATE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +VALIDATE_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +VALIDATE_OBJECTS = & + $(OBJS)\validate_validate.obj @@ -126,7 +180,7 @@ $(OBJS)\validate_validate.obj : .AUTODEPEND .\validate.cpp $(CXX) -zq -fo=$^@ $(VALIDATE_CXXFLAGS) $< $(OBJS)\validate_validate.res : .AUTODEPEND .\validate.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\validate.exe del $(OBJS)\validate.exe -$(OBJS)\validate.exe : $(OBJS)\validate_validate.obj $(OBJS)\validate_validate.res +$(OBJS)\validate.exe : $(VALIDATE_OBJECTS) $(OBJS)\validate_validate.res @%create $(OBJS)\validate.lbc @%append $(OBJS)\validate.lbc option quiet @%append $(OBJS)\validate.lbc name $^@ @%append $(OBJS)\validate.lbc option incremental - @%append $(OBJS)\validate.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\validate_validate.obj) do @%append $(OBJS)\validate.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\validate.lbc library %i + @%append $(OBJS)\validate.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(VALIDATE_OBJECTS)) do @%append $(OBJS)\validate.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\validate.lbc library %i @%append $(OBJS)\validate.lbc option resource=$(OBJS)\validate_validate.res wlink @$(OBJS)\validate.lbc diff --git a/samples/vscroll/Makefile.in b/samples/vscroll/Makefile.in index f63ff20a54..1636397647 100644 --- a/samples/vscroll/Makefile.in +++ b/samples/vscroll/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib VSCROLL_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +VSCROLL_OBJECTS = \ + vscroll_vscroll.o \ + $(__vscroll___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ VSCROLL_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ VSCROLL_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ vscroll$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o vscroll$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: vscroll$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f vscroll$(EXEEXT) distclean: clean @@ -133,8 +142,8 @@ install-strip: install uninstall: -vscroll$(EXEEXT): vscroll_vscroll.o $(__vscroll___win32rc) - $(CXX) -o $@ vscroll_vscroll.o $(__vscroll___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +vscroll$(EXEEXT): $(VSCROLL_OBJECTS) $(__vscroll___win32rc) + $(CXX) -o $@ $(VSCROLL_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__vscroll___mac_rezcmd) $(__vscroll___mac_setfilecmd) diff --git a/samples/vscroll/makefile.bcc b/samples/vscroll/makefile.bcc index a63ffc3cff..d20a06a57c 100644 --- a/samples/vscroll/makefile.bcc +++ b/samples/vscroll/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -VSCROLL_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +VSCROLL_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +VSCROLL_OBJECTS = \ + $(OBJS)\vscroll_vscroll.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\vscroll_vscroll.obj: .\vscroll.cpp $(CXX) -q -c -P -o$@ $(VSCROLL_CXXFLAGS) $** $(OBJS)\vscroll_vscroll.res: .\vscroll.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\vscroll.exe del $(OBJS)\vscroll.exe -$(OBJS)\vscroll.exe: $(OBJS)\vscroll_vscroll.obj $(OBJS)\vscroll_vscroll.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\vscroll_vscroll.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\vscroll_vscroll.res +$(OBJS)\vscroll.exe: $(VSCROLL_OBJECTS) $(OBJS)\vscroll_vscroll.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(VSCROLL_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\vscroll_vscroll.res | diff --git a/samples/vscroll/makefile.gcc b/samples/vscroll/makefile.gcc index 4b37c609a1..a62f0965fc 100644 --- a/samples/vscroll/makefile.gcc +++ b/samples/vscroll/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -VSCROLL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +VSCROLL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +VSCROLL_OBJECTS = \ + $(OBJS)\vscroll_vscroll.o \ + $(OBJS)\vscroll_vscroll_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\vscroll_vscroll.o: .\vscroll.cpp $(CXX) -c -o $@ $(VSCROLL_CXXFLAGS) $< $(OBJS)\vscroll_vscroll_rc.o: .\vscroll.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\vscroll.exe del $(OBJS)\vscroll.exe -$(OBJS)\vscroll.exe: $(OBJS)\vscroll_vscroll.o $(OBJS)\vscroll_vscroll_rc.o - $(CXX) -o $@ $(OBJS)\vscroll_vscroll.o $(OBJS)\vscroll_vscroll_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\vscroll.exe: $(VSCROLL_OBJECTS) $(OBJS)\vscroll_vscroll_rc.o + $(CXX) -o $@ $(VSCROLL_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/vscroll/makefile.vc b/samples/vscroll/makefile.vc index 460cd38c06..429f860613 100644 --- a/samples/vscroll/makefile.vc +++ b/samples/vscroll/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -VSCROLL_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\vscroll.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +VSCROLL_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\vscroll.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +VSCROLL_OBJECTS = \ + $(OBJS)\vscroll_vscroll.obj \ + $(OBJS)\vscroll_vscroll.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\vscroll_vscroll.obj: .\vscroll.cpp $(CXX) /c /nologo /TP /Fo$@ $(VSCROLL_CXXFLAGS) $** $(OBJS)\vscroll_vscroll.res: .\vscroll.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\vscroll.exe del $(OBJS)\vscroll.exe -$(OBJS)\vscroll.exe: $(OBJS)\vscroll_vscroll.obj $(OBJS)\vscroll_vscroll.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\vscroll_vscroll.obj $(OBJS)\vscroll_vscroll.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\vscroll.exe: $(VSCROLL_OBJECTS) $(OBJS)\vscroll_vscroll.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(VSCROLL_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/vscroll/makefile.wat b/samples/vscroll/makefile.wat index b74db5812e..6747bd4244 100644 --- a/samples/vscroll/makefile.wat +++ b/samples/vscroll/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -VSCROLL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +VSCROLL_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +VSCROLL_OBJECTS = & + $(OBJS)\vscroll_vscroll.obj @@ -126,7 +180,7 @@ $(OBJS)\vscroll_vscroll.obj : .AUTODEPEND .\vscroll.cpp $(CXX) -zq -fo=$^@ $(VSCROLL_CXXFLAGS) $< $(OBJS)\vscroll_vscroll.res : .AUTODEPEND .\vscroll.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\vscroll.exe del $(OBJS)\vscroll.exe -$(OBJS)\vscroll.exe : $(OBJS)\vscroll_vscroll.obj $(OBJS)\vscroll_vscroll.res +$(OBJS)\vscroll.exe : $(VSCROLL_OBJECTS) $(OBJS)\vscroll_vscroll.res @%create $(OBJS)\vscroll.lbc @%append $(OBJS)\vscroll.lbc option quiet @%append $(OBJS)\vscroll.lbc name $^@ @%append $(OBJS)\vscroll.lbc option incremental - @%append $(OBJS)\vscroll.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\vscroll_vscroll.obj) do @%append $(OBJS)\vscroll.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\vscroll.lbc library %i + @%append $(OBJS)\vscroll.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(VSCROLL_OBJECTS)) do @%append $(OBJS)\vscroll.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\vscroll.lbc library %i @%append $(OBJS)\vscroll.lbc option resource=$(OBJS)\vscroll_vscroll.res wlink @$(OBJS)\vscroll.lbc diff --git a/samples/widgets/Makefile.in b/samples/widgets/Makefile.in index 1d86dcfab1..133a12228e 100644 --- a/samples/widgets/Makefile.in +++ b/samples/widgets/Makefile.in @@ -32,10 +32,24 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib WIDGETS_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +WIDGETS_OBJECTS = \ + widgets_button.o \ + widgets_combobox.o \ + widgets_gauge.o \ + widgets_listbox.o \ + widgets_notebook.o \ + widgets_radiobox.o \ + widgets_slider.o \ + widgets_spinbtn.o \ + widgets_static.o \ + widgets_textctrl.o \ + widgets_widgets.o \ + $(__widgets___win32rc) ### Conditionally set variables: ### @@ -44,7 +58,8 @@ WIDGETS_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +95,36 @@ WIDGETS_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ widgets$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o widgets$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +139,7 @@ all: widgets$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f widgets$(EXEEXT) distclean: clean @@ -133,8 +152,8 @@ install-strip: install uninstall: -widgets$(EXEEXT): widgets_button.o widgets_combobox.o widgets_gauge.o widgets_listbox.o widgets_notebook.o widgets_radiobox.o widgets_slider.o widgets_spinbtn.o widgets_static.o widgets_textctrl.o widgets_widgets.o $(__widgets___win32rc) - $(CXX) -o $@ widgets_button.o widgets_combobox.o widgets_gauge.o widgets_listbox.o widgets_notebook.o widgets_radiobox.o widgets_slider.o widgets_spinbtn.o widgets_static.o widgets_textctrl.o widgets_widgets.o $(__widgets___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +widgets$(EXEEXT): $(WIDGETS_OBJECTS) $(__widgets___win32rc) + $(CXX) -o $@ $(WIDGETS_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__widgets___mac_rezcmd) $(__widgets___mac_setfilecmd) diff --git a/samples/widgets/makefile.bcc b/samples/widgets/makefile.bcc index db128e5a7f..bf88d10d26 100644 --- a/samples/widgets/makefile.bcc +++ b/samples/widgets/makefile.bcc @@ -20,14 +20,27 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -WIDGETS_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +WIDGETS_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +WIDGETS_OBJECTS = \ + $(OBJS)\widgets_button.obj \ + $(OBJS)\widgets_combobox.obj \ + $(OBJS)\widgets_gauge.obj \ + $(OBJS)\widgets_listbox.obj \ + $(OBJS)\widgets_notebook.obj \ + $(OBJS)\widgets_radiobox.obj \ + $(OBJS)\widgets_slider.obj \ + $(OBJS)\widgets_spinbtn.obj \ + $(OBJS)\widgets_static.obj \ + $(OBJS)\widgets_textctrl.obj \ + $(OBJS)\widgets_widgets.obj ### Conditionally set variables: ### @@ -37,7 +50,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +65,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +95,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -152,14 +189,14 @@ $(OBJS)\widgets_widgets.obj: .\widgets.cpp $(CXX) -q -c -P -o$@ $(WIDGETS_CXXFLAGS) $** $(OBJS)\widgets_widgets.res: .\widgets.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\widgets.exe del $(OBJS)\widgets.exe -$(OBJS)\widgets.exe: $(OBJS)\widgets_button.obj $(OBJS)\widgets_combobox.obj $(OBJS)\widgets_gauge.obj $(OBJS)\widgets_listbox.obj $(OBJS)\widgets_notebook.obj $(OBJS)\widgets_radiobox.obj $(OBJS)\widgets_slider.obj $(OBJS)\widgets_spinbtn.obj $(OBJS)\widgets_static.obj $(OBJS)\widgets_textctrl.obj $(OBJS)\widgets_widgets.obj $(OBJS)\widgets_widgets.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\widgets_button.obj $(OBJS)\widgets_combobox.obj $(OBJS)\widgets_gauge.obj $(OBJS)\widgets_listbox.obj $(OBJS)\widgets_notebook.obj $(OBJS)\widgets_radiobox.obj $(OBJS)\widgets_slider.obj $(OBJS)\widgets_spinbtn.obj $(OBJS)\widgets_static.obj $(OBJS)\widgets_textctrl.obj $(OBJS)\widgets_widgets.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\widgets_widgets.res +$(OBJS)\widgets.exe: $(WIDGETS_OBJECTS) $(OBJS)\widgets_widgets.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(WIDGETS_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\widgets_widgets.res | diff --git a/samples/widgets/makefile.gcc b/samples/widgets/makefile.gcc index 9914d2cfe1..3cfcead74c 100644 --- a/samples/widgets/makefile.gcc +++ b/samples/widgets/makefile.gcc @@ -12,8 +12,28 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -WIDGETS_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WIDGETS_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +WIDGETS_OBJECTS = \ + $(OBJS)\widgets_button.o \ + $(OBJS)\widgets_combobox.o \ + $(OBJS)\widgets_gauge.o \ + $(OBJS)\widgets_listbox.o \ + $(OBJS)\widgets_notebook.o \ + $(OBJS)\widgets_radiobox.o \ + $(OBJS)\widgets_slider.o \ + $(OBJS)\widgets_spinbtn.o \ + $(OBJS)\widgets_static.o \ + $(OBJS)\widgets_textctrl.o \ + $(OBJS)\widgets_widgets.o \ + $(OBJS)\widgets_widgets_rc.o ### Conditionally set variables: ### @@ -27,6 +47,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +64,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +101,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +126,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -127,13 +183,13 @@ $(OBJS)\widgets_widgets.o: .\widgets.cpp $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $< $(OBJS)\widgets_widgets_rc.o: .\widgets.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\widgets.exe del $(OBJS)\widgets.exe -$(OBJS)\widgets.exe: $(OBJS)\widgets_button.o $(OBJS)\widgets_combobox.o $(OBJS)\widgets_gauge.o $(OBJS)\widgets_listbox.o $(OBJS)\widgets_notebook.o $(OBJS)\widgets_radiobox.o $(OBJS)\widgets_slider.o $(OBJS)\widgets_spinbtn.o $(OBJS)\widgets_static.o $(OBJS)\widgets_textctrl.o $(OBJS)\widgets_widgets.o $(OBJS)\widgets_widgets_rc.o - $(CXX) -o $@ $(OBJS)\widgets_button.o $(OBJS)\widgets_combobox.o $(OBJS)\widgets_gauge.o $(OBJS)\widgets_listbox.o $(OBJS)\widgets_notebook.o $(OBJS)\widgets_radiobox.o $(OBJS)\widgets_slider.o $(OBJS)\widgets_spinbtn.o $(OBJS)\widgets_static.o $(OBJS)\widgets_textctrl.o $(OBJS)\widgets_widgets.o $(OBJS)\widgets_widgets_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\widgets.exe: $(WIDGETS_OBJECTS) $(OBJS)\widgets_widgets_rc.o + $(CXX) -o $@ $(WIDGETS_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/widgets/makefile.vc b/samples/widgets/makefile.vc index f0da8db2eb..f1611e7a04 100644 --- a/samples/widgets/makefile.vc +++ b/samples/widgets/makefile.vc @@ -12,8 +12,29 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -WIDGETS_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\widgets.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WIDGETS_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \ + /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\widgets.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +WIDGETS_OBJECTS = \ + $(OBJS)\widgets_button.obj \ + $(OBJS)\widgets_combobox.obj \ + $(OBJS)\widgets_gauge.obj \ + $(OBJS)\widgets_listbox.obj \ + $(OBJS)\widgets_notebook.obj \ + $(OBJS)\widgets_radiobox.obj \ + $(OBJS)\widgets_slider.obj \ + $(OBJS)\widgets_spinbtn.obj \ + $(OBJS)\widgets_static.obj \ + $(OBJS)\widgets_textctrl.obj \ + $(OBJS)\widgets_widgets.obj \ + $(OBJS)\widgets_widgets.res ### Conditionally set variables: ### @@ -23,7 +44,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +59,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +147,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -154,14 +252,14 @@ $(OBJS)\widgets_widgets.obj: .\widgets.cpp $(CXX) /c /nologo /TP /Fo$@ $(WIDGETS_CXXFLAGS) $** $(OBJS)\widgets_widgets.res: .\widgets.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\widgets.exe del $(OBJS)\widgets.exe -$(OBJS)\widgets.exe: $(OBJS)\widgets_button.obj $(OBJS)\widgets_combobox.obj $(OBJS)\widgets_gauge.obj $(OBJS)\widgets_listbox.obj $(OBJS)\widgets_notebook.obj $(OBJS)\widgets_radiobox.obj $(OBJS)\widgets_slider.obj $(OBJS)\widgets_spinbtn.obj $(OBJS)\widgets_static.obj $(OBJS)\widgets_textctrl.obj $(OBJS)\widgets_widgets.obj $(OBJS)\widgets_widgets.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\widgets_button.obj $(OBJS)\widgets_combobox.obj $(OBJS)\widgets_gauge.obj $(OBJS)\widgets_listbox.obj $(OBJS)\widgets_notebook.obj $(OBJS)\widgets_radiobox.obj $(OBJS)\widgets_slider.obj $(OBJS)\widgets_spinbtn.obj $(OBJS)\widgets_static.obj $(OBJS)\widgets_textctrl.obj $(OBJS)\widgets_widgets.obj $(OBJS)\widgets_widgets.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\widgets.exe: $(WIDGETS_OBJECTS) $(OBJS)\widgets_widgets.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(WIDGETS_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/widgets/makefile.wat b/samples/widgets/makefile.wat index 37728cb718..d6eba3a303 100644 --- a/samples/widgets/makefile.wat +++ b/samples/widgets/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,28 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -WIDGETS_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WIDGETS_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +WIDGETS_OBJECTS = & + $(OBJS)\widgets_button.obj & + $(OBJS)\widgets_combobox.obj & + $(OBJS)\widgets_gauge.obj & + $(OBJS)\widgets_listbox.obj & + $(OBJS)\widgets_notebook.obj & + $(OBJS)\widgets_radiobox.obj & + $(OBJS)\widgets_slider.obj & + $(OBJS)\widgets_spinbtn.obj & + $(OBJS)\widgets_static.obj & + $(OBJS)\widgets_textctrl.obj & + $(OBJS)\widgets_widgets.obj @@ -156,7 +220,7 @@ $(OBJS)\widgets_widgets.obj : .AUTODEPEND .\widgets.cpp $(CXX) -zq -fo=$^@ $(WIDGETS_CXXFLAGS) $< $(OBJS)\widgets_widgets.res : .AUTODEPEND .\widgets.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -165,13 +229,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\widgets.exe del $(OBJS)\widgets.exe -$(OBJS)\widgets.exe : $(OBJS)\widgets_button.obj $(OBJS)\widgets_combobox.obj $(OBJS)\widgets_gauge.obj $(OBJS)\widgets_listbox.obj $(OBJS)\widgets_notebook.obj $(OBJS)\widgets_radiobox.obj $(OBJS)\widgets_slider.obj $(OBJS)\widgets_spinbtn.obj $(OBJS)\widgets_static.obj $(OBJS)\widgets_textctrl.obj $(OBJS)\widgets_widgets.obj $(OBJS)\widgets_widgets.res +$(OBJS)\widgets.exe : $(WIDGETS_OBJECTS) $(OBJS)\widgets_widgets.res @%create $(OBJS)\widgets.lbc @%append $(OBJS)\widgets.lbc option quiet @%append $(OBJS)\widgets.lbc name $^@ @%append $(OBJS)\widgets.lbc option incremental - @%append $(OBJS)\widgets.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\widgets_button.obj $(OBJS)\widgets_combobox.obj $(OBJS)\widgets_gauge.obj $(OBJS)\widgets_listbox.obj $(OBJS)\widgets_notebook.obj $(OBJS)\widgets_radiobox.obj $(OBJS)\widgets_slider.obj $(OBJS)\widgets_spinbtn.obj $(OBJS)\widgets_static.obj $(OBJS)\widgets_textctrl.obj $(OBJS)\widgets_widgets.obj) do @%append $(OBJS)\widgets.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\widgets.lbc library %i + @%append $(OBJS)\widgets.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(WIDGETS_OBJECTS)) do @%append $(OBJS)\widgets.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\widgets.lbc library %i @%append $(OBJS)\widgets.lbc option resource=$(OBJS)\widgets_widgets.res wlink @$(OBJS)\widgets.lbc diff --git a/samples/wizard/Makefile.in b/samples/wizard/Makefile.in index edb2fa0431..ee795d786b 100644 --- a/samples/wizard/Makefile.in +++ b/samples/wizard/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib WIZARD_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +WIZARD_OBJECTS = \ + wizard_wizard.o \ + $(__wizard___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ WIZARD_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ WIZARD_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ wizard$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o wizard$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: wizard$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f wizard$(EXEEXT) distclean: clean @@ -133,8 +142,8 @@ install-strip: install uninstall: -wizard$(EXEEXT): wizard_wizard.o $(__wizard___win32rc) - $(CXX) -o $@ wizard_wizard.o $(__wizard___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +wizard$(EXEEXT): $(WIZARD_OBJECTS) $(__wizard___win32rc) + $(CXX) -o $@ $(WIZARD_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__wizard___mac_rezcmd) $(__wizard___mac_setfilecmd) diff --git a/samples/wizard/makefile.bcc b/samples/wizard/makefile.bcc index 46dbd84d3b..95169f98b5 100644 --- a/samples/wizard/makefile.bcc +++ b/samples/wizard/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -WIZARD_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +WIZARD_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +WIZARD_OBJECTS = \ + $(OBJS)\wizard_wizard.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\wizard_wizard.obj: .\wizard.cpp $(CXX) -q -c -P -o$@ $(WIZARD_CXXFLAGS) $** $(OBJS)\wizard_wizard.res: .\wizard.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\wizard.exe del $(OBJS)\wizard.exe -$(OBJS)\wizard.exe: $(OBJS)\wizard_wizard.obj $(OBJS)\wizard_wizard.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\wizard_wizard.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\wizard_wizard.res +$(OBJS)\wizard.exe: $(WIZARD_OBJECTS) $(OBJS)\wizard_wizard.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(WIZARD_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\wizard_wizard.res | diff --git a/samples/wizard/makefile.gcc b/samples/wizard/makefile.gcc index 2ed6eac315..067b56a4ca 100644 --- a/samples/wizard/makefile.gcc +++ b/samples/wizard/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -WIZARD_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WIZARD_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +WIZARD_OBJECTS = \ + $(OBJS)\wizard_wizard.o \ + $(OBJS)\wizard_wizard_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\wizard_wizard.o: .\wizard.cpp $(CXX) -c -o $@ $(WIZARD_CXXFLAGS) $< $(OBJS)\wizard_wizard_rc.o: .\wizard.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\wizard.exe del $(OBJS)\wizard.exe -$(OBJS)\wizard.exe: $(OBJS)\wizard_wizard.o $(OBJS)\wizard_wizard_rc.o - $(CXX) -o $@ $(OBJS)\wizard_wizard.o $(OBJS)\wizard_wizard_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\wizard.exe: $(WIZARD_OBJECTS) $(OBJS)\wizard_wizard_rc.o + $(CXX) -o $@ $(WIZARD_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/wizard/makefile.vc b/samples/wizard/makefile.vc index 64f1678cb5..09f40b02a2 100644 --- a/samples/wizard/makefile.vc +++ b/samples/wizard/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -WIZARD_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\wizard.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WIZARD_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) /DWIN32 \ + $(__DEBUGINFO_0) /Fd$(OBJS)\wizard.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +WIZARD_OBJECTS = \ + $(OBJS)\wizard_wizard.obj \ + $(OBJS)\wizard_wizard.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\wizard_wizard.obj: .\wizard.cpp $(CXX) /c /nologo /TP /Fo$@ $(WIZARD_CXXFLAGS) $** $(OBJS)\wizard_wizard.res: .\wizard.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\wizard.exe del $(OBJS)\wizard.exe -$(OBJS)\wizard.exe: $(OBJS)\wizard_wizard.obj $(OBJS)\wizard_wizard.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\wizard_wizard.obj $(OBJS)\wizard_wizard.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\wizard.exe: $(WIZARD_OBJECTS) $(OBJS)\wizard_wizard.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(WIZARD_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/wizard/makefile.wat b/samples/wizard/makefile.wat index 2386d528dc..262fbedba6 100644 --- a/samples/wizard/makefile.wat +++ b/samples/wizard/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -WIZARD_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WIZARD_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +WIZARD_OBJECTS = & + $(OBJS)\wizard_wizard.obj @@ -126,7 +180,7 @@ $(OBJS)\wizard_wizard.obj : .AUTODEPEND .\wizard.cpp $(CXX) -zq -fo=$^@ $(WIZARD_CXXFLAGS) $< $(OBJS)\wizard_wizard.res : .AUTODEPEND .\wizard.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\wizard.exe del $(OBJS)\wizard.exe -$(OBJS)\wizard.exe : $(OBJS)\wizard_wizard.obj $(OBJS)\wizard_wizard.res +$(OBJS)\wizard.exe : $(WIZARD_OBJECTS) $(OBJS)\wizard_wizard.res @%create $(OBJS)\wizard.lbc @%append $(OBJS)\wizard.lbc option quiet @%append $(OBJS)\wizard.lbc name $^@ @%append $(OBJS)\wizard.lbc option incremental - @%append $(OBJS)\wizard.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\wizard_wizard.obj) do @%append $(OBJS)\wizard.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\wizard.lbc library %i + @%append $(OBJS)\wizard.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(WIZARD_OBJECTS)) do @%append $(OBJS)\wizard.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\wizard.lbc library %i @%append $(OBJS)\wizard.lbc option resource=$(OBJS)\wizard_wizard.res wlink @$(OBJS)\wizard.lbc diff --git a/samples/wxtest/Makefile.in b/samples/wxtest/Makefile.in index b8c3464cb9..ff31dda613 100644 --- a/samples/wxtest/Makefile.in +++ b/samples/wxtest/Makefile.in @@ -32,10 +32,14 @@ top_srcdir = @top_srcdir@ ### Variables: ### +LIBDIRNAME = $(top_builddir)lib WXTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ -I$(top_srcdir)/include $(__INC_TIFF_p) $(__INC_JPEG_p) $(__INC_PNG_p) \ $(__INC_ZLIB_p) $(__INC_ODBC_p) $(__INC_REGEX_p) $(__INC_EXPAT_p) \ -I$(srcdir) $(__DLLFLAG_p) $(CXXFLAGS) +WXTEST_OBJECTS = \ + wxtest_wxtest.o \ + $(__wxtest___win32rc) ### Conditionally set variables: ### @@ -44,7 +48,8 @@ WXTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_USE_GUI_0@PORTNAME = base @COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) @COND_TOOLKIT_MAC@WXBASEPORT = _carbon -@COND_BUILD_DEBUG@WXDEBUGFLAG = d +@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d +@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d @COND_UNICODE_1@WXUNICODEFLAG = u @COND_WXUNIV_1@WXUNIVNAME = univ @COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL @@ -80,32 +85,36 @@ WXTEST_CXXFLAGS = $(CPPFLAGS) -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ @COND_WXUSE_ZLIB_BUILTIN@ --include-dir $(top_srcdir)/src/zlib @COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \ @COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p = \ -@COND_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ODBC_BUILTIN@__LIB_ODBC_p = \ @COND_WXUSE_ODBC_BUILTIN@ -lwxodbc$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p = \ -@COND_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = \ @COND_WXUSE_REGEX_BUILTIN@ -lwxregex$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p = \ -@COND_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ +@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX) -@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(RESCOMP) -d \ -@COND_TOOLKIT_MAC@ __DARWIN__ -t APPL -d __WX$(TOOLKIT)__ \ -@COND_TOOLKIT_MAC@ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ -@COND_TOOLKIT_MAC@ $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_ZLIB_p_1) $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) \ -@COND_TOOLKIT_MAC@ $(__INC_EXPAT_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -o \ -@COND_TOOLKIT_MAC@ wxtest$(EXEEXT) Carbon.r \ -@COND_TOOLKIT_MAC@ $(top_builddir)lib/libwx_$(TOOLCHAIN_NAME).0.r +COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \ + __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(top_srcdir)/include \ + $(__INC_TIFF_p_1) $(__INC_JPEG_p_1) $(__INC_PNG_p_1) $(__INC_ZLIB_p_1) \ + $(__INC_ODBC_p_1) $(__INC_REGEX_p_1) $(__INC_EXPAT_p_1) -i $(srcdir) \ + $(__DLLFLAG_p_1) -o wxtest$(EXEEXT) Carbon.r \ + $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).0.r +@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1) @COND_MONOLITHIC_0@__WXLIB_BASE_p = \ @COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_CORE_p = \ -@COND_MONOLITHIC_0@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = \ -@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +COND_MONOLITHIC_0___WXLIB_CORE_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__ @@ -120,7 +129,7 @@ all: wxtest$(EXEEXT) clean: rm -rf ./.deps - rm -f -f ./*.o + rm -f ./*.o rm -f wxtest$(EXEEXT) distclean: clean @@ -133,8 +142,8 @@ install-strip: install uninstall: -wxtest$(EXEEXT): wxtest_wxtest.o $(__wxtest___win32rc) - $(CXX) -o $@ wxtest_wxtest.o $(__wxtest___win32rc) $(LDFLAGS) -L$(top_builddir)lib $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) +wxtest$(EXEEXT): $(WXTEST_OBJECTS) $(__wxtest___win32rc) + $(CXX) -o $@ $(WXTEST_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS) $(EXTRALIBS_GUI) $(__wxtest___mac_rezcmd) $(__wxtest___mac_setfilecmd) diff --git a/samples/wxtest/makefile.bcc b/samples/wxtest/makefile.bcc index 79a103d307..d1724245c7 100644 --- a/samples/wxtest/makefile.bcc +++ b/samples/wxtest/makefile.bcc @@ -20,14 +20,17 @@ BCCDIR = $(MAKEDIR)\.. ### Variables: ### +LIBDIRNAME = \ + .\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) OBJS = \ bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -WXTEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ +WXTEST_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGINFO) \ $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ - $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include \ - -I.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) \ + $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) \ -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib \ -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +WXTEST_OBJECTS = \ + $(OBJS)\wxtest_wxtest.obj ### Conditionally set variables: ### @@ -37,7 +40,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -49,16 +55,28 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG = -v +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG = -v- +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO = -v- !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO = -v- +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO = -v +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p_1 = -d__WXDEBUG__ !endif !if "$(SHARED)" == "1" @@ -67,6 +85,15 @@ __DLLFLAG_p = -DWXUSINGDLL !if "$(SHARED)" == "1" __DLLFLAG_p_1 = -dWXUSINGDLL !endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_2 = -Od !endif @@ -122,14 +149,14 @@ $(OBJS)\wxtest_wxtest.obj: .\wxtest.cpp $(CXX) -q -c -P -o$@ $(WXTEST_CXXFLAGS) $** $(OBJS)\wxtest_wxtest.res: .\wxtest.rc - brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** + brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) -i.\..\..\include -i$(LIBDIRNAME) -i.\..\..\src\tiff -i.\..\..\src\jpeg -i.\..\..\src\png -i.\..\..\src\zlib -i.\..\..\src\regex -i.\..\..\src\expat\lib -i. $(__DLLFLAG_p_1) $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\wxtest.exe del $(OBJS)\wxtest.exe -$(OBJS)\wxtest.exe: $(OBJS)\wxtest_wxtest.obj $(OBJS)\wxtest_wxtest.res - ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -aa @&&| - c0w32.obj $(OBJS)\wxtest_wxtest.obj,$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\wxtest_wxtest.res +$(OBJS)\wxtest.exe: $(WXTEST_OBJECTS) $(OBJS)\wxtest_wxtest.res + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| + c0w32.obj $(WXTEST_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib import32.lib ole2w32.lib cw32mt$(__RUNTIME_LIBS_7).lib,, $(OBJS)\wxtest_wxtest.res | diff --git a/samples/wxtest/makefile.gcc b/samples/wxtest/makefile.gcc index 33f1f7d06c..29e2f48b27 100644 --- a/samples/wxtest/makefile.gcc +++ b/samples/wxtest/makefile.gcc @@ -12,8 +12,18 @@ include ../../build/config.gcc ### Variables: ### -OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -WXTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -I.\..\..\src\tiff -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WXTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \ + -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(LIBDIRNAME) -I.\..\..\src\tiff \ + -I.\..\..\src\jpeg -I.\..\..\src\png -I.\..\..\src\zlib -I.\..\..\src\regex \ + -I.\..\..\src\expat\lib -I. $(__DLLFLAG_p) $(CXXFLAGS) +WXTEST_OBJECTS = \ + $(OBJS)\wxtest_wxtest.o \ + $(OBJS)\wxtest_wxtest_rc.o ### Conditionally set variables: ### @@ -27,6 +37,11 @@ ifeq ($(USE_GUI),1) PORTNAME = msw endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +WXDEBUGFLAG = d +endif +endif +ifeq ($(DEBUG_FLAG),1) WXDEBUGFLAG = d endif ifeq ($(SHARED),1) @@ -39,15 +54,35 @@ ifeq ($(WXUNIV),1) WXUNIVNAME = univ endif ifeq ($(BUILD),debug) -__DEBUGFLAG = -g +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = -g +endif endif ifeq ($(BUILD),release) -__DEBUGFLAG = +ifeq ($(DEBUG_INFO),default) +__DEBUGINFO = +endif +endif +ifeq ($(DEBUG_INFO),0) +__DEBUGINFO = +endif +ifeq ($(DEBUG_INFO),1) +__DEBUGINFO = -g endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_1 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p_1 = --define __WXDEBUG__ endif ifeq ($(SHARED),1) @@ -56,6 +91,15 @@ endif ifeq ($(SHARED),1) __DLLFLAG_p_1 = --define WXUSINGDLL endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG_2 = -O0 endif @@ -72,10 +116,12 @@ ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core endif ifeq ($(MONOLITHIC),1) -__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +__WXLIB_MONO_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @@ -97,13 +143,13 @@ $(OBJS)\wxtest_wxtest.o: .\wxtest.cpp $(CXX) -c -o $@ $(WXTEST_CXXFLAGS) $< $(OBJS)\wxtest_wxtest_rc.o: .\wxtest.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir ./../../lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) + windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) --include-dir ./../../include --include-dir $(LIBDIRNAME) --include-dir ./../../src/tiff --include-dir ./../../src/jpeg --include-dir ./../../src/png --include-dir ./../../src/zlib --include-dir ./../../src/regex --include-dir ./../../src/expat/lib --include-dir . $(__DLLFLAG_p_1) clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\wxtest.exe del $(OBJS)\wxtest.exe -$(OBJS)\wxtest.exe: $(OBJS)\wxtest_wxtest.o $(OBJS)\wxtest_wxtest_rc.o - $(CXX) -o $@ $(OBJS)\wxtest_wxtest.o $(OBJS)\wxtest_wxtest_rc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxtiff$(WXDEBUGFLAG) -lwxjpeg$(WXDEBUGFLAG) -lwxpng$(WXDEBUGFLAG) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +$(OBJS)\wxtest.exe: $(WXTEST_OBJECTS) $(OBJS)\wxtest_wxtest_rc.o + $(CXX) -o $@ $(WXTEST_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 .PHONY: all clean diff --git a/samples/wxtest/makefile.vc b/samples/wxtest/makefile.vc index 5e3779d998..d107ad23cc 100644 --- a/samples/wxtest/makefile.vc +++ b/samples/wxtest/makefile.vc @@ -12,8 +12,19 @@ ### Variables: ### -OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -WXTEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGFLAG_2) /DWIN32 $(__DEBUGFLAG_0) /Fd$(OBJS)\wxtest.pdb $(____DEBUGFLAG_3_p) $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) /I.\..\..\include /I.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /I.\..\..\src\tiff /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +LIBDIRNAME = \ + .\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = \ + vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WXTEST_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) /DWIN32 \ + $(__DEBUGINFO_0) /Fd$(OBJS)\wxtest.pdb $(____DEBUGRUNTIME_2_p) \ + $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(LIBDIRNAME) /I.\..\..\src\tiff \ + /I.\..\..\src\jpeg /I.\..\..\src\png /I.\..\..\src\zlib /I.\..\..\src\regex \ + /I.\..\..\src\expat\lib /I. $(__DLLFLAG_p) /D_WINDOWS $(CXXFLAGS) +WXTEST_OBJECTS = \ + $(OBJS)\wxtest_wxtest.obj \ + $(OBJS)\wxtest_wxtest.res ### Conditionally set variables: ### @@ -23,7 +34,10 @@ PORTNAME = base !if "$(USE_GUI)" == "1" PORTNAME = msw !endif -!if "$(BUILD)" == "debug" +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +WXDEBUGFLAG = d +!endif +!if "$(DEBUG_FLAG)" == "1" WXDEBUGFLAG = d !endif !if "$(SHARED)" == "1" @@ -35,35 +49,77 @@ WXUNICODEFLAG = u !if "$(WXUNIV)" == "1" WXUNIVNAME = univ !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_0 = /Zi +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_0 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_1 = /DEBUG +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_0 = !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_1 = +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_0 = /Zi !endif -!if "$(BUILD)" == "debug" -__DEBUGFLAG_2 = d +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = /DEBUG !endif -!if "$(BUILD)" == "release" -__DEBUGFLAG_2 = +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_1 = !endif -!if "$(BUILD)" == "debug" +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_1 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_1 = /DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = d +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "0" +__DEBUGINFO_3 = +!endif +!if "$(DEBUG_INFO)" == "1" +__DEBUGINFO_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +__DEBUGRUNTIME_3 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +__DEBUGRUNTIME_3 = d +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +__DEBUGRUNTIME_3 = $(__DEBUGINFO_3) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" -__DEBUG_DEFINE_p_1 = /d__WXDEBUG__ +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_1 = /d __WXDEBUG__ !endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif !if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /dWXUSINGDLL +__DLLFLAG_p_1 = /d WXUSINGDLL +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib !endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG_4 = /Od @@ -81,34 +137,66 @@ __RUNTIME_LIBS_7 = T __UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 !endif !if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /dwxUSE_UNICODE=1 +__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=1 !endif !if "$(MONOLITHIC)" == "0" __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif !if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif !if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d__WXUNIVERSAL__ +__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p = /D_DEBUG +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /D_DEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p = /DNDEBUG +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "debug" -____DEBUGFLAG_3_p_1 = /d_DEBUG +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p = /DNDEBUG !endif -!if "$(BUILD)" == "release" -____DEBUGFLAG_3_p_1 = /dNDEBUG +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p = /D_DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "0" +____DEBUGINFO_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_INFO)" == "1" +____DEBUGINFO_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p = /DNDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p = /D_DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p) +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_2_p_1 = /d NDEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_2_p_1 = /d _DEBUG +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_2_p_1 = $(____DEBUGINFO_2_p_1) !endif @@ -124,14 +212,14 @@ $(OBJS)\wxtest_wxtest.obj: .\wxtest.cpp $(CXX) /c /nologo /TP /Fo$@ $(WXTEST_CXXFLAGS) $** $(OBJS)\wxtest_wxtest.res: .\wxtest.rc - rc /fo$@ /dWIN32 $(____DEBUGFLAG_3_p_1) /d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i.\..\..\include /i.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /i.\..\..\src\tiff /i.\..\..\src\jpeg /i.\..\..\src\png /i.\..\..\src\zlib /i.\..\..\src\regex /i.\..\..\src\expat\lib /i. $(__DLLFLAG_p_1) /d_WINDOWS $** + rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_2_p_1) /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) /i .\..\..\include /i $(LIBDIRNAME) /i .\..\..\src\tiff /i .\..\..\src\jpeg /i .\..\..\src\png /i .\..\..\src\zlib /i .\..\..\src\regex /i .\..\..\src\expat\lib /i . $(__DLLFLAG_p_1) /d _WINDOWS $** clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj -if exist $(OBJS)\*.res del $(OBJS)\*.res -if exist $(OBJS)\wxtest.exe del $(OBJS)\wxtest.exe -$(OBJS)\wxtest.exe: $(OBJS)\wxtest_wxtest.obj $(OBJS)\wxtest_wxtest.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:WINDOWS @<< - $(OBJS)\wxtest_wxtest.obj $(OBJS)\wxtest_wxtest.res $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +$(OBJS)\wxtest.exe: $(WXTEST_OBJECTS) $(OBJS)\wxtest_wxtest.res + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + $(WXTEST_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << diff --git a/samples/wxtest/makefile.wat b/samples/wxtest/makefile.wat index 8707c8a925..07067e6ac7 100644 --- a/samples/wxtest/makefile.wat +++ b/samples/wxtest/makefile.wat @@ -36,6 +36,11 @@ PORTNAME = msw !endif WXDEBUGFLAG = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +WXDEBUGFLAG = d +!endif +!endif +!ifeq DEBUG_FLAG 1 WXDEBUGFLAG = d !endif WXDLLFLAG = @@ -50,28 +55,65 @@ WXUNIVNAME = !ifeq WXUNIV 1 WXUNIVNAME = univ !endif -__DEBUGFLAG_0 = +__DEBUGINFO_0 = !ifeq BUILD debug -__DEBUGFLAG_0 = -d2 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d2 +!endif !endif !ifeq BUILD release -__DEBUGFLAG_0 = -d0 +!ifeq DEBUG_INFO default +__DEBUGINFO_0 = -d0 +!endif !endif -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO 0 +__DEBUGINFO_0 = -d0 +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_0 = -d2 +!endif +__DEBUGINFO_1 = !ifeq BUILD debug -__DEBUGFLAG_1 = debug all +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = debug all +!endif !endif !ifeq BUILD release -__DEBUGFLAG_1 = +!ifeq DEBUG_INFO default +__DEBUGINFO_1 = +!endif +!endif +!ifeq DEBUG_INFO 0 +__DEBUGINFO_1 = +!endif +!ifeq DEBUG_INFO 1 +__DEBUGINFO_1 = debug all !endif __DEBUG_DEFINE_p = !ifeq BUILD debug +!ifeq DEBUG_FLAG default +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +!endif +!ifeq DEBUG_FLAG 1 __DEBUG_DEFINE_p = -d__WXDEBUG__ !endif __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif __OPTIMIZEFLAG_2 = !ifeq BUILD debug __OPTIMIZEFLAG_2 = -od @@ -96,11 +138,13 @@ __WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXLIB_CORE_p = !ifeq MONOLITHIC 0 -__WXLIB_CORE_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_core.lib !endif __WXLIB_MONO_p = !ifeq MONOLITHIC 1 -__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib !endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 @@ -109,8 +153,18 @@ __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ ### Variables: ### -OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -WXTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGFLAG_0) $(__OPTIMIZEFLAG_2) -bm $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $(CXXFLAGS) +LIBDIRNAME = & + .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +OBJS = & + wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WXTEST_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm & + $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) & + -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png & + -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. & + $(__DLLFLAG_p) $(CXXFLAGS) +WXTEST_OBJECTS = & + $(OBJS)\wxtest_wxtest.obj @@ -126,7 +180,7 @@ $(OBJS)\wxtest_wxtest.obj : .AUTODEPEND .\wxtest.cpp $(CXX) -zq -fo=$^@ $(WXTEST_CXXFLAGS) $< $(OBJS)\wxtest_wxtest.res : .AUTODEPEND .\wxtest.rc - wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=.\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< + wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(LIBDIRNAME) -i=.\..\..\src\tiff -i=.\..\..\src\jpeg -i=.\..\..\src\png -i=.\..\..\src\zlib -i=.\..\..\src\regex -i=.\..\..\src\expat\lib -i=. $(__DLLFLAG_p) $< clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -135,13 +189,13 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk -if exist $(OBJS)\wxtest.exe del $(OBJS)\wxtest.exe -$(OBJS)\wxtest.exe : $(OBJS)\wxtest_wxtest.obj $(OBJS)\wxtest_wxtest.res +$(OBJS)\wxtest.exe : $(WXTEST_OBJECTS) $(OBJS)\wxtest_wxtest.res @%create $(OBJS)\wxtest.lbc @%append $(OBJS)\wxtest.lbc option quiet @%append $(OBJS)\wxtest.lbc name $^@ @%append $(OBJS)\wxtest.lbc option incremental - @%append $(OBJS)\wxtest.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt_win ref '_WinMain@16' - @for %i in ( $(OBJS)\wxtest_wxtest.obj) do @%append $(OBJS)\wxtest.lbc file %i - @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxtiff$(WXDEBUGFLAG).lib wxjpeg$(WXDEBUGFLAG).lib wxpng$(WXDEBUGFLAG).lib wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\wxtest.lbc library %i + @%append $(OBJS)\wxtest.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @for %i in ($(WXTEST_OBJECTS)) do @%append $(OBJS)\wxtest.lbc file %i + @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib ) do @%append $(OBJS)\wxtest.lbc library %i @%append $(OBJS)\wxtest.lbc option resource=$(OBJS)\wxtest_wxtest.res wlink @$(OBJS)\wxtest.lbc -- 2.45.2