Announce

PukiWiki contents have been moved into SONOTS Plugin (20070703)

OMake

OMakeの導入方法

http://omake.metaprl.org/manual/omake-build.html

$ omake --install
$ omake
$ omake -P
Table of Contents

MinGW

$ vim OMakeroot
+OSTYPE = msys
 open build/C

msys even if you use MinGW on cygwin not on MSYS.

$ vim OMakefile
CXXFLAGS += -g -Wall
LDFLAGS += -L"C:\Program Files\OpenCV\lib" -lcxcore -lcv -lhighgui -lcvaux -lml
PREFIXED_INCLUDES += -I. -I"C:\Program Files\OpenCV\cv\include" -I"C:\Program Files\OpenCV\cvaux\include" -I"C:\Program Files\OpenCV\cxcore\include" -I"C:\Program Files\OpenCV\otherlibs\highgui"

CXXFILES[] =
   pamtracker
   wingetopt
   ConfigFile

MAIN = pamtracker.exe

.DEFAULT: $(CXXProgram $(MAIN), $(CXXFILES))

.SUBDIR

OMakefile

 .SUBDIR others
 ....
CXXFILES[] =
   pamtracker
LIBS[] =
   others/libothers

MAIN = pamtracker.exe

.DEFAULT: $(CXXProgram $(MAIN), $(CXXFILES))

others/OMakefile

cp CXXFLAGS and so on.

CXXFILES[] =
   wingetopt
   ConfigFile

LIB = libothers

.DEFAULT: $(StaticCXXLibrary $(LIB), $(CXXFILES))

LaTeX

 LATEX = latex
 DVIPDFM = dvipdfm

 TEXDEPS[] = introduction.tex
            methods.tex
            results.tex
     ../texmf-local/bibtex/bib/thesis.bib
 LaTeXDocument(WChapter3, WChapter3 Chapter3)
 .DEFAULT: WChapter3.pdf WChapter3.dvi

 TEXDEPS[] = introduction.tex
            methods.tex
            results.tex
     ../texmf-local/bibtex/bib/thesis.bib
 LaTeXDocument(WChapter1, WChapter1)
 .DEFAULT: WChapter1.pdf

pkg-config

pkg-config等を使ってパスを指定しているものは$(shell hoge)のように囲って評価してやる必要があるようです。

以下、例

   CFLAGS += -ggdb -pg -std=gnu99 -O4 -Wall -funroll-all-loops -march=i686 -pipe -std=gnu99 $(shell pkg-config --cflags gtk+-2.0) $(shell pkg-config --cflags opencv)
   LDFLAGS += $(shell pkg-config --libs gthread-2.0 gtk+-2.0) $(shell pkg-config --libs opencv)