X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3beb50e570f1b4f7a97c767677451ffc558fa22f..31f125ed00f3391ba78371c7aa0b4919427050d8:/tests/makefile.gcc diff --git a/tests/makefile.gcc b/tests/makefile.gcc index f0534bb90c..7099a2f6fe 100644 --- a/tests/makefile.gcc +++ b/tests/makefile.gcc @@ -16,17 +16,19 @@ CPPDEPS = -MT$@ -MF$@.d -MD -MP WX_RELEASE_NODOT = 29 COMPILER_PREFIX = gcc OBJS = \ - $(COMPILER_PREFIX)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) -LIBDIRNAME = .\..\lib\$(COMPILER_PREFIX)_$(LIBTYPE_SUFFIX)$(CFG) + $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG) +LIBDIRNAME = \ + .\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG) SETUPHDIR = \ $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG) TEST_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \ - -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ + -DHAVE_W32API_H -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \ $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ -I$(SETUPHDIR) -I.\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -I. \ $(__DLLFLAG_p) -DwxUSE_GUI=0 $(CPPUNIT_CFLAGS) $(__RTTIFLAG) \ - $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) + $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CXXFLAGS_GTK_WINDOWS_GCC) \ + $(CPPFLAGS) $(CXXFLAGS) TEST_OBJECTS = \ $(OBJS)\test_dummy.o \ $(OBJS)\test_test.o \ @@ -113,13 +115,13 @@ TEST_OBJECTS = \ $(OBJS)\test_xlocale.o \ $(OBJS)\test_xmltest.o TEST_GUI_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ - $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \ $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \ $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I.\..\include \ $(____CAIRO_INCLUDEDIR_FILENAMES) -W -Wall -I. $(__DLLFLAG_p) -I.\..\samples \ -DNOPCH $(CPPUNIT_CFLAGS) $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ - -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) + -Wno-ctor-dtor-privacy $(CXXFLAGS_GTK_WINDOWS_GCC) $(CPPFLAGS) $(CXXFLAGS) TEST_GUI_OBJECTS = \ $(OBJS)\test_gui_sample_rc.o \ $(OBJS)\test_gui_dummy.o \ @@ -129,6 +131,7 @@ TEST_GUI_OBJECTS = \ $(OBJS)\test_gui_rect.o \ $(OBJS)\test_gui_size.o \ $(OBJS)\test_gui_point.o \ + $(OBJS)\test_gui_region.o \ $(OBJS)\test_gui_bitmap.o \ $(OBJS)\test_gui_colour.o \ $(OBJS)\test_gui_ellipsization.o \ @@ -168,6 +171,7 @@ TEST_GUI_OBJECTS = \ $(OBJS)\test_gui_radiobuttontest.o \ $(OBJS)\test_gui_rearrangelisttest.o \ $(OBJS)\test_gui_richtextctrltest.o \ + $(OBJS)\test_gui_searchctrltest.o \ $(OBJS)\test_gui_slidertest.o \ $(OBJS)\test_gui_spinctrldbltest.o \ $(OBJS)\test_gui_spinctrltest.o \ @@ -177,9 +181,11 @@ TEST_GUI_OBJECTS = \ $(OBJS)\test_gui_toolbooktest.o \ $(OBJS)\test_gui_treebooktest.o \ $(OBJS)\test_gui_treectrltest.o \ + $(OBJS)\test_gui_treelistctrltest.o \ $(OBJS)\test_gui_virtlistctrltest.o \ $(OBJS)\test_gui_webtest.o \ $(OBJS)\test_gui_windowtest.o \ + $(OBJS)\test_gui_dialogtest.o \ $(OBJS)\test_gui_clone.o \ $(OBJS)\test_gui_propagation.o \ $(OBJS)\test_gui_keyboard.o \ @@ -205,6 +211,12 @@ TEST_GUI_OBJECTS = \ ### Conditionally set variables: ### +ifeq ($(TOOLKIT),GTK) +WIN32_TOOLKIT_LOWERCASE = gtk +endif +ifeq ($(TOOLKIT),MSW) +WIN32_TOOLKIT_LOWERCASE = msw +endif ifeq ($(GCC_VERSION),2.95) GCCFLAGS = -fvtable-thunks endif @@ -212,7 +224,13 @@ ifeq ($(USE_GUI),0) PORTNAME = base endif ifeq ($(USE_GUI),1) -PORTNAME = msw +PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION) +endif +ifeq ($(TOOLKIT),MAC) +WXBASEPORT = _carbon +endif +ifeq ($(OFFICIAL_BUILD),1) +COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD endif ifeq ($(BUILD),debug) WXDEBUGFLAG = d @@ -236,8 +254,18 @@ ifeq ($(MONOLITHIC),0) EXTRALIBS_FOR_BASE = endif ifeq ($(MONOLITHIC),1) -EXTRALIBS_FOR_BASE = -endif +EXTRALIBS_FOR_BASE = +endif +ifeq ($(TOOLKIT),GTK) +CXXFLAGS_GTK_WINDOWS_GCC = -mms-bitfields +endif +ifeq ($(TOOLKIT),GTK) +ifeq ($(TOOLKIT_VERSION),2) +LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib \ + gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib \ + glib-2.0.lib +endif +endif ifeq ($(MONOLITHIC),1) __LIB_PNG_IF_MONO_p = $(__LIB_PNG_p) endif @@ -278,8 +306,10 @@ ifeq ($(SHARED),1) __DLLFLAG_p_3 = --define WXUSINGDLL endif ifeq ($(MONOLITHIC),0) -__WXLIB_WEB_p = \ - -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_web +ifeq ($(USE_WEBVIEW),1) +__WXLIB_WEBVIEW_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview +endif endif ifeq ($(MONOLITHIC),0) __WXLIB_RICHTEXT_p = \ @@ -366,15 +396,15 @@ __DLLFLAG_p = -DWXUSINGDLL endif ifeq ($(MONOLITHIC),0) __WXLIB_NET_p = \ - -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net + -lwxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net endif ifeq ($(MONOLITHIC),0) __WXLIB_XML_p = \ - -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml + -lwxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml endif ifeq ($(MONOLITHIC),0) __WXLIB_BASE_p = \ - -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR) + -lwxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR) endif ifeq ($(MONOLITHIC),1) __WXLIB_MONO_p = \ @@ -422,7 +452,7 @@ $(OBJS): ### Targets: ### -all: $(OBJS)\test.exe $(__test_gui___depname) data fr +all: $(OBJS)\test.exe $(__test_gui___depname) data data-images fr clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o @@ -435,13 +465,17 @@ $(OBJS)\test.exe: $(TEST_OBJECTS) ifeq ($(USE_GUI),1) $(OBJS)\test_gui.exe: $(TEST_GUI_OBJECTS) $(OBJS)\test_gui_sample_rc.o - $(CXX) -o $@ $(TEST_GUI_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(CPPUNIT_LIBS) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__WXLIB_WEB_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet + $(CXX) -o $@ $(TEST_GUI_OBJECTS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(CPPUNIT_LIBS) $(____CAIRO_LIBDIR_FILENAMES) $(LDFLAGS) $(__WXLIB_WEBVIEW_p) $(__WXLIB_RICHTEXT_p) $(__WXLIB_MEDIA_p) $(__WXLIB_XRC_p) $(__WXLIB_XML_p) $(__WXLIB_ADV_p) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet endif data: if not exist $(OBJS) mkdir $(OBJS) for %%f in (horse.ani horse.bmp horse.cur horse.gif horse.ico horse.jpg horse.pcx horse.png horse.pnm horse.tga horse.tif horse.xpm) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS) +data-images: + if not exist image mkdir image + for %%f in (horse_grey.bmp horse_grey_flipped.bmp horse_rle4.bmp horse_rle4_flipped.bmp horse_rle8.bmp horse_rle8_flipped.bmp) do if not exist image\%%f copy .\image\%%f image + fr: if not exist $(OBJS)\intl\fr mkdir $(OBJS)\intl\fr for %%f in (internat.po internat.mo) do if not exist $(OBJS)\intl\fr\%%f copy .\intl\fr\%%f $(OBJS)\intl\fr @@ -699,7 +733,7 @@ $(OBJS)\test_xmltest.o: ./xml/xmltest.cpp $(CXX) -c -o $@ $(TEST_CXXFLAGS) $(CPPDEPS) $< $(OBJS)\test_gui_sample_rc.o: ./../samples/sample.rc - windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_3) $(__DEBUG_DEFINE_p_3) $(__NDEBUG_DEFINE_p_3) $(__EXCEPTIONS_DEFINE_p_3) $(__RTTI_DEFINE_p_3) $(__THREAD_DEFINE_p_3) $(__UNICODE_DEFINE_p_3) $(__MSLU_DEFINE_p_3) --include-dir $(SETUPHDIR) --include-dir ./../include $(__CAIRO_INCLUDEDIR_p_1) --include-dir . $(__DLLFLAG_p_3) --include-dir ./../samples --define NOPCH + windres --use-temp-file -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_3) $(__DEBUG_DEFINE_p_3) $(__NDEBUG_DEFINE_p_3) $(__EXCEPTIONS_DEFINE_p_3) $(__RTTI_DEFINE_p_3) $(__THREAD_DEFINE_p_3) $(__UNICODE_DEFINE_p_3) $(__MSLU_DEFINE_p_3) --include-dir $(SETUPHDIR) --include-dir ./../include $(__CAIRO_INCLUDEDIR_p_1) --include-dir . $(__DLLFLAG_p_3) --include-dir ./../samples --define NOPCH $(OBJS)\test_gui_dummy.o: ./dummy.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< @@ -722,6 +756,9 @@ $(OBJS)\test_gui_size.o: ./geometry/size.cpp $(OBJS)\test_gui_point.o: ./geometry/point.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\test_gui_region.o: ./geometry/region.cpp + $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\test_gui_bitmap.o: ./graphics/bitmap.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< @@ -839,6 +876,9 @@ $(OBJS)\test_gui_rearrangelisttest.o: ./controls/rearrangelisttest.cpp $(OBJS)\test_gui_richtextctrltest.o: ./controls/richtextctrltest.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\test_gui_searchctrltest.o: ./controls/searchctrltest.cpp + $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\test_gui_slidertest.o: ./controls/slidertest.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< @@ -866,6 +906,9 @@ $(OBJS)\test_gui_treebooktest.o: ./controls/treebooktest.cpp $(OBJS)\test_gui_treectrltest.o: ./controls/treectrltest.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\test_gui_treelistctrltest.o: ./controls/treelistctrltest.cpp + $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\test_gui_virtlistctrltest.o: ./controls/virtlistctrltest.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< @@ -875,6 +918,9 @@ $(OBJS)\test_gui_webtest.o: ./controls/webtest.cpp $(OBJS)\test_gui_windowtest.o: ./controls/windowtest.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\test_gui_dialogtest.o: ./controls/dialogtest.cpp + $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\test_gui_clone.o: ./events/clone.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< @@ -941,7 +987,7 @@ $(OBJS)\test_gui_setsize.o: ./window/setsize.cpp $(OBJS)\test_gui_xrctest.o: ./xml/xrctest.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< -.PHONY: all clean data fr +.PHONY: all clean data data-images fr SHELL := $(COMSPEC)