]> git.saurik.com Git - wxWidgets.git/blame - src/makelib.env.in
added translation of mac system into language, adaption of search paths
[wxWidgets.git] / src / makelib.env.in
CommitLineData
3711412e
RL
1#
2# Template makefile for building wxWindows companion libraries.
3#
4# Author: Ron Lee <ron@debian.org>
5# Created: 19/3/2000
f6bcfd97 6# $Id$
3711412e 7#
f6bcfd97
BP
8# To use, set the following vars before including it:
9#
10# top_srcdir
11# top_builddir
12# libsrc_dir
3711412e
RL
13#
14# TARGET_LIBNAME
15# LIBVERSION_CURRENT
16# LIBVERSION_REVISION
17# LIBVERSION_AGE
f6bcfd97
BP
18# HEADER_PATH
19# HEADER_SUBDIR
20#
21# HEADERS
22# OBJECTS
3711412e
RL
23#
24# either a shared or static lib will be built according to the
25# option given to configure.
26#
27
28prefix = @prefix@
29exec_prefix = @exec_prefix@
f6bcfd97 30includedir = @includedir@
3711412e
RL
31libdir = @libdir@
32
33INSTALL = @INSTALL@
34INSTALL_PROGRAM = @INSTALL_PROGRAM@
f6bcfd97 35INSTALL_DATA = @INSTALL_DATA@
3711412e 36
ea8628fb
VZ
37TARGETLIB_STATIC = ${TARGET_LIBNAME}.a
38TARGETLIB_SHARED = ${TARGET_LIBNAME}.so.${LIBVERSION_CURRENT}.${LIBVERSION_REVISION}.${LIBVERSION_AGE}
39TARGETLIB_LINK1 = ${TARGET_LIBNAME}.so.${LIBVERSION_CURRENT}
40TARGETLIB_LINK2 = ${TARGET_LIBNAME}.so
f6bcfd97
BP
41
42TARGETLIB_SONAME = @WX_TARGET_LIBRARY_SONAME@
8e877c19 43
48b1d0ff
RR
44# Clears all default suffixes
45.SUFFIXES: .o .cpp .c .cxx
46
47.c.o :
ea8628fb 48 ${CCC} -c @DEP_INFO_FLAGS@ ${CFLAGS} ${PICFLAGS} -o $@ $<
48b1d0ff
RR
49
50.cpp.o :
ea8628fb 51 ${CC} -c @DEP_INFO_FLAGS@ ${CXXFLAGS} ${PICFLAGS} -o $@ $<
48b1d0ff
RR
52
53.cxx.o :
ea8628fb 54 ${CC} -c @DEP_INFO_FLAGS@ ${CXXFLAGS} ${PICFLAGS} -o $@ $<
48b1d0ff 55
f6bcfd97
BP
56# the comment at the end of the next line is needed because otherwise autoconf
57# would remove this line completely - it contains a built-in hack to remove
58# any VPATH assignment not containing ':'
ea8628fb 59VPATH = @PATH_IFS@${top_srcdir}/${libsrc_dir} # ':' for autoconf
f6bcfd97 60
ea8628fb 61include ${top_builddir}/src/make.env
8e877c19 62
8e877c19 63
f6bcfd97 64all: libtype_@WX_TARGET_LIBRARY_TYPE@
3711412e
RL
65
66libtype_so: CREATE_LINKS
67
ea8628fb 68libtype_a: ${TARGETLIB_STATIC}
3711412e
RL
69
70
ea8628fb
VZ
71${TARGETLIB_SHARED}: ${OBJECTS}
72 @${INSTALL} -d ${top_builddir}/lib
73 ${SHARED_LD} ${top_builddir}/lib/$@ ${TARGETLIB_SONAME} ${OBJECTS}
3711412e 74
ea8628fb
VZ
75CREATE_LINKS: ${TARGETLIB_SHARED}
76 cd ${top_builddir}/lib \
77 && ${RM} ${TARGETLIB_LINK1} ${TARGETLIB_LINK2} \
78 && ${LN_S} ${TARGETLIB_SHARED} ${TARGETLIB_LINK1} \
79 && ${LN_S} ${TARGETLIB_SHARED} ${TARGETLIB_LINK2}
3711412e 80
ea8628fb
VZ
81${TARGETLIB_STATIC}: ${OBJECTS}
82 @${INSTALL} -d ${top_builddir}/lib
83 ar ${AROPTIONS} ${top_builddir}/lib/$@ ${OBJECTS}
84 ${RANLIB} ${top_builddir}/lib/$@
8e877c19 85
f6bcfd97 86install: install_@WX_TARGET_LIBRARY_TYPE@ install_headers
3711412e
RL
87
88install_so:
ea8628fb
VZ
89 ${INSTALL_PROGRAM} ${top_builddir}/lib/${TARGETLIB_SHARED} ${libdir}/${TARGETLIB_SHARED}
90 @${RM} ${libdir}/${TARGETLIB_LINK1} ${libdir}/${TARGETLIB_LINK2}
91 cd ${libdir} \
92 && ${LN_S} ${TARGETLIB_SHARED} ${TARGETLIB_LINK1} \
93 && ${LN_S} ${TARGETLIB_SHARED} ${TARGETLIB_LINK2}
3711412e
RL
94
95install_a:
ea8628fb 96 ${INSTALL_PROGRAM} ${top_builddir}/lib/${TARGETLIB_STATIC} ${libdir}/${TARGETLIB_STATIC}
f6bcfd97
BP
97
98install_headers:
ea8628fb
VZ
99 ${INSTALL} -d ${includedir}/wx/${HEADER_SUBDIR}
100 @for h in ${HEADERS}; do \
101 ${INSTALL_DATA} ${HEADER_PATH}/${HEADER_SUBDIR}/$$h ${includedir}/wx/${HEADER_SUBDIR}/$$h; \
102 echo "installing ${includedir}/wx/${HEADER_SUBDIR}/$$h"; \
f6bcfd97 103 done
3711412e
RL
104
105uninstall:
ea8628fb
VZ
106 ${RM} ${libdir}/${TARGETLIB_STATIC}
107 ${RM} ${libdir}/${TARGETLIB_SHARED}
108 ${RM} ${libdir}/${TARGETLIB_LINK1}
109 ${RM} ${libdir}/${TARGETLIB_LINK2}
f6bcfd97 110 @echo "removing headers"
ea8628fb
VZ
111 @for h in ${HEADERS}; do \
112 ${RM} ${includedir}/wx/${HEADER_SUBDIR}/$$h; \
f6bcfd97 113 done
ea8628fb
VZ
114 @if test -d ${includedir}/wx/${HEADER_SUBDIR}; then \
115 rmdir ${includedir}/wx/${HEADER_SUBDIR}; \
f6bcfd97 116 fi
ea8628fb 117 @-rmdir ${includedir}/wx
3711412e 118
8e877c19 119clean:
ea8628fb
VZ
120 ${RM} ${OBJECTS} ${top_builddir}/lib/${TARGETLIB_SHARED} \
121 ${top_builddir}/lib/${TARGETLIB_LINK1} \
122 ${top_builddir}/lib/${TARGETLIB_LINK2} \
123 ${top_builddir}/lib/${TARGETLIB_STATIC} core
3711412e
RL
124
125.PHONY: all shared static clean install install_static install_shared uninstall
126