| 1 |
########################################################################### |
| 2 |
## ## |
| 3 |
## Language Technologies Institute ## |
| 4 |
## Carnegie Mellon University ## |
| 5 |
## Copyright (c) 2008 ## |
| 6 |
## All Rights Reserved. ## |
| 7 |
## ## |
| 8 |
## Permission is hereby granted, free of charge, to use and distribute ## |
| 9 |
## this software and its documentation without restriction, including ## |
| 10 |
## without limitation the rights to use, copy, modify, merge, publish, ## |
| 11 |
## distribute, sublicense, and/or sell copies of this work, and to ## |
| 12 |
## permit persons to whom this work is furnished to do so, subject to ## |
| 13 |
## the following conditions: ## |
| 14 |
## 1. The code must retain the above copyright notice, this list of ## |
| 15 |
## conditions and the following disclaimer. ## |
| 16 |
## 2. Any modifications must be clearly marked as such. ## |
| 17 |
## 3. Original authors' names are not deleted. ## |
| 18 |
## 4. The authors' names are not used to endorse or promote products ## |
| 19 |
## derived from this software without specific prior written ## |
| 20 |
## permission. ## |
| 21 |
## ## |
| 22 |
## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ## |
| 23 |
## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ## |
| 24 |
## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ## |
| 25 |
## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ## |
| 26 |
## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ## |
| 27 |
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ## |
| 28 |
## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ## |
| 29 |
## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ## |
| 30 |
## THIS SOFTWARE. ## |
| 31 |
## ## |
| 32 |
########################################################################### |
| 33 |
## ## |
| 34 |
## Windows Mobile support for Flite ## |
| 35 |
## ## |
| 36 |
## Builds a usable flite, language and voice .dlls with mingw ## |
| 37 |
## ## |
| 38 |
## http://www.mingw.org ## |
| 39 |
## ## |
| 40 |
## Also an example command line program ## |
| 41 |
## ## |
| 42 |
## At top level ## |
| 43 |
## ./configure --target=i386-mingw32 ## |
| 44 |
## make ## |
| 45 |
## ## |
| 46 |
########################################################################### |
| 47 |
TOP = .. |
| 48 |
DIRNAME = windows |
| 49 |
BUILD_DIRS = |
| 50 |
ALL_DIRS = $(BUILD_DIRS) |
| 51 |
H = |
| 52 |
RC = |
| 53 |
SRCS = |
| 54 |
OBJS = $(SRCS:.c=.o) |
| 55 |
WINDOWS = fliteDll.cpp stdafx.h |
| 56 |
FILES = Makefile $(SRCS) $(H) $(RC) $(WINDOWS) |
| 57 |
|
| 58 |
flite_LIBS = flite_$(FL_VOX) flite_$(FL_LANG) flite_$(FL_LEX) |
| 59 |
flite_LIBS_flags = -L$(LIBDIR) $(flite_LIBS:%=-l%) |
| 60 |
flite_LIBS_deps = $(flite_LIBS:%=$(LIBDIR)/lib%.a) |
| 61 |
|
| 62 |
LOCAL_CLEAN = flite.dll flite.lib flite.def |
| 63 |
|
| 64 |
ALL = |
| 65 |
|
| 66 |
include $(TOP)/config/common_make_rules |
| 67 |
|
| 68 |
flite.def: $(LIBDIR)/libflite.a |
| 69 |
echo "LIBRARY FLITE.DLL" >flite.def |
| 70 |
echo "EXPORTS" >>flite.def |
| 71 |
$(NM) $(LIBDIR)/libflite.a | \ |
| 72 |
grep "^0" | awk '{if ($$2 == "T") print $$3}' | sed 's/_//' >>flite.def |
| 73 |
|
| 74 |
flite.dll: $(LIBDIR)/libflite.a |
| 75 |
rm -rf flitedll |
| 76 |
mkdir flitedll |
| 77 |
(cd flitedll && ar x ../$(LIBDIR)/libflite.a) |
| 78 |
$(DLLWRAP) -def flite.def flitedll/*.o --output-lib flite.lib -o flite.dll |
| 79 |
rm -rf flitedll |
| 80 |
|
| 81 |
|
| 82 |
|