update cppcommon -> limonp

This commit is contained in:
wyy 2013-10-26 09:19:02 -07:00
parent b30605e410
commit 2e22f6ed9d
5 changed files with 13 additions and 19 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
tags
*.demo
*swp
*.out
*.o

View File

@ -18,32 +18,23 @@ endif
DOLINK := $(LD) $(LDFLAGS)
SOURCES := $(wildcard *.cpp)
OBJS := $(patsubst %.cpp,%.o,$(SOURCES))
DEMOS := $(patsubst %.cpp,%.demo,$(SOURCES))
CPPJIEBADIR = ../cppjieba
LIBCPPJIEBA = $(CPPJIEBADIR)/libcppjieba.a
CPPJIEBADIR := ../cppjieba
LIBCPPJIEBA := $(CPPJIEBADIR)/libcppjieba.a
# remove the objs after compilation
.PHONY: clean $(LIBCPPJIEBA)
# Main Targets
all: keywordext_demo segment_demo
all: $(DEMOS)
# This is a suffix rule
#.c.o:
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $<
keywordext_demo: keywordext_demo.o $(LIBCPPJIEBA)
$(DOLINK) -o $@ $^
segment_demo: segment_demo.o $(LIBCPPJIEBA)
$(DOLINK) -o $@ $^
%.demo: %.cpp $(LIBCPPJIEBA)
$(CXX) -o $@ $(CXXFLAGS) $^ $(INCS)
$(LIBCPPJIEBA):
cd $(CPPJIEBADIR) && $(MAKE)
clean:
rm -f *.o *.ut *.d *.d.* keywordext_demo segment_demo
rm -f *.o *.ut *.d *.d.* $(DEMOS)
cd $(CPPJIEBADIR) && make clean
sinclude $(SOURCES:.cpp=.d)

View File

@ -1,3 +1,3 @@
./segment_demo testlines.utf8 --dictpath ../dicts/jieba.dict.utf8
./segment_demo testlines.utf8 --modelpath ../dicts/hmm_model.utf8 --algorithm cutHMM
./segment_demo testlines.utf8 --algorithm cutMix
./segment.demo testlines.utf8 --dictpath ../dicts/jieba.dict.utf8
./segment.demo testlines.utf8 --modelpath ../dicts/hmm_model.utf8 --algorithm cutHMM
./segment.demo testlines.utf8 --algorithm cutMix

View File

@ -1,5 +1,6 @@
#include <iostream>
#include <fstream>
#include <ArgvContext.hpp>
#include "../cppjieba/headers.h"
using namespace CppJieba;

View File

@ -1,5 +1,6 @@
#include <iostream>
#include <fstream>
#include <ArgvContext.hpp>
#include "../cppjieba/headers.h"
using namespace CppJieba;