Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
Updated Makefile and added README
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashley Jeffs committed Apr 24, 2014
1 parent 79231de commit 383cac1
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 8 deletions.
34 changes: 26 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,46 @@ ifndef $(PREFIX)
PREFIX = /usr
endif

TARGET = cld2
TARGET = cld2
VERSION_MAJOR = 2
VERSION_MINOR = 0
VERSION_REVISION = 0

APP_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_REVISION)

LIBRARY = lib$(TARGET).so
LIBRARY_DIR = ./internal/$(LIBRARY)
TEST = compact_lang_det_test_full0720

INSTALL_DIR = $(PREFIX)/${libdir}
INCLUDE_DIR = $(PREFIX)/include/$(TARGET)

INTERNAL_LIBRARY_INCLUDES := $(shell find ./internal -iname '*.h')
PUBLIC_LIBRARY_INCLUDES := $(shell find ./public -iname '*.h')

all:
cd internal; ./compile_libs.sh
@echo Building library...
@cd internal; ./compile_libs.sh

test:
cd internal; ./compile_full.sh
@echo Building tests...
@cd internal; ./compile_full.sh
./$(TEST)

install: all
mkdir -p ${INSTALL_DIR} ${INCLUDE_DIR}/internal; \
cp ./internal/$(LIBRARY) $(INSTALL_DIR)/${LIBRARY}; \
cp -R ./public $(INCLUDE_DIR)/; \
cp -R ./internal/*.h $(INCLUDE_DIR)/internal
mkdir -p $(INCLUDE_DIR) $(INSTALL_DIR)
mkdir -m 755 $(INCLUDE_DIR)/internal $(INCLUDE_DIR)/public
install -m 644 $(PUBLIC_LIBRARY_INCLUDES) $(INCLUDE_DIR)/public
install -m 644 $(INTERNAL_LIBRARY_INCLUDES) $(INCLUDE_DIR)/internal
install -m 755 $(LIBRARY_DIR) $(INSTALL_DIR)/$(LIBRARY).$(APP_VERSION)
ln -sf $(LIBRARY).$(APP_VERSION) $(INSTALL_DIR)/$(LIBRARY).$(VERSION_MAJOR)
ln -sf $(LIBRARY).$(APP_VERSION) $(INSTALL_DIR)/$(LIBRARY)
$(LDCONFIG)

uninstall:
rm $(INSTALL_DIR)/$(LIBRARY); \
rm $(INSTALL_DIR)/$(LIBRARY).$(APP_VERSION)
rm $(INSTALL_DIR)/$(LIBRARY).$(VERSION_MAJOR)
rm $(INSTALL_DIR)/$(LIBRARY)
rm -r $(INCLUDE_DIR)

clean:
Expand Down
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Compact Language Detector 2
===========================

This is a fork of https://code.google.com/p/cld2/, with added features for enabling a more liberal approach to language detection, where weaker answers are less likely to be discarded. This fork may be more suitable for smaller input samples where a potentiallly weak answer is more useful than no answer at all.

To enable the new behaviour call using the new kCLDFlagLiberal flag.

Origin
------

This fork was created using the git-svn plugin:

``` sh
git svn clone https://cld2.googlecode.com/svn -s
git checkout -b develop
```

Changes from the subversion origin should be pulled into the master branch, you can then either rebase or merge the develop branch:

``` sh
git checkout master
git svn init http://cld2.googlecode.com/svn/trunk
git svn fetch

git checkout develop
git merge master
```

Installation
------------

By default lib(64) and include files will be installed to /usr, you can change the install prefix by setting PREFIX.

```
make
make check
sudo make install PREFIX=/opt/cld2
```

0 comments on commit 383cac1

Please sign in to comment.