summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-04-22 16:16:42 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-04-22 16:16:42 +0000
commit580548d0461515b4665024c15dfa41d2e0ca7e37 (patch)
tree2b59a1c14baf92f642b18e8e418b514cd6294e00 /bin
parent7bd5343990ccccdc5d2d06b8b11dd20fa8e04255 (diff)
added CYGWIN support
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mklib40
1 files changed, 40 insertions, 0 deletions
diff --git a/bin/mklib b/bin/mklib
index fc109b2336..49a5daf1a1 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -498,6 +498,46 @@ case $ARCH in
FINAL_LIBS="${LIBNAME}"
;;
+ CYGWIN*)
+ # GCC-based environment
+ CYGNAME="cyg${LIBNAME}" # prefix with "cyg"
+ LIBNAME="lib${LIBNAME}" # prefix with "lib"
+
+ if [ $STATIC = 1 ] ; then
+ echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a
+ LINK="ar"
+ OPTS="-ru"
+ # make lib
+ ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
+ ranlib ${LIBNAME}.a
+ # finish up
+ FINAL_LIBS=${LIBNAME}.a
+ else
+ OPTS="-shared -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a"
+ echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}-${MAJOR}.dll
+
+ if [ $CPLUSPLUS = 1 ] ; then
+ LINK="g++"
+ else
+ LINK="gcc"
+ fi
+
+ # rm any old libs
+ rm -f ${LIBNAME}-${MAJOR}.dll
+ rm -f ${LIBNAME}.dll.a
+ rm -f ${LIBNAME}.a
+
+ # make lib
+ ${LINK} ${OPTS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS}
+ # make usual symlinks
+ ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a
+ # finish up
+ FINAL_LIBS="${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a"
+ # special case for installing in bin
+ FINAL_BINS="${CYGNAME}-${MAJOR}.dll"
+ fi
+ ;;
+
'example')
# If you're adding support for a new architecture, you can
# start with this: