summaryrefslogtreecommitdiff
path: root/lingucomponent/source/hyphenator
diff options
context:
space:
mode:
authorSander Vesik <svesik@openoffice.org>2002-07-29 16:28:22 +0000
committerSander Vesik <svesik@openoffice.org>2002-07-29 16:28:22 +0000
commit779ea694af5eaf155ee24c8357e9b27a78046e6e (patch)
tree5efb6d05d70ecd3ec8102bb4088bc87c0adab543 /lingucomponent/source/hyphenator
parent4a3dd2fe99714c38fdf549dddbfb03530ceb3740 (diff)
Merge from OOO_STABLE_1
Diffstat (limited to 'lingucomponent/source/hyphenator')
-rw-r--r--lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx402
-rw-r--r--lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx18
-rw-r--r--lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk29
3 files changed, 318 insertions, 131 deletions
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
index 5e912e7b962b..9946b97ef954 100644
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: hyphenimp.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: nidd $ $Date: 2002-05-09 17:36:02 $
+ * last change: $Author: svesik $ $Date: 2002-07-29 17:28:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -113,6 +113,8 @@
#endif
#include <osl/file.hxx>
+#include "dictmgr.hxx"
+#include "csutil.hxx"
#include <stdio.h>
#include <iostream>
@@ -147,6 +149,7 @@ Hyphenator::Hyphenator() :
{
bDisposing = FALSE;
pPropHelper = NULL;
+ numdict = 0;
}
@@ -155,6 +158,11 @@ Hyphenator::~Hyphenator()
{
if (pPropHelper)
pPropHelper->RemoveAsPropListener();
+ if (numdict) {
+ delete[] aDicts;
+ aDicts = NULL;
+ numdict = 0;
+ }
}
@@ -181,23 +189,134 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
MutexGuard aGuard( GetLinguMutex() );
SvtPathOptions aPathOpt;
-
- if (!aSuppLocales.getLength())
+ if (!numdict)
{
- aSuppLocales.realloc( 4 );
- Locale *pLocale = aSuppLocales.getArray();
- pLocale[0] = Locale( A2OU("en"), A2OU("US"), OUString() );
- pLocale[1] = Locale( A2OU("ru"), A2OU("RU"), OUString() );
- pLocale[2] = Locale( A2OU("de"), A2OU("DE"), OUString() );
- pLocale[3] = Locale( A2OU("da"), A2OU("DK"), OUString() );
+ // this routine should return the locales supported by the installed
+ // hyph dictionaries. So here we need to parse both the user edited
+ // dictionary list and the shared dictionary list
+ // to see what dictionaries the admin/user has installed
+
+ int numusr; // number of user dictionary entries
+ int numshr; // number of shared dictionary entries
+ dictentry * spdict; // shared dict entry pointer
+ dictentry * updict; // user dict entry pointer
+
+ // invoke a dictionary manager to get the user dictionary list
+ OUString usrlst = aPathOpt.GetUserDictionaryPath() + A2OU("/dictionary.lst");
+ OUString ulst;
+ osl::FileBase::getSystemPathFromFileURL(usrlst,ulst);
+ OString uTmp(OU2ENC(ulst,osl_getThreadTextEncoding()));
+ DictMgr* udMgr = new DictMgr(uTmp.getStr(),"HYPH");
+ numusr = 0;
+ if (udMgr)
+ numusr = udMgr->get_list(&updict);
+
+ // invoke a second dictionary manager to get the shared dictionary list
+ OUString shrlst = aPathOpt.GetLinguisticPath() + A2OU("/ooo/dictionary.lst");
+ OUString slst;
+ osl::FileBase::getSystemPathFromFileURL(shrlst,slst);
+ OString sTmp(OU2ENC(slst,osl_getThreadTextEncoding()));
+ DictMgr* sdMgr = new DictMgr(sTmp.getStr(),"HYPH");
+ numshr = 0;
+ if (sdMgr)
+ numshr = sdMgr->get_list(&spdict);
+
+
+ // we really should merge these and remove duplicates but since
+ // users can name their dictionaries anything they want it would
+ // be impossible to know if a real duplication exists unless we
+ // add some unique key to each hyphenation dictionary
+ // we can worry about that when and if issuezilla's flood in
+ numdict = numusr + numshr;
+
+ if (numdict) {
+ aDicts = new HDInfo[numdict];
+ aSuppLocales.realloc(numdict);
+ Locale * pLocale = aSuppLocales.getArray();
+ int numlocs = 0;
+ int newloc;
+ int i,j;
+ int k = 0;
+
+ // first add the user dictionaries
+ // keeping track of unique locales only
+ for (i = 0; i < numusr; i++) {
+ Locale nLoc( A2OU(updict->lang), A2OU(updict->region), OUString() );
+
+ newloc = 1;
+ for (j = 0; j < numlocs; j++) {
+ if (nLoc == pLocale[j]) newloc = 0;
+ }
+ if (newloc) {
+ pLocale[numlocs] = nLoc;
+ numlocs++;
+ }
+ aDicts[k].aPtr = NULL;
+ aDicts[k].aLoc = nLoc;
+ aDicts[k].aEnc = 0;
+ aDicts[k].aName = A2OU(updict->filename);
+ k++;
+ updict++;
+ }
+
+ // now add the shared dictionaries
+ // keeping track of unique locales only
+ for (i = 0; i < numshr; i++) {
+ Locale nLoc( A2OU(spdict->lang), A2OU(spdict->region), OUString() );
+
+ newloc = 1;
+ for (j = 0; j < numlocs; j++) {
+ if (nLoc == pLocale[j]) newloc = 0;
+ }
+ if (newloc) {
+ pLocale[numlocs] = nLoc;
+ numlocs++;
+ }
+ aDicts[k].aPtr = NULL;
+ aDicts[k].aLoc = nLoc;
+ aDicts[k].aEnc = 0;
+ aDicts[k].aName = A2OU(spdict->filename);
+ k++;
+ spdict++;
+ }
+
+ // reallocate the size to just cover the unique locales
+ aSuppLocales.realloc(numlocs);
+
+ } else {
+ // no dictionary.lst files found, just default to hyph_en.dic
+ numdict = 1;
+ aSuppLocales.realloc(1);
+ Locale *pLocale = aSuppLocales.getArray();
+ Locale nLoc( A2OU("en"), A2OU("US"), OUString() );
+ pLocale[0] = nLoc;
+ aDicts = new HDInfo[1];
+ aDicts[0].aPtr = NULL;
+ aDicts[0].aLoc = nLoc;
+ aDicts[0].aEnc = 0;
+ aDicts[0].aName = A2OU("hyph_en");
+ }
+
+ /* de-allocation of memory is handled inside the DictMgr */
+ updict = NULL;
+ if (udMgr) {
+ delete udMgr;
+ udMgr = NULL;
+ }
+ spdict = NULL;
+ if (sdMgr) {
+ delete sdMgr;
+ sdMgr = NULL;
+ }
- }
+ }
return aSuppLocales;
}
+
sal_Bool SAL_CALL Hyphenator::hasLocale(const Locale& rLocale)
throw(RuntimeException)
{
@@ -220,15 +339,6 @@ sal_Bool SAL_CALL Hyphenator::hasLocale(const Locale& rLocale)
return bRes;
}
-rtl_TextEncoding L2TE( LanguageType nLang )
-{
- switch( nLang )
- {
- case 0x419 : return RTL_TEXTENCODING_KOI8_R; break; // RUSSIAN
-
- }
- return RTL_TEXTENCODING_MS_1252;
-}
Reference< XHyphenatedWord > SAL_CALL
Hyphenator::hyphenate( const ::rtl::OUString& aWord,
@@ -239,77 +349,103 @@ Hyphenator::hyphenate( const ::rtl::OUString& aWord,
com::sun::star::lang::IllegalArgumentException)
{
SvtPathOptions aPathOpt;
- CharClass chclass( rSMgr, aLocale );
int nHyphenationPos = -1;
int wordlen;
char *hyphens;
+ char *lcword;
+ int k = 0;
+
+
+ HyphenDict *dict = NULL;
+ rtl_TextEncoding aEnc = 0;
- HyphenDict *dict;
- OString encWord;
- OUString tohyphenate;
Reference< XHyphenatedWord > xRes;
- if ( ( dict = aOpenedDicts.Get ( LocaleToLanguage ( aLocale ) ) ) == NULL )
- {
- OUString DictFN = A2OU("hyph_") + aLocale.Language + A2OU(".dic");
- OUString userdictpath;
- OUString dictpath;
- osl::FileBase::getSystemPathFromFileURL(
+ k = -1;
+ for (int j = 0; j < numdict; j++)
+ if (aLocale == aDicts[j].aLoc) k = j;
+
+
+ // if we have a hyphenation dictionary matching this locale
+ if (k != -1) {
+
+ // if this dictinary has not been loaded yet do that
+ if (!aDicts[k].aPtr) {
+
+ OUString DictFN = aDicts[k].aName + A2OU(".dic");
+ OUString userdictpath;
+ OUString dictpath;
+
+ osl::FileBase::getSystemPathFromFileURL(
aPathOpt.GetUserDictionaryPath() + A2OU("/"),
userdictpath);
- osl::FileBase::getSystemPathFromFileURL(
- aPathOpt.GetDictionaryPath() + A2OU("/"),
+ osl::FileBase::getSystemPathFromFileURL(
+ aPathOpt.GetLinguisticPath() + A2OU("/ooo/"),
dictpath);
- if ( ( dict = hnj_hyphen_load ( OU2A(userdictpath + DictFN) ) ) == NULL )
- if ( ( dict = hnj_hyphen_load ( OU2A(dictpath + DictFN) ) ) == NULL )
- {
- fprintf(stderr, "Couldn't find file %s and %s\n", OU2A(userdictpath + DictFN), OU2A(userdictpath + DictFN ));
- return NULL;
- }
- aOpenedDicts.Insert( LocaleToLanguage ( aLocale ), dict );
- }
+ OString uTmp(OU2ENC(userdictpath + DictFN,osl_getThreadTextEncoding()));
+ OString sTmp(OU2ENC(dictpath + DictFN,osl_getThreadTextEncoding()));
rtl_TextEncoding DictionaryEnc = L2TE( LocaleToLanguage( aLocale ) );
-// chclass.toLower(aWord);
- encWord = OUStringToOString (aWord, DictionaryEnc);
+ if ( ( dict = hnj_hyphen_load ( uTmp.getStr() ) ) == NULL )
+ if ( ( dict = hnj_hyphen_load ( sTmp.getStr()) ) == NULL )
+ {
+ fprintf(stderr, "Couldn't find file %s and %s\n", OU2ENC(userdictpath + DictFN, osl_getThreadTextEncoding()), OU2ENC(userdictpath + DictFN, osl_getThreadTextEncoding() ));
+ return NULL;
+ }
+ aDicts[k].aPtr = dict;
+ aDicts[k].aEnc = rtl_getTextEncodingFromUnixCharset(dict->cset);
+ }
- wordlen = encWord.getLength();
+ // other wise hyphenate the word with that dictionary
+ dict = aDicts[k].aPtr;
+ aEnc = aDicts[k].aEnc;
- hyphens = new char[wordlen+5];
+ OString encWord(OU2ENC(aWord,aEnc));
- if (hnj_hyphen_hyphenate(dict, encWord.getStr(), wordlen, hyphens))
- {
- delete hyphens;
- return NULL;
- }
+ wordlen = encWord.getLength();
+ lcword = new char[wordlen+1];
+ hyphens = new char[wordlen+5];
+ enmkallsmall(lcword,encWord.getStr(),dict->cset);
- OUStringBuffer hyphenatedWord;
- INT32 Leading = GetPosInWordToCheck( aWord, nMaxLeading );
+ if (hnj_hyphen_hyphenate(dict, lcword, wordlen, hyphens))
+ {
+ //whoops something did not work
+ delete[] hyphens;
+ delete[] lcword;
+ return NULL;
+ }
- for (INT32 i = 0; i < encWord.getLength(); i++)
- {
- hyphenatedWord.append(aWord[i]);
- if ((hyphens[i]&1) && (i < Leading))
- {
- nHyphenationPos = i;
- hyphenatedWord.append(sal_Unicode('='));
- }
- }
+ OUStringBuffer hyphenatedWord;
+ INT32 Leading = GetPosInWordToCheck( aWord, nMaxLeading );
- if (nHyphenationPos == -1)
- xRes = NULL;
- else
- {
- xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ), nHyphenationPos,
+ for (INT32 i = 0; i < encWord.getLength(); i++)
+ {
+ hyphenatedWord.append(aWord[i]);
+ if ((hyphens[i]&1) && (i < Leading))
+ {
+ nHyphenationPos = i;
+ hyphenatedWord.append(sal_Unicode('='));
+ }
+ }
+
+ if (nHyphenationPos == -1)
+ xRes = NULL;
+ else
+ {
+ xRes = new HyphenatedWord( aWord, LocaleToLanguage( aLocale ), nHyphenationPos,
aWord, nHyphenationPos );
- }
+ }
+
+ delete[] hyphens;
+ delete[] lcword;
+ return xRes;
- delete hyphens;
- return xRes;
+ }
+ return NULL;
}
Reference < XHyphenatedWord > SAL_CALL
@@ -334,83 +470,111 @@ Reference< XPossibleHyphens > SAL_CALL
{
SvtPathOptions aPathOpt;
- CharClass chclass( rSMgr, aLocale );
+ // CharClass chclass( rSMgr, aLocale );
int nHyphenationPos = -1;
int wordlen;
char *hyphens;
+ char *lcword;
+ int k;
+
HyphenDict *dict;
- OString encWord;
- OUString tohyphenate;
+ rtl_TextEncoding aEnc;
+
Reference< XPossibleHyphens > xRes;
- if ( ( dict = aOpenedDicts.Get ( LocaleToLanguage ( aLocale ) ) ) == NULL )
- {
- OUString DictFN = A2OU("hyph_") + aLocale.Language + A2OU(".dic");
- OUString userdictpath;
- OUString dictpath;
- osl::FileBase::getSystemPathFromFileURL(
+ k = -1;
+ for (int j = 0; j < numdict; j++)
+ if (aLocale == aDicts[j].aLoc) k = j;
+
+ dict = NULL;
+ aEnc = 0;
+
+ // if we have a hyphenationd citionary matching this locale
+ if (k != -1) {
+
+ // if this dictioanry has not been loaded yet do that
+ if (!aDicts[k].aPtr) {
+
+ OUString DictFN = aDicts[k].aName + A2OU(".dic");
+ OUString userdictpath;
+ OUString dictpath;
+ osl::FileBase::getSystemPathFromFileURL(
aPathOpt.GetUserDictionaryPath() + A2OU("/"),
userdictpath);
- osl::FileBase::getSystemPathFromFileURL(
- aPathOpt.GetDictionaryPath() + A2OU("/"),
+ osl::FileBase::getSystemPathFromFileURL(
+ aPathOpt.GetLinguisticPath() + A2OU("/ooo/"),
dictpath);
+ OString uTmp(OU2ENC(userdictpath + DictFN,osl_getThreadTextEncoding()));
+ OString sTmp(OU2ENC(dictpath + DictFN,osl_getThreadTextEncoding()));
- if ( ( dict = hnj_hyphen_load ( OU2A(userdictpath + DictFN) ) ) == NULL )
- if ( ( dict = hnj_hyphen_load ( OU2A(dictpath + DictFN) ) ) == NULL )
- {
- fprintf(stderr, "Couldn't find file %s and %s\n", OU2A(userdictpath + DictFN), OU2A(userdictpath + DictFN ));
- return NULL;
+
+ if ( ( dict = hnj_hyphen_load ( uTmp.getStr() ) ) == NULL )
+ if ( ( dict = hnj_hyphen_load ( sTmp.getStr()) ) == NULL )
+ {
+ fprintf(stderr, "Couldn't find file %s and %s\n", OU2ENC(userdictpath + DictFN, osl_getThreadTextEncoding()), OU2ENC(userdictpath + DictFN, osl_getThreadTextEncoding() ));
+ return NULL;
+ }
+ aDicts[k].aPtr = dict;
+ aDicts[k].aEnc = rtl_getTextEncodingFromUnixCharset(dict->cset);
}
- aOpenedDicts.Insert( LocaleToLanguage ( aLocale ), dict );
- }
- rtl_TextEncoding DictionaryEnc = L2TE( LocaleToLanguage( aLocale ) );
+ // other wise hyphenate the word with that dictionary
+ dict = aDicts[k].aPtr;
+ aEnc = aDicts[k].aEnc;
- // chclass.toLower(aWord);
- encWord = OUStringToOString (aWord, DictionaryEnc);
- wordlen = encWord.getLength();
- hyphens = new char[wordlen+5];
+ OString encWord(OU2ENC(aWord, aEnc));
- if (hnj_hyphen_hyphenate(dict, encWord.getStr(), wordlen, hyphens))
- {
- delete hyphens;
- return NULL;
- }
+ wordlen = encWord.getLength();
+ lcword = new char[wordlen+1];
+ hyphens = new char[wordlen+5];
+ enmkallsmall(lcword,encWord.getStr(),dict->cset);
- INT16 nHyphCount = 0;
+ if (hnj_hyphen_hyphenate(dict, lcword, wordlen, hyphens))
+ {
+ delete[] hyphens;
+ delete[] lcword;
+ return NULL;
+ }
- for (INT16 i = 0; i < encWord.getLength(); i++)
- if (hyphens[i]&1)
- nHyphCount++;
+ INT16 nHyphCount = 0;
- Sequence< INT16 > aHyphPos(nHyphCount);
- INT16 *pPos = aHyphPos.getArray();
- OUStringBuffer hyphenatedWordBuffer;
- OUString hyphenatedWord;
- nHyphCount = 0;
+ for (INT16 i = 0; i < encWord.getLength(); i++)
+ if (hyphens[i]&1)
+ nHyphCount++;
- for (i = 0; i < encWord.getLength(); i++)
- {
- hyphenatedWordBuffer.append(aWord[i]);
- if (hyphens[i]&1)
- {
- pPos[nHyphCount] = i;
- hyphenatedWordBuffer.append(sal_Unicode('='));
- nHyphCount++;
- }
- }
+ Sequence< INT16 > aHyphPos(nHyphCount);
+ INT16 *pPos = aHyphPos.getArray();
+ OUStringBuffer hyphenatedWordBuffer;
+ OUString hyphenatedWord;
+ nHyphCount = 0;
- hyphenatedWord = hyphenatedWordBuffer.makeStringAndClear();
+ for (i = 0; i < encWord.getLength(); i++)
+ {
+ hyphenatedWordBuffer.append(aWord[i]);
+ if (hyphens[i]&1)
+ {
+ pPos[nHyphCount] = i;
+ hyphenatedWordBuffer.append(sal_Unicode('='));
+ nHyphCount++;
+ }
+ }
- xRes = new PossibleHyphens( aWord, LocaleToLanguage( aLocale ),
+ hyphenatedWord = hyphenatedWordBuffer.makeStringAndClear();
+
+ xRes = new PossibleHyphens( aWord, LocaleToLanguage( aLocale ),
hyphenatedWord, aHyphPos );
- delete hyphens;
- return xRes;
+ delete[] hyphens;
+ delete[] lcword;
+ return xRes;
+ }
+
+ return NULL;
+
}
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx
index 2edbd43e7f28..3c7d744437fa 100644
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: hyphenimp.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: nidd $ $Date: 2001-12-25 08:24:12 $
+ * last change: $Author: svesik $ $Date: 2002-07-29 17:28:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -105,10 +105,19 @@ using namespace ::com::sun::star::linguistic2;
#define OU2ISO_1(rtlOUString) ::rtl::OString((rtlOUString).getStr(), (rtlOUString).getLength(), RTL_TEXTENCODING_ISO_8859_1).getStr()
+#define OU2ENC(rtlOUString, rtlEncoding) ::rtl::OString((rtlOUString).getStr(), (rtlOUString).getLength(), rtlEncoding).getStr()
+
///////////////////////////////////////////////////////////////////////////
-DECLARE_TABLE(HyphDictList, HyphenDict * );
+struct HDInfo {
+ HyphenDict * aPtr;
+ OUString aName;
+ Locale aLoc;
+ rtl_TextEncoding aEnc;
+};
+
+
class Hyphenator :
public cppu::WeakImplHelper6
@@ -122,7 +131,8 @@ class Hyphenator :
>
{
Sequence< Locale > aSuppLocales;
- HyphDictList aOpenedDicts;
+ HDInfo * aDicts;
+ sal_Int32 numdict;
::cppu::OInterfaceContainerHelper aEvtListeners;
Reference< XPropertyChangeListener > xPropHelper;
diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk
index 336cafd0cb3c..39f277c189d3 100644
--- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk
+++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.3 $
+# $Revision: 1.4 $
#
-# last change: $Author: nidd $ $Date: 2002-05-09 17:36:02 $
+# last change: $Author: svesik $ $Date: 2002-07-29 17:28:01 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -68,11 +68,22 @@ ENABLE_EXCEPTIONS=TRUE
USE_DEFFILE=TRUE
.IF "$(GUI)"=="UNX"
-HNJLIB="-lhnj"
+HNJLIB=-lhnj
.ELSE
-HNJLIB="libhnj.lib"
+HNJLIB=libhnj.lib
.ENDIF
+.IF "$(ULINGULIB)"==""
+.IF "$(GUI)"=="UNX"
+ULINGULIB=-lulingu$(UPD)$(DLLPOSTFIX)
+.ENDIF # unx
+.IF "$(GUI)"=="WNT"
+ULINGULIB=$(LIBPRE) ulingu.lib
+.ENDIF # wnt
+.ENDIF
+
+
+
#----- Settings ---------------------------------------------------------
.INCLUDE : settings.mk
@@ -109,9 +120,9 @@ UNOTYPES=\
com.sun.star.linguistic2.XSupportedLocales\
com.sun.star.linguistic2.XThesaurus
-CXXFLAGS += -I../libhnj
-CFLAGSCXX += -I../libhnj
-CFLAGSCC += -I../libhnj
+CXXFLAGS += -I..$/libhnj -I..$/..$/..$/utility
+CFLAGSCXX += -I..$/libhnj -I..$/..$/..$/utility
+CFLAGSCC += -I..$/libhnj -I..$/..$/..$/utility
.IF "$(header)" == ""
@@ -141,7 +152,9 @@ SHL1STDLIBS= \
$(UCBHELPERLIB) \
$(UNOTOOLSLIB) \
$(LNGLIB) \
- $(HNJLIB)
+ $(HNJLIB) \
+ $(ULINGULIB)
+
# build DLL
SHL1LIBS= $(SLB)$/$(TARGET).lib