bin
.gdb_history
Test
-config.cashe
+config.cache
config.status
system.list
-linux.system.cashe
\ No newline at end of file
+linux.system.cache
+wx-config
ac_help="$ac_help
**--with-printarch use printing architecture"
ac_help="$ac_help
-**--with-gtk-prefix=PFX Prefix where GTK is installed"
+**--with-gtk-prefix=PFX Prefix where GTK is installed"
ac_help="$ac_help
-**--with-gtk-exec-prefix=PFX Exec prefix where GTK is installed"
+**--with-gtk-exec-prefix=PFX Exec prefix where GTK is installed"
ac_help="$ac_help
**--without-threads Force disabling threads "
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "./setup/substit ./include/wx/gtk/setup.h:./setup/setup.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "./setup/substit ./wx-config:./wx-config.in ./include/wx/gtk/setup.h:./setup/setup.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"./setup/substit"}
+CONFIG_FILES=\${CONFIG_FILES-"./setup/substit ./wx-config:./wx-config.in"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
[dnl
dnl Get the cflags and libraries from the gtk-config script
dnl
-AC_ARG_WITH(gtk-prefix,[**--with-gtk-prefix=PFX Prefix where GTK is installed],
+AC_ARG_WITH(gtk-prefix,[**--with-gtk-prefix=PFX Prefix where GTK is installed],
gtk_config_prefix="$withval", gtk_config_prefix="")
-AC_ARG_WITH(gtk-exec-prefix,[**--with-gtk-exec-prefix=PFX Exec prefix where GTK is installed],
+AC_ARG_WITH(gtk-exec-prefix,[**--with-gtk-exec-prefix=PFX Exec prefix where GTK is installed],
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
if test x$gtk_config_exec_prefix != x ; then
echo $OS >> system.list
AC_CONFIG_HEADER(./include/wx/gtk/setup.h:./setup/setup.hin)
-AC_OUTPUT(./setup/substit,./setup/general/createall)
+AC_OUTPUT(./setup/substit ./wx-config:./wx-config.in,./setup/general/createall)
AC_OVERRIDES_DONE
Now create your super-application myfoo.app and compile anywhere with
-gcc -o -c myfoo.cpp -I/usr/local/include -L/usr/local/lib -lwx_gtk
+g++ myfoo.cpp `wx-config --libs` `wx-config --cflags` -o myfoo
* General
-----------------------
* Creating a new Project
--------------------------
-There are two ways to create your own project. The first creates
-a project within the source code directories of wxWindows: In this
-case I propose to put all contributed programs in the directory
-"/user", with a directory of its own.
+There are two ways to create your own project:
+
+1) The first way uses the installed libraries and header files
+automatically using wx-config
+
+g++ myfoo.cpp `wx-config --libs` `wx-config --cflags` -o myfoo
+
+Using this way, a make file for the minimal sample would look
+like this
+
+CC = g++
+
+minimal: minimal.o
+ $(CC) -o minimal minimal.o `wx-config --libs`
+
+minimal.o: minimal.cpp mondrian.xpm
+ $(CC) `wx-config --cflags` -c minimal.cpp -o minimal.o
+
+clean:
+ rm -f *.o minimal
+
+This is certain to become the standard way unless we decide
+to sitch to tmake.
+
+2) The other way creates a project within the source code
+directories of wxWindows: In this case I propose to put
+all contributed programs in the directory "/user", with a
+directory of its own.
This directory then should include the following files:
put ALL your source code along with all the other stuff you need for
your application in this directory (subdirectories are welcome).
-The other way uses the installed libraries and header files in
-/usr/local/include/wx and /usr/local/lib. In this case, just
-compile your program like this:
-
-gcc -o -c myfoo.cpp -I/usr/local/include -L/usr/local/lib -lwx_gtk
-
** Something about Makefiles
------------------------------
// classes
//-----------------------------------------------------------------------------
-class wxDC;
-class wxPaintDC;
-class wxMemoryDC;
-class wxToolBar;
-class wxBitmapButton;
-class wxStaticBitmap;
-class wxFrame;
-class wxDialog;
-class wxTreeCtrl;
-class wxNotebook;
-
class wxMask;
class wxBitmap;
wxMask( const wxBitmap& bitmap );
~wxMask();
- private:
-
- friend wxBitmap;
- friend wxDC;
- friend wxPaintDC;
- friend wxToolBar;
- friend wxBitmapButton;
- friend wxStaticBitmap;
- friend wxFrame;
- friend wxDialog;
- friend wxTreeCtrl;
- friend wxNotebook;
-
+ // implementation
+
GdkBitmap *GetBitmap() const;
protected:
wxPalette *GetPalette() const;
wxPalette *GetColourMap() const
{ return GetPalette(); };
+
+ // implementation
GdkPixmap *GetPixmap() const;
GdkBitmap *GetBitmap() const;
- private:
void DestroyImage();
void RecreateImage();
void Render();
// classes
//-----------------------------------------------------------------------------
-class wxDC;
-class wxPaintDC;
-class wxMemoryDC;
-class wxToolBar;
-class wxBitmapButton;
-class wxStaticBitmap;
-class wxFrame;
-class wxDialog;
-class wxTreeCtrl;
-class wxNotebook;
-
class wxMask;
class wxBitmap;
wxMask( const wxBitmap& bitmap );
~wxMask();
- private:
-
- friend wxBitmap;
- friend wxDC;
- friend wxPaintDC;
- friend wxToolBar;
- friend wxBitmapButton;
- friend wxStaticBitmap;
- friend wxFrame;
- friend wxDialog;
- friend wxTreeCtrl;
- friend wxNotebook;
-
+ // implementation
+
GdkBitmap *GetBitmap() const;
protected:
wxPalette *GetPalette() const;
wxPalette *GetColourMap() const
{ return GetPalette(); };
+
+ // implementation
GdkPixmap *GetPixmap() const;
GdkBitmap *GetBitmap() const;
- private:
void DestroyImage();
void RecreateImage();
void Render();
GIFTOPNM_PROG =
NETPBM_PATH =
+# Base directories for installation
prefix = @prefix@
exec_prefix = @exec_prefix@
-# Directory in which to install scripts.
-#bindir = @bindir@
+# Directory in which to install headers
+includedir = @includedir@
-# Directory in which to install library files.
-datadir = @datadir@
-acdatadir = $(datadir)/autoconf
+# Directory in which to install library files
+libdir = @libdir@
-# Directory in which to install documentation info files.
-infodir = @infodir@
+# Directory in which to install executable files
+bindir = @bindir@
X_CFLAGS = @X_CFLAGS@
X_LIBS = @X_LIBS@
s|*LN_S*|@LN_S@|g
s|*prefix*|@prefix@|g
s|*exec_prefix*|@exec_prefix@|g
+s|*libdir*|@libdir@|g
s|*bindir*|@bindir@|g
-s|*datadir*|@datadir@|g
-s|*infodir*|@infodir@|g
+s|*includedir*|@includedir@|g
s|*X_CFLAGS*|@X_CFLAGS@|g
s|*X_LIBS*|@X_LIBS@|g
s|*X_EXTRA_LIBS*|@X_EXTRA_LIBS@|g
# include gtk.inc, qt.inc or motif.inc here
include @MAKEINCLUDE@
+# determine library names
+STATIC_LIBRARY=lib$(LIB_TARGET).a
+SHARED_LIBRARY=lib$(LIB_TARGET).so.$(LIB_MAJOR).$(LIB_MINOR)
+
LIB_CPP_ALL_SRC=$(LIB_CPP_SRC) @GTK_JOYSTICK@ @UNIX_THREAD@
LIB_C_ALL_SRC=$(LIB_C_SRC) parser.c
@if test ! -d iodbc; then mkdir iodbc; fi
install::
+ @echo " "
@echo "Installing library files and headers.."
+ @echo " "
@echo " Creating directories.."
@$(WXBASEDIR)/mkinstalldirs \
/usr/local/include/wx \
@echo " Copying headers from /include/wx"
@cd $(WXBASEDIR)/include/wx ; \
for f in *.h ; do \
- rm -f /usr/local/include/wx/$$f ; \
- $(INSTALL_DATA) $$f /usr/local/include/wx/$$f ; \
+ rm -f $(includedir)/wx/$$f ; \
+ $(INSTALL_DATA) $$f $(includedir)/wx/$$f ; \
done
@echo " Copying headers from /include/wx/gtk"
@cd $(WXBASEDIR)/include/wx/gtk ; \
for f in *.h ; do \
- rm -f /usr/local/include/wx/gtk/$$f ; \
- $(INSTALL_DATA) $$f /usr/local/include/wx/gtk/$$f ; \
+ rm -f $(includedir)/wx/gtk/$$f ; \
+ $(INSTALL_DATA) $$f $(includedir)/wx/gtk/$$f ; \
done
@echo " Copying headers from /include/wx/generic"
@cd $(WXBASEDIR)/include/wx/generic ; \
for f in *.h ; do \
- rm -f /usr/local/include/wx/generic/$$f ; \
- $(INSTALL_DATA) $$f /usr/local/include/wx/generic/$$f ; \
+ rm -f $(includedir)/wx/generic/$$f ; \
+ $(INSTALL_DATA) $$f $(includedir)/wx/generic/$$f ; \
done
- @echo " Copying static libraries files to /usr/local/lib"
+ @echo " Copying wx-config"
+ @cd $(WXBASEDIR) ; \
+ rm -f $(bindir)/wx-config ; \
+ $(INSTALL_PROGRAM) wx-config $(bindir)/wx-config
+ @echo " Copying static library"
@cd $(WXBASEDIR)/lib/$(OS) ; \
- for f in libwx_gtk.a ; do \
- rm -f /usr/local/lib/$$f ; \
- $(INSTALL_DATA) $$f /usr/local/lib/$$f ; \
- done
- @echo " Copying shared libraries to /usr/local/lib"
+ rm -f $(libdir)/$(STATIC_LIBRARY) ; \
+ $(INSTALL_DATA) $(STATIC_LIBRARY) $(libdir)/$(STATIC_LIBRARY)
+ @echo " Copying shared library"
@cd $(WXBASEDIR)/lib/$(OS) ; \
- for f in libwx_gtk.so* ; do \
- rm -f /usr/local/lib/$$f ; \
- $(INSTALL_PROGRAM) $$f /usr/local/lib/$$f ; \
- done
+ rm -f $(libdir)/$(SHARED_LIBRARY) ; \
+ $(INSTALL_PROGRAM) $(SHARED_LIBRARY) $(libdir)/$(SHARED_LIBRARY)
+ @echo " "
+ @echo "Installation complete. You may have to run ldconfig!"
+ @echo " "
+
clean::
$(RM) -rf gtk
--- /dev/null
+#!/bin/sh
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec_prefix_set=no
+
+usage="\
+Usage: wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
+
+if test $# -eq 0; then
+ echo "${usage}" 1>&2
+ exit 1
+fi
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ if test $exec_prefix_set = no ; then
+ exec_prefix=$optarg
+ fi
+ ;;
+ --prefix)
+ echo $prefix
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ exec_prefix_set=yes
+ ;;
+ --exec-prefix)
+ echo $exec_prefix
+ ;;
+ --version)
+ echo @WXGTK_VERSION@
+ ;;
+ --cflags)
+ if test @includedir@ != /usr/include ; then
+ includes=-I@includedir@
+ fi
+ echo $includes -D@TOOLKIT_DEF@ @GUI_TK_INCLUDE@
+ ;;
+ --libs)
+ echo -L@libdir@ -lwx_gtk -ldl @GUI_TK_LIBRARY@ @THREADS_LINK@ @EXTRA_LINK@
+ ;;
+ *)
+ echo "${usage}" 1>&2
+ exit 1
+ ;;
+ esac
+ shift
+done
+