repaired some of the more obvious horrors in the contrib (configure) Makefiles
reworked makelib.env so that it now can create shared libs and has (un)install targets. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
ede8795ff0
commit
3711412e38
@ -2122,11 +2122,14 @@ if test "$wxUSE_SHARED" = "yes"; then
|
||||
WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}"
|
||||
WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_SHARED_GL}"
|
||||
fi
|
||||
dnl do not alter the LIBRARY_TYPE strings "so" and "a", they are magic
|
||||
WX_TARGET_LIBRARY_TYPE="so"
|
||||
else
|
||||
dnl set target to static
|
||||
WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
|
||||
WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}"
|
||||
WX_ALL="${WX_LIBRARY_NAME_STATIC}"
|
||||
WX_TARGET_LIBRARY_TYPE="a"
|
||||
fi
|
||||
|
||||
dnl ------------------------------------------------------------------------
|
||||
@ -3631,6 +3634,7 @@ AC_SUBST(DEP_INFO_FLAGS)
|
||||
AC_SUBST(CODE_GEN_FLAGS)
|
||||
AC_SUBST(BURNT_LIBRARY_NAME)
|
||||
AC_SUBST(BURNT_LIBRARY_NAME_GL)
|
||||
AC_SUBST(WX_TARGET_LIBRARY_TYPE)
|
||||
|
||||
dnl debugging options
|
||||
AC_SUBST(WXDEBUG_DEFINE)
|
||||
@ -3720,6 +3724,7 @@ if test "$wxUSE_GUI" = "yes"; then
|
||||
wx_cv_path_ifs=$PATH_IFS
|
||||
wx_cv_program_ext=$PROGRAM_EXT
|
||||
wx_cv_target_library=$WX_TARGET_LIBRARY
|
||||
wx_cv_target_libtype=$WX_TARGET_LIBRARY_TYPE
|
||||
AC_CONFIG_SUBDIRS(demos samples utils contrib)
|
||||
fi
|
||||
dnl from wxUSE_GUI
|
||||
|
3
contrib/configure
vendored
3
contrib/configure
vendored
@ -690,6 +690,8 @@ fi
|
||||
|
||||
PATH_IFS=$wx_cv_path_ifs
|
||||
WX_TARGET_LIBRARY=$wx_cv_target_library
|
||||
WX_TARGET_LIBRARY_TYPE=$wx_cv_target_libtype
|
||||
|
||||
|
||||
|
||||
|
||||
@ -854,6 +856,7 @@ s%@CPP@%$CPP%g
|
||||
s%@PATH_IFS@%$PATH_IFS%g
|
||||
s%@ESD_LINK@%$ESD_LINK%g
|
||||
s%@WX_TARGET_LIBRARY@%$WX_TARGET_LIBRARY%g
|
||||
s%@WX_TARGET_LIBRARY_TYPE@%$WX_TARGET_LIBRARY_TYPE%g
|
||||
|
||||
CEOF
|
||||
EOF
|
||||
|
@ -25,10 +25,12 @@ dnl Final subst
|
||||
|
||||
PATH_IFS=$wx_cv_path_ifs
|
||||
WX_TARGET_LIBRARY=$wx_cv_target_library
|
||||
WX_TARGET_LIBRARY_TYPE=$wx_cv_target_libtype
|
||||
|
||||
AC_SUBST(PATH_IFS)
|
||||
AC_SUBST(ESD_LINK)
|
||||
AC_SUBST(WX_TARGET_LIBRARY)
|
||||
AC_SUBST(WX_TARGET_LIBRARY_TYPE)
|
||||
|
||||
dnl -----------
|
||||
dnl File output
|
||||
|
@ -17,7 +17,9 @@ PROGRAM=mmboard
|
||||
|
||||
OBJECTS=mmboard.o mmbman.o
|
||||
|
||||
EXTRA_LIBS= $(top_builddir)/contrib/lib/libmmedia.a @ESD_LIBS@
|
||||
EXTRA_LIBS= $(top_builddir)/contrib/src/mmedia/libmmedia.@WX_TARGET_LIBRARY_TYPE@ @ESD_LINK@
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
# the comment at the end of the next line is needed because otherwise autoconf
|
||||
# would remove this line completely - it contains a built-in hack to remove
|
||||
# any VPATH assignment not containing ':'
|
||||
|
@ -13,7 +13,7 @@ PROGRAM=stctest
|
||||
|
||||
OBJECTS=$(PROGRAM).o
|
||||
|
||||
APPEXTRALIBS=$(top_builddir)/contrib/src/stc/libstc.a
|
||||
APPEXTRALIBS=$(top_builddir)/contrib/src/stc/libstc.@WX_TARGET_LIBRARY_TYPE@
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
DATAFILES=stctest.cpp
|
||||
|
@ -10,3 +10,11 @@ all:
|
||||
clean:
|
||||
@for d in $(CONTRIB_SUBDIRS); do (cd $$d && $(MAKE) clean); done
|
||||
|
||||
install:
|
||||
@for d in $(CONTRIB_SUBDIRS); do (cd $$d && $(MAKE) install); done
|
||||
|
||||
uninstall:
|
||||
@for d in $(CONTRIB_SUBDIRS); do (cd $$d && $(MAKE) uninstall); done
|
||||
|
||||
.PHONY: all clean install uninstall
|
||||
|
||||
|
@ -1,9 +1,13 @@
|
||||
#
|
||||
|
||||
top_srcdir = @top_srcdir@/..
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = ../../..
|
||||
|
||||
LIBTARGET=libmmedia
|
||||
TARGET_LIBNAME=libmmedia
|
||||
|
||||
LIBVERSION_CURRENT=1
|
||||
LIBVERSION_REVISION=0
|
||||
LIBVERSION_AGE=0
|
||||
|
||||
OBJECTS=cdbase.o cdwin.o g711.o g721.o g723_24.o \
|
||||
g723_40.o g72x.o sndaiff.o sndbase.o sndcodec.o \
|
||||
@ -13,9 +17,9 @@ OBJECTS=cdbase.o cdwin.o g711.o g721.o g723_24.o \
|
||||
# the comment at the end of the next line is needed because otherwise autoconf
|
||||
# would remove this line completely - it contains a built-in hack to remove
|
||||
# any VPATH assignment not containing ':'
|
||||
VPATH = :$(top_srcdir)/contrib/src/mmedia # ':' for autoconf
|
||||
VPATH = :$(top_srcdir)/src/mmedia # ':' for autoconf
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
APPEXTRADEFS=-I$(top_srcdir)/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
||||
|
@ -1,9 +1,13 @@
|
||||
#
|
||||
|
||||
top_srcdir = @top_srcdir@/..
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = ../../..
|
||||
|
||||
LIBTARGET=libogl
|
||||
TARGET_LIBNAME=libogl
|
||||
|
||||
LIBVERSION_CURRENT=1
|
||||
LIBVERSION_REVISION=0
|
||||
LIBVERSION_AGE=0
|
||||
|
||||
OBJECTS=basic.o bmpshape.o composit.o divided.o lines.o misc.o \
|
||||
basic2.o canvas.o constrnt.o drawn.o mfutils.o ogldiag.o
|
||||
@ -11,8 +15,8 @@ OBJECTS=basic.o bmpshape.o composit.o divided.o lines.o misc.o \
|
||||
# the comment at the end of the next line is needed because otherwise autoconf
|
||||
# would remove this line completely - it contains a built-in hack to remove
|
||||
# any VPATH assignment not containing ':'
|
||||
VPATH = :$(top_srcdir)/contrib/src/ogl # ':' for autoconf
|
||||
VPATH = :$(top_srcdir)/src/ogl # ':' for autoconf
|
||||
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
APPEXTRADEFS=-I$(top_srcdir)/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
@ -5,14 +5,18 @@
|
||||
# Version: $Id$
|
||||
###############################################################################
|
||||
|
||||
top_srcdir = @top_srcdir@/..
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = ../../..
|
||||
|
||||
this_dir = $(top_srcdir)/contrib/src/stc
|
||||
this_dir = $(top_srcdir)/src/stc
|
||||
scintilla_dir=$(this_dir)/scintilla
|
||||
VPATH=$(this_dir)@PATH_IFS@$(scintilla_dir)/src # ':' for autoconf
|
||||
|
||||
LIBTARGET=libstc
|
||||
TARGET_LIBNAME=libstc
|
||||
|
||||
LIBVERSION_CURRENT=1
|
||||
LIBVERSION_REVISION=0
|
||||
LIBVERSION_AGE=0
|
||||
|
||||
OBJECTS=PlatWX.o ScintillaWX.o stc.o \
|
||||
Accessor.o \
|
||||
@ -31,6 +35,6 @@ OBJECTS=PlatWX.o ScintillaWX.o stc.o \
|
||||
Style.o \
|
||||
ViewStyle.o
|
||||
|
||||
APPEXTRADEFS=-D__WX__ -DSCI_LEXER -I$(scintilla_dir)/src -I$(scintilla_dir)/include -I$(top_srcdir)/contrib/include
|
||||
APPEXTRADEFS=-D__WX__ -DSCI_LEXER -I$(scintilla_dir)/src -I$(scintilla_dir)/include -I$(top_srcdir)/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
@ -13,7 +13,7 @@ PROGRAM=stctest
|
||||
|
||||
OBJECTS=$(PROGRAM).o
|
||||
|
||||
APPEXTRALIBS=$(top_builddir)/contrib/src/stc/libstc.a
|
||||
APPEXTRALIBS=$(top_builddir)/contrib/src/stc/libstc.@WX_TARGET_LIBRARY_TYPE@
|
||||
APPEXTRADEFS=-I$(top_srcdir)/contrib/include
|
||||
|
||||
DATAFILES=stctest.cpp
|
||||
|
@ -1,24 +1,87 @@
|
||||
# Makes a library in Unix (Motif)
|
||||
#
|
||||
# Template makefile for building wxWindows companion libraries.
|
||||
#
|
||||
# Author: Ron Lee <ron@debian.org>
|
||||
# Created: 19/3/2000
|
||||
#
|
||||
# To use, set the following vars before including it.
|
||||
#
|
||||
# TARGET_LIBNAME
|
||||
# LIBVERSION_CURRENT
|
||||
# LIBVERSION_REVISION
|
||||
# LIBVERSION_AGE
|
||||
#
|
||||
# either a shared or static lib will be built according to the
|
||||
# option given to configure.
|
||||
#
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
libdir = @libdir@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
|
||||
TARGETLIB_STATIC=$(TARGET_LIBNAME).a
|
||||
TARGETLIB_SHARED=$(TARGET_LIBNAME).so.$(LIBVERSION_CURRENT).$(LIBVERSION_REVISION).$(LIBVERSION_AGE)
|
||||
TARGETLIB_LINK1=$(TARGET_LIBNAME).so.$(LIBVERSION_CURRENT)
|
||||
TARGETLIB_LINK2=$(TARGET_LIBNAME).so
|
||||
|
||||
# Clears all default suffixes
|
||||
.SUFFIXES: .o .cpp .c .cxx
|
||||
|
||||
.c.o :
|
||||
$(CCC) -c $(CFLAGS) -o $@ $<
|
||||
$(CCC) -c $(CFLAGS) $(PICFLAGS) -o $@ $<
|
||||
|
||||
.cpp.o :
|
||||
$(CC) -c $(CPPFLAGS) -o $@ $<
|
||||
$(CC) -c $(CPPFLAGS) $(PICFLAGS) -o $@ $<
|
||||
|
||||
.cxx.o :
|
||||
$(CC) -c $(CPPFLAGS) -o $@ $<
|
||||
$(CC) -c $(CPPFLAGS) $(PICFLAGS) -o $@ $<
|
||||
|
||||
include $(top_builddir)/src/make.env
|
||||
|
||||
all: $(LIBTARGET).a
|
||||
|
||||
$(LIBTARGET).a : $(OBJECTS)
|
||||
all: libtype_@WX_TARGET_LIBRARY_TYPE@
|
||||
|
||||
libtype_so: CREATE_LINKS
|
||||
|
||||
libtype_a: $(TARGETLIB_STATIC)
|
||||
|
||||
|
||||
$(TARGETLIB_SHARED): $(OBJECTS)
|
||||
$(SHARED_LD) $@ $(OBJECTS)
|
||||
|
||||
CREATE_LINKS: $(TARGETLIB_SHARED)
|
||||
@$(RM) $(TARGETLIB_LINK1) $(TARGETLIB_LINK2)
|
||||
$(LN_S) $(TARGETLIB_SHARED) $(TARGETLIB_LINK1)
|
||||
$(LN_S) $(TARGETLIB_SHARED) $(TARGETLIB_LINK2)
|
||||
|
||||
$(TARGETLIB_STATIC): $(OBJECTS)
|
||||
ar $(AROPTIONS) $@ $(OBJECTS)
|
||||
$(RANLIB) $@
|
||||
|
||||
install: install_@WX_TARGET_LIBRARY_TYPE@
|
||||
|
||||
install_so:
|
||||
$(INSTALL_PROGRAM) $(TARGETLIB_SHARED) $(libdir)/$(TARGETLIB_SHARED)
|
||||
@$(RM) $(libdir)/$(TARGETLIB_LINK1) $(libdir)/$(TARGETLIB_LINK2)
|
||||
cd $(libdir) \
|
||||
&& $(LN_S) $(TARGETLIB_SHARED) $(TARGETLIB_LINK1) \
|
||||
&& $(LN_S) $(TARGETLIB_SHARED) $(TARGETLIB_LINK2)
|
||||
|
||||
install_a:
|
||||
$(INSTALL_PROGRAM) $(TARGETLIB_STATIC) $(libdir)/$(TARGETLIB_STATIC)
|
||||
|
||||
uninstall:
|
||||
$(RM) $(libdir)/$(TARGETLIB_STATIC)
|
||||
$(RM) $(libdir)/$(TARGETLIB_SHARED)
|
||||
$(RM) $(libdir)/$(TARGETLIB_LINK1)
|
||||
$(RM) $(libdir)/$(TARGETLIB_LINK2)
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(LIBTARGET).a core
|
||||
$(RM) $(OBJECTS) $(TARGETLIB_SHARED) $(TARGETLIB_LINK1) \
|
||||
$(TARGETLIB_LINK2) $(TARGETLIB_STATIC) core
|
||||
|
||||
.PHONY: all shared static clean install install_static install_shared uninstall
|
||||
|
||||
|
@ -5,14 +5,18 @@
|
||||
# Version: $Id$
|
||||
###############################################################################
|
||||
|
||||
top_srcdir = @top_srcdir@/..
|
||||
top_srcdir = @top_srcdir@
|
||||
top_builddir = ../../..
|
||||
|
||||
this_dir = $(top_srcdir)/contrib/src/stc
|
||||
this_dir = $(top_srcdir)/src/stc
|
||||
scintilla_dir=$(this_dir)/scintilla
|
||||
VPATH=$(this_dir)@PATH_IFS@$(scintilla_dir)/src # ':' for autoconf
|
||||
|
||||
LIBTARGET=libstc
|
||||
TARGET_LIBNAME=libstc
|
||||
|
||||
LIBVERSION_CURRENT=1
|
||||
LIBVERSION_REVISION=0
|
||||
LIBVERSION_AGE=0
|
||||
|
||||
OBJECTS=PlatWX.o ScintillaWX.o stc.o \
|
||||
Accessor.o \
|
||||
@ -31,6 +35,6 @@ OBJECTS=PlatWX.o ScintillaWX.o stc.o \
|
||||
Style.o \
|
||||
ViewStyle.o
|
||||
|
||||
APPEXTRADEFS=-D__WX__ -DSCI_LEXER -I$(scintilla_dir)/src -I$(scintilla_dir)/include -I$(top_srcdir)/contrib/include
|
||||
APPEXTRADEFS=-D__WX__ -DSCI_LEXER -I$(scintilla_dir)/src -I$(scintilla_dir)/include -I$(top_srcdir)/include
|
||||
|
||||
include $(top_builddir)/src/makelib.env
|
||||
|
Loading…
Reference in New Issue
Block a user