From cecc483e14c2fa839830052ab870de6c53ef3095 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 20 Jul 2003 22:15:32 +0000 Subject: [PATCH] XML library moved to the core git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/utils/wxrc/Makefile.in | 110 +++++++++++++++++++++-- contrib/utils/wxrc/makefile.bcc | 120 +++++++++++++++++++++++++ contrib/utils/wxrc/makefile.gcc | 94 ++++++++++++++++++++ contrib/utils/wxrc/makefile.vc | 126 ++++++++++++++++++++------ contrib/utils/wxrc/makefile.wat | 151 +++++++++++++++++++++++++++++--- contrib/utils/wxrc/wxrc.bkl | 14 +++ contrib/utils/wxrc/wxrc.cpp | 29 +----- utils/wxrc/Makefile.in | 110 +++++++++++++++++++++-- utils/wxrc/makefile.bcc | 120 +++++++++++++++++++++++++ utils/wxrc/makefile.gcc | 94 ++++++++++++++++++++ utils/wxrc/makefile.vc | 126 ++++++++++++++++++++------ utils/wxrc/makefile.wat | 151 +++++++++++++++++++++++++++++--- utils/wxrc/wxrc.bkl | 14 +++ utils/wxrc/wxrc.cpp | 29 +----- 14 files changed, 1142 insertions(+), 146 deletions(-) create mode 100644 contrib/utils/wxrc/makefile.bcc create mode 100644 contrib/utils/wxrc/makefile.gcc create mode 100644 contrib/utils/wxrc/wxrc.bkl create mode 100644 utils/wxrc/makefile.bcc create mode 100644 utils/wxrc/makefile.gcc create mode 100644 utils/wxrc/wxrc.bkl diff --git a/contrib/utils/wxrc/Makefile.in b/contrib/utils/wxrc/Makefile.in index b20802bbb0..23feba7eb2 100644 --- a/contrib/utils/wxrc/Makefile.in +++ b/contrib/utils/wxrc/Makefile.in @@ -1,16 +1,108 @@ -# $Id$ +# ========================================================================= +# This makefile was generated by +# Bakefile 0.1.1 (http://bakefile.sourceforge.net) +# Do not modify, all changes will be overwritten! +# ========================================================================= -top_srcdir = @top_srcdir@/.. -top_builddir = ../../.. -program_dir = contrib/utils/wxrc -PROGRAM=wxrc +@MAKE_SET@ -OBJECTS=wxrc.o +prefix = @prefix@ +exec_prefix = @exec_prefix@ +INSTALL = @INSTALL@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXFLAGS = @CXXFLAGS@ +EXEEXT = @EXEEXT@ +EXTRALIBS = @EXTRALIBS@ +EXTRALIBS_GUI = @EXTRALIBS_GUI@ +HOST_SUFFIX = @HOST_SUFFIX@ +LDFLAGS = @LDFLAGS@ +SETFILE = @SETFILE@ +TOOLKIT = @TOOLKIT@ +TOOLKIT_LOWERCASE = @TOOLKIT_LOWERCASE@ +TOOLKIT_VERSION = @TOOLKIT_VERSION@ +srcdir = @srcdir@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +### Variables: ### -APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_xrc-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ -APPEXTRADEFS=-I$(top_srcdir)/contrib/include +WXRC_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) -I$(srcdir) $(__DLLFLAG_p) \ + -DwxUSE_GUI=0 $(CXXFLAGS) -include $(top_builddir)/src/makeprog.env +### Conditionally set variables: ### +@COND_DEPS_TRACKING_0@CXXC = $(CXX) +@COND_DEPS_TRACKING_1@CXXC = $(top_builddir)./bk-deps $(CXX) +@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_UNICODE_1@WXUNICODEFLAG = u +@COND_WXUNIV_1@WXUNIVNAME = univ +@COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL +@COND_WXUSE_LIBJPEG_BUILTIN@__INC_JPEG_p = -I$(top_srcdir)/src/jpeg +@COND_WXUSE_ODBC_BUILTIN@__INC_ODBC_p = -I$(top_srcdir)/src/odbc +@COND_WXUSE_LIBPNG_BUILTIN@__INC_PNG_p = -I$(top_srcdir)/src/png +@COND_WXUSE_REGEX_BUILTIN@__INC_REGEX_p = -I$(top_srcdir)/src/regex +@COND_WXUSE_LIBTIFF_BUILTIN@__INC_TIFF_p = -I$(top_srcdir)/src/tiff +@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_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_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_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_1@__WXLIB_MONO_p = \ +@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_XML_p = \ +@COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_xml-2.5$(HOST_SUFFIX) +@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ +@COND_PLATFORM_MAC_1@__wxrc___mac_setfilecmd = \ +@COND_PLATFORM_MAC_1@ $(SETFILE) -t APPL wxrc$(EXEEXT) + +### Targets: ### + +all: wxrc$(EXEEXT) + +clean: + rm -rf ./.deps + rm -f -f ./*.o + rm -f wxrc$(EXEEXT) + +distclean: clean + rm -f configure config.cache config.log config.status + rm -f bk-deps shared-ld-sh + +install: all + +install-strip: install + +uninstall: + +wxrc$(EXEEXT): wxrc_wxrc.o + $(CXX) -o $@ wxrc_wxrc.o $(LDFLAGS) -L$(top_builddir)lib $(__WXLIB_XML_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) + + $(__wxrc___mac_setfilecmd) + +wxrc_wxrc.o: $(srcdir)/wxrc.cpp + $(CXXC) -c -o $@ $(WXRC_CXXFLAGS) $< + + +# Include dependency info, if present: +@IF_GNU_MAKE@-include .deps/*.d + +.PHONY: all clean distclean install uninstall diff --git a/contrib/utils/wxrc/makefile.bcc b/contrib/utils/wxrc/makefile.bcc new file mode 100644 index 0000000000..2183b1acee --- /dev/null +++ b/contrib/utils/wxrc/makefile.bcc @@ -0,0 +1,120 @@ +# ========================================================================= +# This makefile was generated by +# Bakefile 0.1.1 (http://bakefile.sourceforge.net) +# Do not modify, all changes will be overwritten! +# ========================================================================= + +!ifndef BCCDIR +BCCDIR = $(MAKEDIR)\.. +!endif + +!include ../../../build/config.bcc + +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- + +!if "$(BCCDIR)" == "\.." +!error Your Borland compiler does not define MAKEDIR. Please define the BCCDIR variable, e.g. BCCDIR=d:\bc4 +!endif + +### Variables: ### + +OBJS = \ + bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WXRC_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ + $(__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) \ + -I.\..\..\..\src\tiff -I.\..\..\..\src\jpeg -I.\..\..\..\src\png \ + -I.\..\..\..\src\zlib -I.\..\..\..\src\regex -I. $(__DLLFLAG_p) \ + -DwxUSE_GUI=0 $(CXXFLAGS) + +### Conditionally set variables: ### + +!if "$(USE_GUI)" == "0" +PORTNAME = base +!endif +!if "$(USE_GUI)" == "1" +PORTNAME = msw +!endif +!if "$(BUILD)" == "debug" +WXDEBUGFLAG = d +!endif +!if "$(SHARED)" == "1" +WXDLLFLAG = dll +!endif +!if "$(UNICODE)" == "1" +WXUNICODEFLAG = u +!endif +!if "$(WXUNIV)" == "1" +WXUNIVNAME = univ +!endif +!if "$(BUILD)" == "debug" +__DEBUGFLAG = -v +!endif +!if "$(BUILD)" == "release" +__DEBUGFLAG = -v- +!endif +!if "$(BUILD)" == "debug" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(SHARED)" == "1" +__DLLFLAG_p = -DWXUSINGDLL +!endif +!if "$(BUILD)" == "debug" +__OPTIMIZEFLAG_2 = -Od +!endif +!if "$(BUILD)" == "release" +__OPTIMIZEFLAG_2 = -O2 +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_6 = -tWR +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_6 = +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_7 = i +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_7 = +!endif +!if "$(UNICODE)" == "1" +__UNICODE_DEFINE_p = -DwxUSE_UNICODE=1 +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +!endif +!if "$(MONOLITHIC)" == "1" +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIB_XML_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_xml.lib +!endif +!if "$(WXUNIV)" == "1" +__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ +!endif + + +all: $(OBJS) +$(OBJS): + -if not exist $(OBJS) mkdir $(OBJS) + +### Targets: ### + +all: $(OBJS)\wxrc.exe + +$(OBJS)\wxrc_wxrc.obj: .\wxrc.cpp + $(CXX) -q -c -P -o$@ $(WXRC_CXXFLAGS) $** + +clean: + -if exist $(OBJS)\*.obj del $(OBJS)\*.obj + -if exist $(OBJS)\*.res del $(OBJS)\*.res + -if exist $(OBJS)\wxrc.exe del $(OBJS)\wxrc.exe + +$(OBJS)\wxrc.exe: $(OBJS)\wxrc_wxrc.obj + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -ap @&&| + c0x32.obj $(OBJS)\wxrc_wxrc.obj,$@,, $(__WXLIB_XML_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,, +| diff --git a/contrib/utils/wxrc/makefile.gcc b/contrib/utils/wxrc/makefile.gcc new file mode 100644 index 0000000000..a676fc80ad --- /dev/null +++ b/contrib/utils/wxrc/makefile.gcc @@ -0,0 +1,94 @@ +# ========================================================================= +# This makefile was generated by +# Bakefile 0.1.1 (http://bakefile.sourceforge.net) +# Do not modify, all changes will be overwritten! +# ========================================================================= + +include ../../../build/config.gcc + +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- + +### Variables: ### + +OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WXRC_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. $(__DLLFLAG_p) -DwxUSE_GUI=0 $(CXXFLAGS) + +### Conditionally set variables: ### + +ifeq ($(GCC_VERSION),2.95) +GCCFLAGS = -fvtable-thunks +endif +ifeq ($(USE_GUI),0) +PORTNAME = base +endif +ifeq ($(USE_GUI),1) +PORTNAME = msw +endif +ifeq ($(BUILD),debug) +WXDEBUGFLAG = d +endif +ifeq ($(SHARED),1) +WXDLLFLAG = dll +endif +ifeq ($(UNICODE),1) +WXUNICODEFLAG = u +endif +ifeq ($(WXUNIV),1) +WXUNIVNAME = univ +endif +ifeq ($(BUILD),debug) +__DEBUGFLAG = -g +endif +ifeq ($(BUILD),release) +__DEBUGFLAG = +endif +ifeq ($(BUILD),debug) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +ifeq ($(SHARED),1) +__DLLFLAG_p = -DWXUSINGDLL +endif +ifeq ($(BUILD),debug) +__OPTIMIZEFLAG_2 = -O0 +endif +ifeq ($(BUILD),release) +__OPTIMIZEFLAG_2 = -O2 +endif +ifeq ($(UNICODE),1) +__UNICODE_DEFINE_p = -DwxUSE_UNICODE=1 +endif +ifeq ($(MONOLITHIC),0) +__WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +endif +ifeq ($(MONOLITHIC),1) +__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +endif +ifeq ($(MONOLITHIC),0) +__WXLIB_XML_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_xml +endif +ifeq ($(WXUNIV),1) +__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ +endif + + +all: $(OBJS) +$(OBJS): + -if not exist $(OBJS) mkdir $(OBJS) + +### Targets: ### + +all: $(OBJS)\wxrc.exe + +$(OBJS)\wxrc_wxrc.o: .\wxrc.cpp + $(CXX) -c -o $@ $(WXRC_CXXFLAGS) $< + +clean: + -if exist $(OBJS)\*.o del $(OBJS)\*.o + -if exist $(OBJS)\wxrc.exe del $(OBJS)\wxrc.exe + +$(OBJS)\wxrc.exe: $(OBJS)\wxrc_wxrc.o + $(CXX) -o $@ $(OBJS)\wxrc_wxrc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) $(__WXLIB_XML_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 + +.PHONY: all clean diff --git a/contrib/utils/wxrc/makefile.vc b/contrib/utils/wxrc/makefile.vc index 7e7ea152de..5032dd1552 100644 --- a/contrib/utils/wxrc/makefile.vc +++ b/contrib/utils/wxrc/makefile.vc @@ -1,36 +1,110 @@ -# -# File: makefile.vc -# Author: Julian Smart -# Created: 2000 -# Updated: -# Copyright: (c) Julian Smart -# -# "%W% %G%" -# -# Makefile : Builds wxrc (XML resource compiler) -# Use FINAL=1 argument to nmake to build final version with no debugging -# info -# Set WXDIR for your system -WXDIR = $(WXWIN) +# ========================================================================= +# This makefile was generated by +# Bakefile 0.1.1 (http://bakefile.sourceforge.net) +# Do not modify, all changes will be overwritten! +# ========================================================================= -PROGRAM=wxrc +!include <../../../build/config.vc> -FINAL=0 +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- -!if "$(FINAL)" == "0" -EXTRALIBS=$(WXDIR)\lib\wxxrcd.lib -!endif +### Variables: ### -!if "$(FINAL)" == "1" -EXTRALIBS=$(WXDIR)\lib\wxxrc.lib -!endif +OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WXRC_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_6)$(__DEBUGFLAG_2) $(__DEBUGFLAG_0) /Fd$(OBJS)\wxrc.pdb $(__OPTIMIZEFLAG_3) /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. $(__DLLFLAG_p) /DwxUSE_GUI=0 $(CXXFLAGS) -!if "$(FINAL)" == "hybrid" -EXTRALIBS=$(WXDIR)\lib\wxxrch.lib +### Conditionally set variables: ### + +!if "$(USE_GUI)" == "0" +PORTNAME = base +!endif +!if "$(USE_GUI)" == "1" +PORTNAME = msw +!endif +!if "$(BUILD)" == "debug" +WXDEBUGFLAG = d +!endif +!if "$(SHARED)" == "1" +WXDLLFLAG = dll +!endif +!if "$(UNICODE)" == "1" +WXUNICODEFLAG = u +!endif +!if "$(WXUNIV)" == "1" +WXUNIVNAME = univ +!endif +!if "$(BUILD)" == "debug" +__DEBUGFLAG_0 = /Zi +!endif +!if "$(BUILD)" == "release" +__DEBUGFLAG_0 = +!endif +!if "$(BUILD)" == "debug" +__DEBUGFLAG_1 = /DEBUG +!endif +!if "$(BUILD)" == "release" +__DEBUGFLAG_1 = +!endif +!if "$(BUILD)" == "debug" +__DEBUGFLAG_2 = d +!endif +!if "$(BUILD)" == "release" +__DEBUGFLAG_2 = !endif +!if "$(BUILD)" == "debug" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(SHARED)" == "1" +__DLLFLAG_p = /DWXUSINGDLL +!endif +!if "$(BUILD)" == "debug" +__OPTIMIZEFLAG_3 = /Od +!endif +!if "$(BUILD)" == "release" +__OPTIMIZEFLAG_3 = /O2 +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_6 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_6 = T +!endif +!if "$(UNICODE)" == "1" +__UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +!endif +!if "$(MONOLITHIC)" == "1" +__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIB_XML_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_xml.lib +!endif +!if "$(WXUNIV)" == "1" +__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ +!endif + + +all: $(OBJS) +$(OBJS): + -if not exist $(OBJS) mkdir $(OBJS) + +### Targets: ### +all: $(OBJS)\wxrc.exe -OBJECTS = $(PROGRAM).obj +$(OBJS)\wxrc_wxrc.obj: .\wxrc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(WXRC_CXXFLAGS) $** -!include $(WXDIR)\src\makeprog.vc +clean: + -if exist $(OBJS)\*.obj del $(OBJS)\*.obj + -if exist $(OBJS)\*.res del $(OBJS)\*.res + -if exist $(OBJS)\wxrc.exe del $(OBJS)\wxrc.exe +$(OBJS)\wxrc.exe: $(OBJS)\wxrc_wxrc.obj + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:CONSOLE @<< + $(OBJS)\wxrc_wxrc.obj $(__WXLIB_XML_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 +<< diff --git a/contrib/utils/wxrc/makefile.wat b/contrib/utils/wxrc/makefile.wat index ac1ff9c3fa..7d6b12d9a6 100644 --- a/contrib/utils/wxrc/makefile.wat +++ b/contrib/utils/wxrc/makefile.wat @@ -1,15 +1,144 @@ -# -# Makefile for WATCOM -# -# +# ========================================================================= +# This makefile was generated by +# Bakefile 0.1.1 (http://bakefile.sourceforge.net) +# Do not modify, all changes will be overwritten! +# ========================================================================= -WXDIR = $(%WXWIN) -EXTRACPPFLAGS = -I$(WXDIR)\contrib\include -THISDIR = $(WXDIR)\contrib\utils\wxrc +!include ../../../build/config.wat -PROGRAM = wxrc -EXTRALIBS = $(WXDIR)\lib\wxxrc_w.lib -OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- -!include $(WXDIR)\src\makeprog.wat +# Speed up compilation a bit: +!ifdef __LOADDLL__ +! loaddll wcc wccd +! loaddll wccaxp wccdaxp +! loaddll wcc386 wccd386 +! loaddll wpp wppdi86 +! loaddll wppaxp wppdaxp +! loaddll wpp386 wppd386 +! loaddll wlink wlink +! loaddll wlib wlibd +!endif +# We need these variables in some bakefile-made rules: +WATCOM_CWD = $+ $(%cdrive):$(%cwd) $- + +### Conditionally set variables: ### + +PORTNAME = +!ifeq USE_GUI 0 +PORTNAME = base +!endif +!ifeq USE_GUI 1 +PORTNAME = msw +!endif +WXDEBUGFLAG = +!ifeq BUILD debug +WXDEBUGFLAG = d +!endif +WXDLLFLAG = +!ifeq SHARED 1 +WXDLLFLAG = dll +!endif +WXUNICODEFLAG = +!ifeq UNICODE 1 +WXUNICODEFLAG = u +!endif +WXUNIVNAME = +!ifeq WXUNIV 1 +WXUNIVNAME = univ +!endif +__DEBUGFLAG_0 = +!ifeq BUILD debug +__DEBUGFLAG_0 = -d2 +!endif +!ifeq BUILD release +__DEBUGFLAG_0 = -d0 +!endif +__DEBUGFLAG_1 = +!ifeq BUILD debug +__DEBUGFLAG_1 = debug all +!endif +!ifeq BUILD release +__DEBUGFLAG_1 = +!endif +__DEBUG_DEFINE_p = +!ifeq BUILD debug +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +__DLLFLAG_p = +!ifeq SHARED 1 +__DLLFLAG_p = -dWXUSINGDLL +!endif +__OPTIMIZEFLAG_2 = +!ifeq BUILD debug +__OPTIMIZEFLAG_2 = -od +!endif +!ifeq BUILD release +__OPTIMIZEFLAG_2 = -ot -ox +!endif +__RUNTIME_LIBS_5 = +!ifeq RUNTIME_LIBS dynamic +__RUNTIME_LIBS_5 = -br +!endif +!ifeq RUNTIME_LIBS static +__RUNTIME_LIBS_5 = +!endif +__UNICODE_DEFINE_p = +!ifeq UNICODE 1 +__UNICODE_DEFINE_p = -dwxUSE_UNICODE=1 +!endif +__WXLIB_BASE_p = +!ifeq MONOLITHIC 0 +__WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +!endif +__WXLIB_MONO_p = +!ifeq MONOLITHIC 1 +__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +!endif +__WXLIB_XML_p = +!ifeq MONOLITHIC 0 +__WXLIB_XML_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_xml.lib +!endif +__WXUNIV_DEFINE_p = +!ifeq WXUNIV 1 +__WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ +!endif + +### Variables: ### + +OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WXRC_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=. $(__DLLFLAG_p) -dwxUSE_GUI=0 $(CXXFLAGS) + + + +all : $(OBJS) +$(OBJS) : + -if not exist $(OBJS) mkdir $(OBJS) + +### Targets: ### + +all : .SYMBOLIC $(OBJS)\wxrc.exe + +$(OBJS)\wxrc_wxrc.obj : .AUTODEPEND .\wxrc.cpp + $(CXX) -zq -fo=$^@ $(WXRC_CXXFLAGS) $< + +clean : .SYMBOLIC + -if exist $(OBJS)\*.obj del $(OBJS)\*.obj + -if exist $(OBJS)\*.res del $(OBJS)\*.res + -if exist $(OBJS)\*.lbc del $(OBJS)\*.lbc + -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk + -if exist $(OBJS)\wxrc.exe del $(OBJS)\wxrc.exe + +$(OBJS)\wxrc.exe : $(OBJS)\wxrc_wxrc.obj + @%create $(OBJS)\wxrc.lbc + @%append $(OBJS)\wxrc.lbc option quiet + @%append $(OBJS)\wxrc.lbc name $^@ + @%append $(OBJS)\wxrc.lbc option incremental + @%append $(OBJS)\wxrc.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt ref 'main_' + @for %i in ( $(OBJS)\wxrc_wxrc.obj) do @%append $(OBJS)\wxrc.lbc file %i + @for %i in ( $(__WXLIB_XML_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)\wxrc.lbc library %i + @%append $(OBJS)\wxrc.lbc + wlink @$(OBJS)\wxrc.lbc diff --git a/contrib/utils/wxrc/wxrc.bkl b/contrib/utils/wxrc/wxrc.bkl new file mode 100644 index 0000000000..2ee5d43f04 --- /dev/null +++ b/contrib/utils/wxrc/wxrc.bkl @@ -0,0 +1,14 @@ + + + + + + + + wxUSE_GUI=0 + wxrc.cpp + xml + base + + + diff --git a/contrib/utils/wxrc/wxrc.cpp b/contrib/utils/wxrc/wxrc.cpp index 349a00321a..bb3fdcc62c 100644 --- a/contrib/utils/wxrc/wxrc.cpp +++ b/contrib/utils/wxrc/wxrc.cpp @@ -27,30 +27,17 @@ #endif #include "wx/cmdline.h" -#include "wx/xrc/xml.h" +#include "wx/xml/xml.h" #include "wx/ffile.h" #include "wx/filename.h" #include "wx/wfstream.h" - - - -/* -#if wxUSE_GUI -#error "You must compile the resource compiler with wxBase!" -#endif -*/ - -class XmlResApp : public wxApp +class XmlResApp : public wxAppConsole { public: -#if wxUSE_GUI - bool OnInit(); -#else virtual int OnRun(); -#endif private: @@ -77,11 +64,7 @@ private: IMPLEMENT_APP(XmlResApp) -#if wxUSE_GUI -bool XmlResApp::OnInit() -#else int XmlResApp::OnRun() -#endif { static const wxCmdLineEntryDesc cmdLineDesc[] = { @@ -118,19 +101,11 @@ int XmlResApp::OnRun() OutputGettext(); else CompileRes(); -#if wxUSE_GUI - return FALSE; -#else return retCode; -#endif break; default: -#if wxUSE_GUI - return FALSE; -#else return 1; -#endif break; } } diff --git a/utils/wxrc/Makefile.in b/utils/wxrc/Makefile.in index b20802bbb0..23feba7eb2 100644 --- a/utils/wxrc/Makefile.in +++ b/utils/wxrc/Makefile.in @@ -1,16 +1,108 @@ -# $Id$ +# ========================================================================= +# This makefile was generated by +# Bakefile 0.1.1 (http://bakefile.sourceforge.net) +# Do not modify, all changes will be overwritten! +# ========================================================================= -top_srcdir = @top_srcdir@/.. -top_builddir = ../../.. -program_dir = contrib/utils/wxrc -PROGRAM=wxrc +@MAKE_SET@ -OBJECTS=wxrc.o +prefix = @prefix@ +exec_prefix = @exec_prefix@ +INSTALL = @INSTALL@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXFLAGS = @CXXFLAGS@ +EXEEXT = @EXEEXT@ +EXTRALIBS = @EXTRALIBS@ +EXTRALIBS_GUI = @EXTRALIBS_GUI@ +HOST_SUFFIX = @HOST_SUFFIX@ +LDFLAGS = @LDFLAGS@ +SETFILE = @SETFILE@ +TOOLKIT = @TOOLKIT@ +TOOLKIT_LOWERCASE = @TOOLKIT_LOWERCASE@ +TOOLKIT_VERSION = @TOOLKIT_VERSION@ +srcdir = @srcdir@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +### Variables: ### -APPEXTRALIBS=$(top_builddir)/lib/lib@WX_LIBRARY_BASENAME@_xrc-@WX_RELEASE@.@WX_TARGET_LIBRARY_TYPE@ -APPEXTRADEFS=-I$(top_srcdir)/contrib/include +WXRC_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) -I$(srcdir) $(__DLLFLAG_p) \ + -DwxUSE_GUI=0 $(CXXFLAGS) -include $(top_builddir)/src/makeprog.env +### Conditionally set variables: ### +@COND_DEPS_TRACKING_0@CXXC = $(CXX) +@COND_DEPS_TRACKING_1@CXXC = $(top_builddir)./bk-deps $(CXX) +@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_UNICODE_1@WXUNICODEFLAG = u +@COND_WXUNIV_1@WXUNIVNAME = univ +@COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL +@COND_WXUSE_LIBJPEG_BUILTIN@__INC_JPEG_p = -I$(top_srcdir)/src/jpeg +@COND_WXUSE_ODBC_BUILTIN@__INC_ODBC_p = -I$(top_srcdir)/src/odbc +@COND_WXUSE_LIBPNG_BUILTIN@__INC_PNG_p = -I$(top_srcdir)/src/png +@COND_WXUSE_REGEX_BUILTIN@__INC_REGEX_p = -I$(top_srcdir)/src/regex +@COND_WXUSE_LIBTIFF_BUILTIN@__INC_TIFF_p = -I$(top_srcdir)/src/tiff +@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_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_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_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_1@__WXLIB_MONO_p = \ +@COND_MONOLITHIC_1@ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)-2.5$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_XML_p = \ +@COND_MONOLITHIC_0@ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_xml-2.5$(HOST_SUFFIX) +@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ +@COND_PLATFORM_MAC_1@__wxrc___mac_setfilecmd = \ +@COND_PLATFORM_MAC_1@ $(SETFILE) -t APPL wxrc$(EXEEXT) + +### Targets: ### + +all: wxrc$(EXEEXT) + +clean: + rm -rf ./.deps + rm -f -f ./*.o + rm -f wxrc$(EXEEXT) + +distclean: clean + rm -f configure config.cache config.log config.status + rm -f bk-deps shared-ld-sh + +install: all + +install-strip: install + +uninstall: + +wxrc$(EXEEXT): wxrc_wxrc.o + $(CXX) -o $@ wxrc_wxrc.o $(LDFLAGS) -L$(top_builddir)lib $(__WXLIB_XML_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) + + $(__wxrc___mac_setfilecmd) + +wxrc_wxrc.o: $(srcdir)/wxrc.cpp + $(CXXC) -c -o $@ $(WXRC_CXXFLAGS) $< + + +# Include dependency info, if present: +@IF_GNU_MAKE@-include .deps/*.d + +.PHONY: all clean distclean install uninstall diff --git a/utils/wxrc/makefile.bcc b/utils/wxrc/makefile.bcc new file mode 100644 index 0000000000..2183b1acee --- /dev/null +++ b/utils/wxrc/makefile.bcc @@ -0,0 +1,120 @@ +# ========================================================================= +# This makefile was generated by +# Bakefile 0.1.1 (http://bakefile.sourceforge.net) +# Do not modify, all changes will be overwritten! +# ========================================================================= + +!ifndef BCCDIR +BCCDIR = $(MAKEDIR)\.. +!endif + +!include ../../../build/config.bcc + +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- + +!if "$(BCCDIR)" == "\.." +!error Your Borland compiler does not define MAKEDIR. Please define the BCCDIR variable, e.g. BCCDIR=d:\bc4 +!endif + +### Variables: ### + +OBJS = \ + bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WXRC_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) $(__DEBUGFLAG) \ + $(__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) \ + -I.\..\..\..\src\tiff -I.\..\..\..\src\jpeg -I.\..\..\..\src\png \ + -I.\..\..\..\src\zlib -I.\..\..\..\src\regex -I. $(__DLLFLAG_p) \ + -DwxUSE_GUI=0 $(CXXFLAGS) + +### Conditionally set variables: ### + +!if "$(USE_GUI)" == "0" +PORTNAME = base +!endif +!if "$(USE_GUI)" == "1" +PORTNAME = msw +!endif +!if "$(BUILD)" == "debug" +WXDEBUGFLAG = d +!endif +!if "$(SHARED)" == "1" +WXDLLFLAG = dll +!endif +!if "$(UNICODE)" == "1" +WXUNICODEFLAG = u +!endif +!if "$(WXUNIV)" == "1" +WXUNIVNAME = univ +!endif +!if "$(BUILD)" == "debug" +__DEBUGFLAG = -v +!endif +!if "$(BUILD)" == "release" +__DEBUGFLAG = -v- +!endif +!if "$(BUILD)" == "debug" +__DEBUG_DEFINE_p = -D__WXDEBUG__ +!endif +!if "$(SHARED)" == "1" +__DLLFLAG_p = -DWXUSINGDLL +!endif +!if "$(BUILD)" == "debug" +__OPTIMIZEFLAG_2 = -Od +!endif +!if "$(BUILD)" == "release" +__OPTIMIZEFLAG_2 = -O2 +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_6 = -tWR +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_6 = +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_7 = i +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_7 = +!endif +!if "$(UNICODE)" == "1" +__UNICODE_DEFINE_p = -DwxUSE_UNICODE=1 +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +!endif +!if "$(MONOLITHIC)" == "1" +__WXLIB_MONO_p = \ + wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIB_XML_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_xml.lib +!endif +!if "$(WXUNIV)" == "1" +__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ +!endif + + +all: $(OBJS) +$(OBJS): + -if not exist $(OBJS) mkdir $(OBJS) + +### Targets: ### + +all: $(OBJS)\wxrc.exe + +$(OBJS)\wxrc_wxrc.obj: .\wxrc.cpp + $(CXX) -q -c -P -o$@ $(WXRC_CXXFLAGS) $** + +clean: + -if exist $(OBJS)\*.obj del $(OBJS)\*.obj + -if exist $(OBJS)\*.res del $(OBJS)\*.res + -if exist $(OBJS)\wxrc.exe del $(OBJS)\wxrc.exe + +$(OBJS)\wxrc.exe: $(OBJS)\wxrc_wxrc.obj + ilink32 -Tpe -q $(LDFLAGS) $(__DEBUGFLAG) -L.\..\..\..\lib\bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -ap @&&| + c0x32.obj $(OBJS)\wxrc_wxrc.obj,$@,, $(__WXLIB_XML_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,, +| diff --git a/utils/wxrc/makefile.gcc b/utils/wxrc/makefile.gcc new file mode 100644 index 0000000000..a676fc80ad --- /dev/null +++ b/utils/wxrc/makefile.gcc @@ -0,0 +1,94 @@ +# ========================================================================= +# This makefile was generated by +# Bakefile 0.1.1 (http://bakefile.sourceforge.net) +# Do not modify, all changes will be overwritten! +# ========================================================================= + +include ../../../build/config.gcc + +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- + +### Variables: ### + +OBJS = gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WXRC_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. $(__DLLFLAG_p) -DwxUSE_GUI=0 $(CXXFLAGS) + +### Conditionally set variables: ### + +ifeq ($(GCC_VERSION),2.95) +GCCFLAGS = -fvtable-thunks +endif +ifeq ($(USE_GUI),0) +PORTNAME = base +endif +ifeq ($(USE_GUI),1) +PORTNAME = msw +endif +ifeq ($(BUILD),debug) +WXDEBUGFLAG = d +endif +ifeq ($(SHARED),1) +WXDLLFLAG = dll +endif +ifeq ($(UNICODE),1) +WXUNICODEFLAG = u +endif +ifeq ($(WXUNIV),1) +WXUNIVNAME = univ +endif +ifeq ($(BUILD),debug) +__DEBUGFLAG = -g +endif +ifeq ($(BUILD),release) +__DEBUGFLAG = +endif +ifeq ($(BUILD),debug) +__DEBUG_DEFINE_p = -D__WXDEBUG__ +endif +ifeq ($(SHARED),1) +__DLLFLAG_p = -DWXUSINGDLL +endif +ifeq ($(BUILD),debug) +__OPTIMIZEFLAG_2 = -O0 +endif +ifeq ($(BUILD),release) +__OPTIMIZEFLAG_2 = -O2 +endif +ifeq ($(UNICODE),1) +__UNICODE_DEFINE_p = -DwxUSE_UNICODE=1 +endif +ifeq ($(MONOLITHIC),0) +__WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +endif +ifeq ($(MONOLITHIC),1) +__WXLIB_MONO_p = -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG) +endif +ifeq ($(MONOLITHIC),0) +__WXLIB_XML_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_xml +endif +ifeq ($(WXUNIV),1) +__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ +endif + + +all: $(OBJS) +$(OBJS): + -if not exist $(OBJS) mkdir $(OBJS) + +### Targets: ### + +all: $(OBJS)\wxrc.exe + +$(OBJS)\wxrc_wxrc.o: .\wxrc.cpp + $(CXX) -c -o $@ $(WXRC_CXXFLAGS) $< + +clean: + -if exist $(OBJS)\*.o del $(OBJS)\*.o + -if exist $(OBJS)\wxrc.exe del $(OBJS)\wxrc.exe + +$(OBJS)\wxrc.exe: $(OBJS)\wxrc_wxrc.o + $(CXX) -o $@ $(OBJS)\wxrc_wxrc.o $(LDFLAGS) $(__DEBUGFLAG) -mthreads -L.\..\..\..\lib\gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) $(__WXLIB_XML_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 + +.PHONY: all clean diff --git a/utils/wxrc/makefile.vc b/utils/wxrc/makefile.vc index 7e7ea152de..5032dd1552 100644 --- a/utils/wxrc/makefile.vc +++ b/utils/wxrc/makefile.vc @@ -1,36 +1,110 @@ -# -# File: makefile.vc -# Author: Julian Smart -# Created: 2000 -# Updated: -# Copyright: (c) Julian Smart -# -# "%W% %G%" -# -# Makefile : Builds wxrc (XML resource compiler) -# Use FINAL=1 argument to nmake to build final version with no debugging -# info -# Set WXDIR for your system -WXDIR = $(WXWIN) +# ========================================================================= +# This makefile was generated by +# Bakefile 0.1.1 (http://bakefile.sourceforge.net) +# Do not modify, all changes will be overwritten! +# ========================================================================= -PROGRAM=wxrc +!include <../../../build/config.vc> -FINAL=0 +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- -!if "$(FINAL)" == "0" -EXTRALIBS=$(WXDIR)\lib\wxxrcd.lib -!endif +### Variables: ### -!if "$(FINAL)" == "1" -EXTRALIBS=$(WXDIR)\lib\wxxrc.lib -!endif +OBJS = vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WXRC_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_6)$(__DEBUGFLAG_2) $(__DEBUGFLAG_0) /Fd$(OBJS)\wxrc.pdb $(__OPTIMIZEFLAG_3) /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. $(__DLLFLAG_p) /DwxUSE_GUI=0 $(CXXFLAGS) -!if "$(FINAL)" == "hybrid" -EXTRALIBS=$(WXDIR)\lib\wxxrch.lib +### Conditionally set variables: ### + +!if "$(USE_GUI)" == "0" +PORTNAME = base +!endif +!if "$(USE_GUI)" == "1" +PORTNAME = msw +!endif +!if "$(BUILD)" == "debug" +WXDEBUGFLAG = d +!endif +!if "$(SHARED)" == "1" +WXDLLFLAG = dll +!endif +!if "$(UNICODE)" == "1" +WXUNICODEFLAG = u +!endif +!if "$(WXUNIV)" == "1" +WXUNIVNAME = univ +!endif +!if "$(BUILD)" == "debug" +__DEBUGFLAG_0 = /Zi +!endif +!if "$(BUILD)" == "release" +__DEBUGFLAG_0 = +!endif +!if "$(BUILD)" == "debug" +__DEBUGFLAG_1 = /DEBUG +!endif +!if "$(BUILD)" == "release" +__DEBUGFLAG_1 = +!endif +!if "$(BUILD)" == "debug" +__DEBUGFLAG_2 = d +!endif +!if "$(BUILD)" == "release" +__DEBUGFLAG_2 = !endif +!if "$(BUILD)" == "debug" +__DEBUG_DEFINE_p = /D__WXDEBUG__ +!endif +!if "$(SHARED)" == "1" +__DLLFLAG_p = /DWXUSINGDLL +!endif +!if "$(BUILD)" == "debug" +__OPTIMIZEFLAG_3 = /Od +!endif +!if "$(BUILD)" == "release" +__OPTIMIZEFLAG_3 = /O2 +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_6 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_6 = T +!endif +!if "$(UNICODE)" == "1" +__UNICODE_DEFINE_p = /DwxUSE_UNICODE=1 +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +!endif +!if "$(MONOLITHIC)" == "1" +__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIB_XML_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_xml.lib +!endif +!if "$(WXUNIV)" == "1" +__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ +!endif + + +all: $(OBJS) +$(OBJS): + -if not exist $(OBJS) mkdir $(OBJS) + +### Targets: ### +all: $(OBJS)\wxrc.exe -OBJECTS = $(PROGRAM).obj +$(OBJS)\wxrc_wxrc.obj: .\wxrc.cpp + $(CXX) /c /nologo /TP /Fo$@ $(WXRC_CXXFLAGS) $** -!include $(WXDIR)\src\makeprog.vc +clean: + -if exist $(OBJS)\*.obj del $(OBJS)\*.obj + -if exist $(OBJS)\*.res del $(OBJS)\*.res + -if exist $(OBJS)\wxrc.exe del $(OBJS)\wxrc.exe +$(OBJS)\wxrc.exe: $(OBJS)\wxrc_wxrc.obj + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGFLAG_1) /LIBPATH:.\..\..\..\lib\vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) /SUBSYSTEM:CONSOLE @<< + $(OBJS)\wxrc_wxrc.obj $(__WXLIB_XML_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 +<< diff --git a/utils/wxrc/makefile.wat b/utils/wxrc/makefile.wat index ac1ff9c3fa..7d6b12d9a6 100644 --- a/utils/wxrc/makefile.wat +++ b/utils/wxrc/makefile.wat @@ -1,15 +1,144 @@ -# -# Makefile for WATCOM -# -# +# ========================================================================= +# This makefile was generated by +# Bakefile 0.1.1 (http://bakefile.sourceforge.net) +# Do not modify, all changes will be overwritten! +# ========================================================================= -WXDIR = $(%WXWIN) -EXTRACPPFLAGS = -I$(WXDIR)\contrib\include -THISDIR = $(WXDIR)\contrib\utils\wxrc +!include ../../../build/config.wat -PROGRAM = wxrc -EXTRALIBS = $(WXDIR)\lib\wxxrc_w.lib -OBJECTS = $(OUTPUTDIR)\$(PROGRAM).obj +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- -!include $(WXDIR)\src\makeprog.wat +# Speed up compilation a bit: +!ifdef __LOADDLL__ +! loaddll wcc wccd +! loaddll wccaxp wccdaxp +! loaddll wcc386 wccd386 +! loaddll wpp wppdi86 +! loaddll wppaxp wppdaxp +! loaddll wpp386 wppd386 +! loaddll wlink wlink +! loaddll wlib wlibd +!endif +# We need these variables in some bakefile-made rules: +WATCOM_CWD = $+ $(%cdrive):$(%cwd) $- + +### Conditionally set variables: ### + +PORTNAME = +!ifeq USE_GUI 0 +PORTNAME = base +!endif +!ifeq USE_GUI 1 +PORTNAME = msw +!endif +WXDEBUGFLAG = +!ifeq BUILD debug +WXDEBUGFLAG = d +!endif +WXDLLFLAG = +!ifeq SHARED 1 +WXDLLFLAG = dll +!endif +WXUNICODEFLAG = +!ifeq UNICODE 1 +WXUNICODEFLAG = u +!endif +WXUNIVNAME = +!ifeq WXUNIV 1 +WXUNIVNAME = univ +!endif +__DEBUGFLAG_0 = +!ifeq BUILD debug +__DEBUGFLAG_0 = -d2 +!endif +!ifeq BUILD release +__DEBUGFLAG_0 = -d0 +!endif +__DEBUGFLAG_1 = +!ifeq BUILD debug +__DEBUGFLAG_1 = debug all +!endif +!ifeq BUILD release +__DEBUGFLAG_1 = +!endif +__DEBUG_DEFINE_p = +!ifeq BUILD debug +__DEBUG_DEFINE_p = -d__WXDEBUG__ +!endif +__DLLFLAG_p = +!ifeq SHARED 1 +__DLLFLAG_p = -dWXUSINGDLL +!endif +__OPTIMIZEFLAG_2 = +!ifeq BUILD debug +__OPTIMIZEFLAG_2 = -od +!endif +!ifeq BUILD release +__OPTIMIZEFLAG_2 = -ot -ox +!endif +__RUNTIME_LIBS_5 = +!ifeq RUNTIME_LIBS dynamic +__RUNTIME_LIBS_5 = -br +!endif +!ifeq RUNTIME_LIBS static +__RUNTIME_LIBS_5 = +!endif +__UNICODE_DEFINE_p = +!ifeq UNICODE 1 +__UNICODE_DEFINE_p = -dwxUSE_UNICODE=1 +!endif +__WXLIB_BASE_p = +!ifeq MONOLITHIC 0 +__WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +!endif +__WXLIB_MONO_p = +!ifeq MONOLITHIC 1 +__WXLIB_MONO_p = wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib +!endif +__WXLIB_XML_p = +!ifeq MONOLITHIC 0 +__WXLIB_XML_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG)_xml.lib +!endif +__WXUNIV_DEFINE_p = +!ifeq WXUNIV 1 +__WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ +!endif + +### Variables: ### + +OBJS = wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +WXRC_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=. $(__DLLFLAG_p) -dwxUSE_GUI=0 $(CXXFLAGS) + + + +all : $(OBJS) +$(OBJS) : + -if not exist $(OBJS) mkdir $(OBJS) + +### Targets: ### + +all : .SYMBOLIC $(OBJS)\wxrc.exe + +$(OBJS)\wxrc_wxrc.obj : .AUTODEPEND .\wxrc.cpp + $(CXX) -zq -fo=$^@ $(WXRC_CXXFLAGS) $< + +clean : .SYMBOLIC + -if exist $(OBJS)\*.obj del $(OBJS)\*.obj + -if exist $(OBJS)\*.res del $(OBJS)\*.res + -if exist $(OBJS)\*.lbc del $(OBJS)\*.lbc + -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk + -if exist $(OBJS)\wxrc.exe del $(OBJS)\wxrc.exe + +$(OBJS)\wxrc.exe : $(OBJS)\wxrc_wxrc.obj + @%create $(OBJS)\wxrc.lbc + @%append $(OBJS)\wxrc.lbc option quiet + @%append $(OBJS)\wxrc.lbc name $^@ + @%append $(OBJS)\wxrc.lbc option incremental + @%append $(OBJS)\wxrc.lbc $(LDFLAGS) $(__DEBUGFLAG_1) libpath .\..\..\..\lib\wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) system nt ref 'main_' + @for %i in ( $(OBJS)\wxrc_wxrc.obj) do @%append $(OBJS)\wxrc.lbc file %i + @for %i in ( $(__WXLIB_XML_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)\wxrc.lbc library %i + @%append $(OBJS)\wxrc.lbc + wlink @$(OBJS)\wxrc.lbc diff --git a/utils/wxrc/wxrc.bkl b/utils/wxrc/wxrc.bkl new file mode 100644 index 0000000000..2ee5d43f04 --- /dev/null +++ b/utils/wxrc/wxrc.bkl @@ -0,0 +1,14 @@ + + + + + + + + wxUSE_GUI=0 + wxrc.cpp + xml + base + + + diff --git a/utils/wxrc/wxrc.cpp b/utils/wxrc/wxrc.cpp index 349a00321a..bb3fdcc62c 100644 --- a/utils/wxrc/wxrc.cpp +++ b/utils/wxrc/wxrc.cpp @@ -27,30 +27,17 @@ #endif #include "wx/cmdline.h" -#include "wx/xrc/xml.h" +#include "wx/xml/xml.h" #include "wx/ffile.h" #include "wx/filename.h" #include "wx/wfstream.h" - - - -/* -#if wxUSE_GUI -#error "You must compile the resource compiler with wxBase!" -#endif -*/ - -class XmlResApp : public wxApp +class XmlResApp : public wxAppConsole { public: -#if wxUSE_GUI - bool OnInit(); -#else virtual int OnRun(); -#endif private: @@ -77,11 +64,7 @@ private: IMPLEMENT_APP(XmlResApp) -#if wxUSE_GUI -bool XmlResApp::OnInit() -#else int XmlResApp::OnRun() -#endif { static const wxCmdLineEntryDesc cmdLineDesc[] = { @@ -118,19 +101,11 @@ int XmlResApp::OnRun() OutputGettext(); else CompileRes(); -#if wxUSE_GUI - return FALSE; -#else return retCode; -#endif break; default: -#if wxUSE_GUI - return FALSE; -#else return 1; -#endif break; } } -- 2.45.2