mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
update cppcommon -> limonp
This commit is contained in:
parent
b30605e410
commit
2e22f6ed9d
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
tags
|
||||
*.demo
|
||||
*swp
|
||||
*.out
|
||||
*.o
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <ArgvContext.hpp>
|
||||
#include "../cppjieba/headers.h"
|
||||
|
||||
using namespace CppJieba;
|
@ -1,5 +1,6 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <ArgvContext.hpp>
|
||||
#include "../cppjieba/headers.h"
|
||||
|
||||
using namespace CppJieba;
|
Loading…
x
Reference in New Issue
Block a user