This repository has been archived by the owner on Oct 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michal Szymaniak
authored and
Michal Szymaniak
committed
Oct 21, 2018
0 parents
commit 8fb7eb6
Showing
127 changed files
with
34,331 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
*.o | ||
*.d | ||
*.a | ||
*.so | ||
*.dll | ||
*.res | ||
*.pyc | ||
*.pyd | ||
*.log | ||
*.srt | ||
*.words | ||
*.dict | ||
*.sqlite3 | ||
*.pot | ||
*.vim | ||
*.dot | ||
tags | ||
.envrc | ||
*.depend | ||
*.layout | ||
*.exe | ||
*.msi | ||
.env | ||
CppCheckResults.xml |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
config.mk | ||
ycm_flags.py | ||
test/tests | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import ycm_core | ||
|
||
def FlagsForFile(filename): | ||
try: | ||
from ycm_flags import flags | ||
except: | ||
flags = [ '-x', 'c++', '-Wall', '-Wextra', '-std=c++11', '-I.' ] | ||
|
||
return { | ||
'flags': flags, | ||
'do_cache': True | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
############################################ | ||
### load platform specific configuration ### | ||
############################################ | ||
|
||
ifndef CFG | ||
CFG = config.mk | ||
ifeq (,$(wildcard $(CFG))) | ||
$(info $(CFG) file not found, using auto configuration) | ||
$(info ) | ||
CFG = config/auto.mk | ||
endif | ||
endif | ||
|
||
include $(CFG) | ||
|
||
|
||
##################################### | ||
### default targets configuration ### | ||
##################################### | ||
|
||
CXXFLAGS_REL ?= -O3 \ | ||
-g \ | ||
-fomit-frame-pointer \ | ||
-fexpensive-optimizations \ | ||
-DNDEBUG \ | ||
|
||
CXXFLAGS_DBG ?= -O0 \ | ||
-g \ | ||
|
||
CXXFLAGS_PROF ?= -O3 \ | ||
-pg \ | ||
-fexpensive-optimizations \ | ||
-DNDEBUG \ | ||
|
||
|
||
#################################### | ||
### default global configuration ### | ||
#################################### | ||
LIB_SUFFIX ?= .so | ||
PREFIX ?= /usr/local | ||
TARGET ?= ../subsync/gizmo$(LIB_SUFFIX) | ||
|
||
|
||
CXXFLAGS += \ | ||
-Wall \ | ||
-Wextra \ | ||
-pedantic \ | ||
-fPIC \ | ||
-std=c++14 \ | ||
-fvisibility=hidden \ | ||
-I. \ | ||
|
||
LDFLAGS += \ | ||
-Wl,--as-needed \ | ||
|
||
|
||
###################### | ||
### artifact files ### | ||
###################### | ||
|
||
SOURCES = \ | ||
extractor.cpp \ | ||
correlator.cpp \ | ||
media/demux.cpp \ | ||
media/stream.cpp \ | ||
media/audiodec.cpp \ | ||
media/audioresampler.cpp \ | ||
media/audiodmx.cpp \ | ||
media/subdec.cpp \ | ||
media/speechrec.cpp \ | ||
text/translator.cpp \ | ||
text/dictionary.cpp \ | ||
text/utf8.cpp \ | ||
text/wordsqueue.cpp \ | ||
math/point.cpp \ | ||
math/line.cpp \ | ||
math/linefinder.cpp \ | ||
general/exception.cpp \ | ||
general/logger.cpp \ | ||
python/wrapper.cpp \ | ||
python/general.cpp \ | ||
python/extractor.cpp \ | ||
python/media.cpp \ | ||
python/stream.cpp \ | ||
python/correlator.cpp \ | ||
python/translator.cpp \ | ||
|
||
OBJECTS = $(SOURCES:.cpp=.o) | ||
|
||
DEPENDS = $(SOURCES:.cpp=.d) | ||
|
||
|
||
##################### | ||
### build recipes ### | ||
##################### | ||
|
||
all: rel | ||
|
||
rel: CXXFLAGS += $(CXXFLAGS_REL) | ||
rel: LDFLAGS += $(LDFLAGS_REL) | ||
rel: $(TARGET) | ||
$(info RELEASE target done) | ||
|
||
dbg: CXXFLAGS += $(CXXFLAGS_DBG) | ||
dbg: LDFLAGS += $(LDFLAGS_DBG) | ||
dbg: $(TARGET) | ||
$(info DEBUG target done) | ||
|
||
prof: CXXFLAGS += $(CXXFLAGS_PROF) | ||
prof: LDFLAGS += $(LDFLAGS_PROF) | ||
prof: $(TARGET) | ||
$(info PROFILE target done) | ||
|
||
clean: | ||
$(RM) $(OBJECTS) | ||
$(RM) $(DEPENDS) | ||
$(RM) $(TARGET) | ||
|
||
|
||
-include $(DEPENDS) | ||
|
||
$(OBJECTS): %.o: %.cpp | ||
$(CXX) -c -o $@ $< $(CXXFLAGS) | ||
$(CXX) -MM $(CXXFLAGS) $*.cpp -MF $*.d -MQ $@ | ||
|
||
|
||
$(TARGET): $(OBJECTS) | ||
$(CXX) -shared -o $@ $^ $(LDFLAGS) | ||
|
||
|
||
ycm_flags.py: .FORCE | ||
@echo "flags = '$(CXXFLAGS) $(LDFLAGS)'.split()" > $@ | ||
|
||
-include test/test.mk | ||
|
||
.PHONY: all build clean | ||
.PHONY: rel dbg prof | ||
.PHONY: .FORCE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ifeq ($(OS),Windows_NT) | ||
include config/windows.mk | ||
else | ||
UNAME_S := $(shell uname -s) | ||
ifeq ($(UNAME_S),Linux) | ||
include config/linux.mk | ||
else ifeq ($(UNAME_S),Darwin) | ||
include config/macos.mk | ||
else | ||
$(error cannot detect architecture, you must select configuration manually) | ||
endif | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
PYTHON_PREFIX ?= python | ||
|
||
LIBS += \ | ||
pocketsphinx \ | ||
sphinxbase \ | ||
libavdevice \ | ||
libavformat \ | ||
libavfilter \ | ||
libavcodec \ | ||
libswresample \ | ||
libswscale \ | ||
libavutil \ | ||
|
||
CXXFLAGS += $(shell pkg-config --cflags $(LIBS)) | ||
LDFLAGS += $(shell pkg-config --libs $(LIBS)) | ||
|
||
CXXFLAGS += $(shell $(PYTHON_PREFIX) -m pybind11 --includes) | ||
|
||
LIB_SUFFIX ?= $(shell $(PYTHON_PREFIX)-config --extension-suffix) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
LIB_SUFFIX ?= .pyd | ||
|
||
CXXFLAGS += \ | ||
-I$(POCKETSPHINX)\include \ | ||
-I$(SPHINXBASE)\include \ | ||
-I$(SPHINXBASE)\include\win32 \ | ||
-I$(FFMPEG)\include \ | ||
-D__STDC_CONSTANT_MACROS | ||
|
||
LDFLAGS += \ | ||
-lsphinxbase \ | ||
-lpocketsphinx \ | ||
-L$(POCKETSPHINX)\bin\Release\x64 \ | ||
-L$(SPHINXBASE)\bin\Release\x64 \ | ||
-lavdevice \ | ||
-lavformat \ | ||
-lavfilter \ | ||
-lavcodec \ | ||
-lswresample \ | ||
-lswscale \ | ||
-lavutil \ | ||
-L$(FFMPEG)\lib \ | ||
$(PYTHONLIB) \ | ||
|
||
CXXFLAGS += $(shell python -m pybind11 --includes) |
Oops, something went wrong.