From 48b1d0ff4ff220d8f2994723f936a1ffa60addce Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Wed, 11 Aug 1999 17:40:09 +0000 Subject: [PATCH] New makefile updates. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- BuildCVS.txt | 18 +++++-- configure.in | 97 ++++++++++++++++++++++++++++++---- distrib/msw/tmake/filelist.txt | 1 + distrib/msw/tmake/unx.t | 39 +++++++++++--- src/gtk/makefile.unx.in | 45 +++++++++++++--- src/gtk1/makefile.unx.in | 45 +++++++++++++--- src/make.env.in | 23 ++++---- src/makelib.env.in | 12 +++++ src/makeprog.env.in | 14 ++++- src/motif/makefile.unx.in | 45 +++++++++++++--- 10 files changed, 280 insertions(+), 59 deletions(-) diff --git a/BuildCVS.txt b/BuildCVS.txt index b4f28fcfaf..1b9ca6331f 100644 --- a/BuildCVS.txt +++ b/BuildCVS.txt @@ -29,6 +29,7 @@ and its make.exe). to c:\wxWin\include\wx\msw\setup.h -> Edit c:\wxWin\include\wx\msw\setup.h so that most features are enabled (i.e. defined to 1) with + #define wxUSE_ODBC 0 #define wxUSE_SOCKETS 0 #define wxUSE_HTML 1 #define wxUSE_THREADS 1 @@ -37,8 +38,8 @@ and its make.exe). #define wxUSE_BUSYINFO 1 #define wxUSE_DYNLIB_CLASS 1 #define wxUSE_ZIPSTREAM 1 - #define wxUSE_JPEGLIB 1 - #define wxUSE_PNGLIB 1 + #define wxUSE_LIBJPEG 1 + #define wxUSE_LIBPNG 1 and iostreams ares disabled with #define wxUSE_STD_IOSTREAM 0 @@ -51,7 +52,7 @@ II) Unix ports using plain makefiles. Building wxGTK or wxMotif completely without configure won't ever work, but there is now a new makefile system that works without libtool and automake, using only -configure to create what is needed. So far, no shared +configure to create what is needed. So far, only shared libraries can be build with this system. Set WXWIN environment variable to the base directory such @@ -66,6 +67,17 @@ or type: ../configure --with-gtk or type: cd src/motif -> type: make -f makefile.unx +You will then find the shared library in in the lib path of +the build directory. There is currently no install method, +so you'll have to create a symlink to /usr/local/lib and run +ldconfig or whatever is needed to make that library known +to your system. + +In order to test the sample, go to mybuild/src/gtk again and +type: make -f makefile.unx samples +which will copy the entire samples directory to the build +directory, such as mybuild/samples + III) Windows using configure ---------------------------------------- diff --git a/configure.in b/configure.in index 3c48c7ebb8..946a141088 100644 --- a/configure.in +++ b/configure.in @@ -937,14 +937,6 @@ esac AM_PROG_LIBTOOL -dnl --------------------------------------------------------------------------- -dnl things for shared libraries without libtool -dnl --------------------------------------------------------------------------- - -SHARED_LINKER=gcc -shared -SHARED_LINKER_FLAG= -SHARED_CFLAG= - dnl --------------------------------------------------------------------------- dnl Define search path for includes and libraries: all headers and libs will be dnl looked for in all directories of this path @@ -1195,7 +1187,7 @@ dnl the name of the directory where the files for this toolkit live TOOLKIT_DIR=`echo ${TOOLKIT} | tr "A-Z" "a-z"` dnl the symbol which allows conditional compilation for the given toolkit -TOOLKIT_DEF=-D__WX${TOOLKIT}__ +TOOLKIT_DEF="-D__WX${TOOLKIT}__" dnl the name of the (libtool) library WX_LIBRARY_NAME="libwx_${TOOLKIT_DIR}.la" @@ -1203,8 +1195,79 @@ WX_LIBRARY_NAME="libwx_${TOOLKIT_DIR}.la" dnl the name of the static library WX_LIBRARY_NAME_STATIC="libwx_${TOOLKIT_DIR}.a" -dnl the name of the library to be linked reported by wx-config -WX_LIBRARY="wx_${TOOLKIT_DIR}" +dnl the name of the shared library +WX_LIBRARY_NAME_SHARED="libwx_${TOOLKIT_DIR}-${LT_RELEASE}.so.${LT_CURRENT}.${LT_REVISION}.${LT_AGE}" + +dnl the name of the library we actually want to build +WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}" + +dnl the name of the links to the shared library +WX_LIBRARY_LINK1="libwx_${TOOLKIT_DIR}-${LT_RELEASE}.so.${LT_CURRENT}" +WX_LIBRARY_LINK2="libwx_${TOOLKIT_DIR}-${LT_RELEASE}.so" +WX_LIBRARY_LINK3="libwx_${TOOLKIT_DIR}.so" + +dnl shared library settings +SHARED_LD= +PIC_FLAG= +WX_CREATE_LINKS= + +case "${host}" in + *-hp-hpux* ) + WX_LIBRARY_NAME_SHARED="libwx_${TOOLKIT_DIR}.sl" + SHARED_LD="${CXX} -b -o" + PIC_FLAG="+Z" + ;; + *-*-linux* ) + SHARED_LD="${CC} -shared -o" + PIC_FLAG="-fPIC" + WX_CREATE_LINKS="CREATE_LINKS" + ;; + *-*-irix5* | *-*-irix6* ) + SHARED_LD="${CXX} -shared -o" + WX_CREATE_LINKS="CREATE_LINKS" + ;; + *-*-solaris2* ) + SHARED_LD="${CXX} -G -o" + PIC_FLAG="PIC" + WX_CREATE_LINKS="CREATE_LINKS" + ;; + *-*-sunos4* ) + SHARED_LD="${CXX} -shared -o" + PIC_FLAG="-fPIC" + WX_CREATE_LINKS="CREATE_LINKS" + ;; + *-*-freebsd* | *-*-netbsd*) + SHARED_LD="${CXX} -shared -o" + PIC_FLAG="-fPIC" + WX_CREATE_LINKS="CREATE_LINKS" + ;; + *-*-osf* ) + SHARED_LD="${CXX} -shared -o" + PIC_FLAG="-fPIC" + WX_CREATE_LINKS="CREATE_LINKS" + ;; + *-*-dgux5* ) + SHARED_LD="${CXX} -shared -o" + PIC_FLAG="-fPIC" + WX_CREATE_LINKS="CREATE_LINKS" + ;; + *-*-sysv5* ) + SHARED_LD="${CXX} -shared -o" + PIC_FLAG="-fPIC" + WX_CREATE_LINKS="CREATE_LINKS" + ;; + *-*-aix* ) + SHARED_LD="/usr/lpp/xlC/bin/makeC++SharedLib -p 0 -o" + ;; + *-*-cygwin32* ) + ;; + *-*-mingw32* ) + ;; + *-pc-os2_emx ) + ;; + *) + AC_MSG_ERROR(unknown system type ${host}.) +esac dnl ------------------------------------------------------------------------ dnl Check for headers @@ -2225,12 +2288,24 @@ AC_SUBST(WX_MAJOR_VERSION_NUMBER) AC_SUBST(WX_MINOR_VERSION_NUMBER) AC_SUBST(WX_RELEASE_NUMBER) AC_SUBST(WX_LIBRARY_NAME) +AC_SUBST(WX_LIBRARY_NAME_STATIC) +AC_SUBST(WX_LIBRARY_NAME_SHARED) AC_SUBST(WX_LIBRARY) +AC_SUBST(WX_TARGET_LIBRARY) +AC_SUBST(WX_LIBRARY_LINK1) +AC_SUBST(WX_LIBRARY_LINK2) +AC_SUBST(WX_LIBRARY_LINK3) + +dnl are we supposed to create the links? +AC_SUBST(WX_CREATE_LINKS) dnl suppress libtool's informational messages - they duplicate its command line LIBTOOL="$LIBTOOL --silent" AC_SUBST(LIBTOOL) +AC_SUBST(SHARED_LD) +AC_SUBST(PIC_FLAG) + dnl debugging options AC_SUBST(WXDEBUG_DEFINE) diff --git a/distrib/msw/tmake/filelist.txt b/distrib/msw/tmake/filelist.txt index 1d3b672242..1521370e60 100644 --- a/distrib/msw/tmake/filelist.txt +++ b/distrib/msw/tmake/filelist.txt @@ -48,6 +48,7 @@ busyinfo.cpp G caret.cpp G U choicdgg.cpp G colrdlgg.cpp G G +dcpsg.cpp G U dirdlgg.cpp G 16 fontdlgg.cpp G G gridg.cpp G diff --git a/distrib/msw/tmake/unx.t b/distrib/msw/tmake/unx.t index 3ea7663c5b..dca70864e2 100644 --- a/distrib/msw/tmake/unx.t +++ b/distrib/msw/tmake/unx.t @@ -93,6 +93,20 @@ include ../make.env +############## override make.env for PIC ########################## + +# Clears all default suffixes +.SUFFIXES: .o .cpp .c .cxx + +.c.o : + $(CCC) -c $(CFLAGS) $(PICFLAGS) -o $@ $< + +.cpp.o : + $(CC) -c $(CPPFLAGS) $(PICFLAGS) -o $@ $< + +.cxx.o : + $(CC) -c $(CPPFLAGS) $(PICFLAGS) -o $@ $< + ########################### Paths ################################# srcdir = @srcdir@ @@ -282,7 +296,7 @@ REQUIRED_DIRS = ../../lib ../../src ../../src/common ../../src/gtk ../../src/mot ../../src/generic ../../src/unix ../../src/motif/xmombo ../../src/html \ ../../src/zlib ../../src/jpeg ../../src/png -all: $(REQUIRED_DIRS) $(OBJECTS) $(WXLIB) +all: $(REQUIRED_DIRS) $(OBJECTS) @WX_TARGET_LIBRARY@ @WX_CREATE_LINKS@ $(REQUIRED_DIRS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h @if test ! -d ../../lib; then mkdir ../../lib; fi @@ -298,13 +312,21 @@ $(REQUIRED_DIRS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDI @if test ! -d ../../src/jpeg; then mkdir ../../src/jpeg; fi @if test ! -d ../../src/zlib; then mkdir ../../src/zlib; fi -$(WXLIB): $(OBJECTS) - @if test ! ../../samples/dialog.cpp; \ - then cp -f -r $(WXDIR)/samples ../..; \ - fi +@WX_LIBRARY_NAME_STATIC@: $(OBJECTS) $(AR) $(AROPTIONS) ../../lib/$@ $(OBJECTS) $(RANLIB) ../../lib/$@ +@WX_LIBRARY_NAME_SHARED@: $(OBJECTS) + $(SHARED_LD) ../../lib/$@ $(OBJECTS) $(EXTRALIBS) + +CREATE_LINKS: $(OBJECTS) + @if test -e ../../lib/@WX_LIBRARY_LINK1@; then rm -f ../../lib/@WX_LIBRARY_LINK1@; fi + @if test -e ../../lib/@WX_LIBRARY_LINK2@; then rm -f ../../lib/@WX_LIBRARY_LINK2@; fi + @if test -e ../../lib/@WX_LIBRARY_LINK3@; then rm -f ../../lib/@WX_LIBRARY_LINK3@; fi + $(LN_S) @WX_TARGET_LIBRARY@ ../../lib/@WX_LIBRARY_LINK1@ + $(LN_S) @WX_TARGET_LIBRARY@ ../../lib/@WX_LIBRARY_LINK2@ + $(LN_S) @WX_TARGET_LIBRARY@ ../../lib/@WX_LIBRARY_LINK3@ + $(OBJECTS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h parser.o: parser.c lexer.c @@ -328,7 +350,12 @@ lexer.c: $(COMMDIR)/lexer.l sed -e "s/unput/PROIO_unput/g" > lexer.c @$(RM) lex.yy.c -install: $(WXLIB) +samples: $(OBJECTS) + @if test ! -e ../../samples/dialog/dialog.cpp; \ + then cp -f -r $(WXDIR)/samples ../..; \ + fi + +install: @WX_TARGET_LIBRARY@ #$ ExpandList("WXINSTALLWX"); clean: diff --git a/src/gtk/makefile.unx.in b/src/gtk/makefile.unx.in index ebbd715dd8..82264ffff7 100644 --- a/src/gtk/makefile.unx.in +++ b/src/gtk/makefile.unx.in @@ -11,7 +11,7 @@ # # # -# This file was automatically generated by tmake at 09:46, 1999/08/11 +# This file was automatically generated by tmake at 18:19, 1999/08/11 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNX.T! # @@ -29,6 +29,20 @@ include ../make.env +############## override make.env for PIC ########################## + +# Clears all default suffixes +.SUFFIXES: .o .cpp .c .cxx + +.c.o : + $(CCC) -c $(CFLAGS) $(PICFLAGS) -o $@ $< + +.cpp.o : + $(CC) -c $(CPPFLAGS) $(PICFLAGS) -o $@ $< + +.cxx.o : + $(CC) -c $(CPPFLAGS) $(PICFLAGS) -o $@ $< + ########################### Paths ################################# srcdir = @srcdir@ @@ -105,12 +119,14 @@ GTK_GENERICOBJS = \ ../generic/caret.o \ ../generic/choicdgg.o \ ../generic/colrdlgg.o \ + ../generic/dcpsg.o \ ../generic/dirdlgg.o \ ../generic/fontdlgg.o \ ../generic/gridg.o \ ../generic/imaglist.o \ ../generic/laywin.o \ ../generic/listctrl.o \ + ../generic/msgdlgg.o \ ../generic/numdlgg.o \ ../generic/panelg.o \ ../generic/printps.o \ @@ -243,7 +259,6 @@ GTK_GUIOBJS = \ ../gtk/mdi.o \ ../gtk/menu.o \ ../gtk/minifram.o \ - ../gtk/msgdlg.o \ ../gtk/notebook.o \ ../gtk/palette.o \ ../gtk/pen.o \ @@ -273,6 +288,7 @@ MOTIF_GENERICOBJS = \ ../generic/caret.o \ ../generic/choicdgg.o \ ../generic/colrdlgg.o \ + ../generic/dcpsg.o \ ../generic/dirdlgg.o \ ../generic/fontdlgg.o \ ../generic/gridg.o \ @@ -551,7 +567,7 @@ REQUIRED_DIRS = ../../lib ../../src ../../src/common ../../src/gtk ../../src/mot ../../src/generic ../../src/unix ../../src/motif/xmombo ../../src/html \ ../../src/zlib ../../src/jpeg ../../src/png -all: $(REQUIRED_DIRS) $(OBJECTS) $(WXLIB) +all: $(REQUIRED_DIRS) $(OBJECTS) @WX_TARGET_LIBRARY@ @WX_CREATE_LINKS@ $(REQUIRED_DIRS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h @if test ! -d ../../lib; then mkdir ../../lib; fi @@ -567,13 +583,21 @@ $(REQUIRED_DIRS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDI @if test ! -d ../../src/jpeg; then mkdir ../../src/jpeg; fi @if test ! -d ../../src/zlib; then mkdir ../../src/zlib; fi -$(WXLIB): $(OBJECTS) - @if test ! ../../samples/dialog.cpp; \ - then cp -f -r $(WXDIR)/samples ../..; \ - fi +@WX_LIBRARY_NAME_STATIC@: $(OBJECTS) $(AR) $(AROPTIONS) ../../lib/$@ $(OBJECTS) $(RANLIB) ../../lib/$@ +@WX_LIBRARY_NAME_SHARED@: $(OBJECTS) + $(SHARED_LD) ../../lib/$@ $(OBJECTS) $(EXTRALIBS) + +CREATE_LINKS: $(OBJECTS) + @if test -e ../../lib/@WX_LIBRARY_LINK1@; then rm -f ../../lib/@WX_LIBRARY_LINK1@; fi + @if test -e ../../lib/@WX_LIBRARY_LINK2@; then rm -f ../../lib/@WX_LIBRARY_LINK2@; fi + @if test -e ../../lib/@WX_LIBRARY_LINK3@; then rm -f ../../lib/@WX_LIBRARY_LINK3@; fi + $(LN_S) @WX_TARGET_LIBRARY@ ../../lib/@WX_LIBRARY_LINK1@ + $(LN_S) @WX_TARGET_LIBRARY@ ../../lib/@WX_LIBRARY_LINK2@ + $(LN_S) @WX_TARGET_LIBRARY@ ../../lib/@WX_LIBRARY_LINK3@ + $(OBJECTS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h parser.o: parser.c lexer.c @@ -597,7 +621,12 @@ lexer.c: $(COMMDIR)/lexer.l sed -e "s/unput/PROIO_unput/g" > lexer.c @$(RM) lex.yy.c -install: $(WXLIB) +samples: $(OBJECTS) + @if test ! -e ../../samples/dialog/dialog.cpp; \ + then cp -f -r $(WXDIR)/samples ../..; \ + fi + +install: @WX_TARGET_LIBRARY@ clean: rm -f *.o diff --git a/src/gtk1/makefile.unx.in b/src/gtk1/makefile.unx.in index ebbd715dd8..82264ffff7 100644 --- a/src/gtk1/makefile.unx.in +++ b/src/gtk1/makefile.unx.in @@ -11,7 +11,7 @@ # # # -# This file was automatically generated by tmake at 09:46, 1999/08/11 +# This file was automatically generated by tmake at 18:19, 1999/08/11 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNX.T! # @@ -29,6 +29,20 @@ include ../make.env +############## override make.env for PIC ########################## + +# Clears all default suffixes +.SUFFIXES: .o .cpp .c .cxx + +.c.o : + $(CCC) -c $(CFLAGS) $(PICFLAGS) -o $@ $< + +.cpp.o : + $(CC) -c $(CPPFLAGS) $(PICFLAGS) -o $@ $< + +.cxx.o : + $(CC) -c $(CPPFLAGS) $(PICFLAGS) -o $@ $< + ########################### Paths ################################# srcdir = @srcdir@ @@ -105,12 +119,14 @@ GTK_GENERICOBJS = \ ../generic/caret.o \ ../generic/choicdgg.o \ ../generic/colrdlgg.o \ + ../generic/dcpsg.o \ ../generic/dirdlgg.o \ ../generic/fontdlgg.o \ ../generic/gridg.o \ ../generic/imaglist.o \ ../generic/laywin.o \ ../generic/listctrl.o \ + ../generic/msgdlgg.o \ ../generic/numdlgg.o \ ../generic/panelg.o \ ../generic/printps.o \ @@ -243,7 +259,6 @@ GTK_GUIOBJS = \ ../gtk/mdi.o \ ../gtk/menu.o \ ../gtk/minifram.o \ - ../gtk/msgdlg.o \ ../gtk/notebook.o \ ../gtk/palette.o \ ../gtk/pen.o \ @@ -273,6 +288,7 @@ MOTIF_GENERICOBJS = \ ../generic/caret.o \ ../generic/choicdgg.o \ ../generic/colrdlgg.o \ + ../generic/dcpsg.o \ ../generic/dirdlgg.o \ ../generic/fontdlgg.o \ ../generic/gridg.o \ @@ -551,7 +567,7 @@ REQUIRED_DIRS = ../../lib ../../src ../../src/common ../../src/gtk ../../src/mot ../../src/generic ../../src/unix ../../src/motif/xmombo ../../src/html \ ../../src/zlib ../../src/jpeg ../../src/png -all: $(REQUIRED_DIRS) $(OBJECTS) $(WXLIB) +all: $(REQUIRED_DIRS) $(OBJECTS) @WX_TARGET_LIBRARY@ @WX_CREATE_LINKS@ $(REQUIRED_DIRS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h @if test ! -d ../../lib; then mkdir ../../lib; fi @@ -567,13 +583,21 @@ $(REQUIRED_DIRS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDI @if test ! -d ../../src/jpeg; then mkdir ../../src/jpeg; fi @if test ! -d ../../src/zlib; then mkdir ../../src/zlib; fi -$(WXLIB): $(OBJECTS) - @if test ! ../../samples/dialog.cpp; \ - then cp -f -r $(WXDIR)/samples ../..; \ - fi +@WX_LIBRARY_NAME_STATIC@: $(OBJECTS) $(AR) $(AROPTIONS) ../../lib/$@ $(OBJECTS) $(RANLIB) ../../lib/$@ +@WX_LIBRARY_NAME_SHARED@: $(OBJECTS) + $(SHARED_LD) ../../lib/$@ $(OBJECTS) $(EXTRALIBS) + +CREATE_LINKS: $(OBJECTS) + @if test -e ../../lib/@WX_LIBRARY_LINK1@; then rm -f ../../lib/@WX_LIBRARY_LINK1@; fi + @if test -e ../../lib/@WX_LIBRARY_LINK2@; then rm -f ../../lib/@WX_LIBRARY_LINK2@; fi + @if test -e ../../lib/@WX_LIBRARY_LINK3@; then rm -f ../../lib/@WX_LIBRARY_LINK3@; fi + $(LN_S) @WX_TARGET_LIBRARY@ ../../lib/@WX_LIBRARY_LINK1@ + $(LN_S) @WX_TARGET_LIBRARY@ ../../lib/@WX_LIBRARY_LINK2@ + $(LN_S) @WX_TARGET_LIBRARY@ ../../lib/@WX_LIBRARY_LINK3@ + $(OBJECTS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h parser.o: parser.c lexer.c @@ -597,7 +621,12 @@ lexer.c: $(COMMDIR)/lexer.l sed -e "s/unput/PROIO_unput/g" > lexer.c @$(RM) lex.yy.c -install: $(WXLIB) +samples: $(OBJECTS) + @if test ! -e ../../samples/dialog/dialog.cpp; \ + then cp -f -r $(WXDIR)/samples ../..; \ + fi + +install: @WX_TARGET_LIBRARY@ clean: rm -f *.o diff --git a/src/make.env.in b/src/make.env.in index 97cfd5d948..a0ee460ddc 100644 --- a/src/make.env.in +++ b/src/make.env.in @@ -8,13 +8,16 @@ # Copyright:(c) 1999, Robert Roebling # -########################### VERSION ################################# +####################### GENERAL SETTINGS ############################ + -LDLIBS = @LD_LIBS@ +EXTRALIBS = @EXTRA_LIBS@ +LDLIBS = ${top_builddir}/lib/@WX_TARGET_LIBRARY@ $(EXTRA_LIBS) TOOLKIT = @TOOLKIT@ -WXLIB = lib@WX_LIBRARY@.a +WXLIB = @WX_LIBRARY_NAME_STATIC@ +WXSHLIB = @WX_LIBRARY_NAME_SHARED@ ########################### VERSION ################################# @@ -52,21 +55,13 @@ RANLIB = @RANLIB@ LD = @LD@ MAKEINFO = @MAKEINFO@ +SHARED_LD = @SHARED_LD@ + ########################### Flags ################################# CFLAGS = @TOOLKIT_DEF@ @WXDEBUG_DEFINE@ @CFLAGS@ CPPFLAGS = @TOOLKIT_DEF@ @WXDEBUG_DEFINE@ @CXXFLAGS@ - -########################### Rules ################################# - -# Clears all default suffixes -.SUFFIXES: .o .cpp .c - -.c.o : - $(CCC) -c $(CFLAGS) -o $@ $< - -.cpp.o : - $(CC) -c $(CPPFLAGS) -o $@ $< +PICFLAGS = @PIC_FLAG@ diff --git a/src/makelib.env.in b/src/makelib.env.in index 4d913a8cf4..c3372e14b1 100644 --- a/src/makelib.env.in +++ b/src/makelib.env.in @@ -3,6 +3,18 @@ # Replace this with your own path if necessary WXDIR = $(WXWIN) +# Clears all default suffixes +.SUFFIXES: .o .cpp .c .cxx + +.c.o : + $(CCC) -c $(CFLAGS) -o $@ $< + +.cpp.o : + $(CC) -c $(CPPFLAGS) -o $@ $< + +.cxx.o : + $(CC) -c $(CPPFLAGS) -o $@ $< + # this is for using the samples in ../samples/xxxxx pretop_srcdir = @top_srcdir@ top_srcdir = ../$(pretop_srcdir) diff --git a/src/makeprog.env.in b/src/makeprog.env.in index 9bad0a0c9e..667568137c 100644 --- a/src/makeprog.env.in +++ b/src/makeprog.env.in @@ -3,6 +3,18 @@ # Replace this with your own path if necessary WXDIR = $(WXWIN) +# Clears all default suffixes +.SUFFIXES: .o .cpp .c .cxx + +.c.o : + $(CCC) -c $(CFLAGS) -o $@ $< + +.cpp.o : + $(CC) -c $(CPPFLAGS) -o $@ $< + +.cxx.o : + $(CC) -c $(CPPFLAGS) -o $@ $< + # this is for using the samples in ../samples/xxxxx pretop_srcdir = @top_srcdir@ top_srcdir = ../$(pretop_srcdir) @@ -11,7 +23,7 @@ include ../../src/make.env all: $(PROGRAM) -$(PROGRAM): $(OBJECTS) ../../lib/$(WXLIB) +$(PROGRAM): $(OBJECTS) ../../lib/@WX_TARGET_LIBRARY@ $(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJECTS) $(LDLIBS) clean: diff --git a/src/motif/makefile.unx.in b/src/motif/makefile.unx.in index ebbd715dd8..82264ffff7 100644 --- a/src/motif/makefile.unx.in +++ b/src/motif/makefile.unx.in @@ -11,7 +11,7 @@ # # # -# This file was automatically generated by tmake at 09:46, 1999/08/11 +# This file was automatically generated by tmake at 18:19, 1999/08/11 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNX.T! # @@ -29,6 +29,20 @@ include ../make.env +############## override make.env for PIC ########################## + +# Clears all default suffixes +.SUFFIXES: .o .cpp .c .cxx + +.c.o : + $(CCC) -c $(CFLAGS) $(PICFLAGS) -o $@ $< + +.cpp.o : + $(CC) -c $(CPPFLAGS) $(PICFLAGS) -o $@ $< + +.cxx.o : + $(CC) -c $(CPPFLAGS) $(PICFLAGS) -o $@ $< + ########################### Paths ################################# srcdir = @srcdir@ @@ -105,12 +119,14 @@ GTK_GENERICOBJS = \ ../generic/caret.o \ ../generic/choicdgg.o \ ../generic/colrdlgg.o \ + ../generic/dcpsg.o \ ../generic/dirdlgg.o \ ../generic/fontdlgg.o \ ../generic/gridg.o \ ../generic/imaglist.o \ ../generic/laywin.o \ ../generic/listctrl.o \ + ../generic/msgdlgg.o \ ../generic/numdlgg.o \ ../generic/panelg.o \ ../generic/printps.o \ @@ -243,7 +259,6 @@ GTK_GUIOBJS = \ ../gtk/mdi.o \ ../gtk/menu.o \ ../gtk/minifram.o \ - ../gtk/msgdlg.o \ ../gtk/notebook.o \ ../gtk/palette.o \ ../gtk/pen.o \ @@ -273,6 +288,7 @@ MOTIF_GENERICOBJS = \ ../generic/caret.o \ ../generic/choicdgg.o \ ../generic/colrdlgg.o \ + ../generic/dcpsg.o \ ../generic/dirdlgg.o \ ../generic/fontdlgg.o \ ../generic/gridg.o \ @@ -551,7 +567,7 @@ REQUIRED_DIRS = ../../lib ../../src ../../src/common ../../src/gtk ../../src/mot ../../src/generic ../../src/unix ../../src/motif/xmombo ../../src/html \ ../../src/zlib ../../src/jpeg ../../src/png -all: $(REQUIRED_DIRS) $(OBJECTS) $(WXLIB) +all: $(REQUIRED_DIRS) $(OBJECTS) @WX_TARGET_LIBRARY@ @WX_CREATE_LINKS@ $(REQUIRED_DIRS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h @if test ! -d ../../lib; then mkdir ../../lib; fi @@ -567,13 +583,21 @@ $(REQUIRED_DIRS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDI @if test ! -d ../../src/jpeg; then mkdir ../../src/jpeg; fi @if test ! -d ../../src/zlib; then mkdir ../../src/zlib; fi -$(WXLIB): $(OBJECTS) - @if test ! ../../samples/dialog.cpp; \ - then cp -f -r $(WXDIR)/samples ../..; \ - fi +@WX_LIBRARY_NAME_STATIC@: $(OBJECTS) $(AR) $(AROPTIONS) ../../lib/$@ $(OBJECTS) $(RANLIB) ../../lib/$@ +@WX_LIBRARY_NAME_SHARED@: $(OBJECTS) + $(SHARED_LD) ../../lib/$@ $(OBJECTS) $(EXTRALIBS) + +CREATE_LINKS: $(OBJECTS) + @if test -e ../../lib/@WX_LIBRARY_LINK1@; then rm -f ../../lib/@WX_LIBRARY_LINK1@; fi + @if test -e ../../lib/@WX_LIBRARY_LINK2@; then rm -f ../../lib/@WX_LIBRARY_LINK2@; fi + @if test -e ../../lib/@WX_LIBRARY_LINK3@; then rm -f ../../lib/@WX_LIBRARY_LINK3@; fi + $(LN_S) @WX_TARGET_LIBRARY@ ../../lib/@WX_LIBRARY_LINK1@ + $(LN_S) @WX_TARGET_LIBRARY@ ../../lib/@WX_LIBRARY_LINK2@ + $(LN_S) @WX_TARGET_LIBRARY@ ../../lib/@WX_LIBRARY_LINK3@ + $(OBJECTS): $(WXDIR)/include/wx/defs.h $(WXDIR)/include/wx/object.h $(WXDIR)/include/wx/setup.h parser.o: parser.c lexer.c @@ -597,7 +621,12 @@ lexer.c: $(COMMDIR)/lexer.l sed -e "s/unput/PROIO_unput/g" > lexer.c @$(RM) lex.yy.c -install: $(WXLIB) +samples: $(OBJECTS) + @if test ! -e ../../samples/dialog/dialog.cpp; \ + then cp -f -r $(WXDIR)/samples ../..; \ + fi + +install: @WX_TARGET_LIBRARY@ clean: rm -f *.o -- 2.45.2