Skip to content

Commit

Permalink
add build files for use with nmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Glenn committed Feb 16, 2016
1 parent 51b48a9 commit 934a795
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
25 changes: 25 additions & 0 deletions java/Makefile.msvc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
TARGET=crfpp
JAVAC=javac
JAVA=java
JAR=jar
CXX=cl
INC=/I"$(JAVA_HOME)\include\win32" /I"$(JAVA_HOME)\include" /I..
OBJS=..\crf_learn.obj ..\encoder.obj ..\feature.obj ..\feature_cache.obj ..\feature_index.obj ..\lbfgs.obj ..\libcrfpp.obj ..\node.obj ..\param.obj ..\path.obj ..\tagger.obj

PACKAGE=org\chasen\crfpp

all:
set INCLUDE
$(CXX) $(INC) /LD $(TARGET)_wrap.cxx $(OBJS) /Fe$(TARGET).dll
$(JAVAC) $(PACKAGE)/*.java
$(JAVAC) test.java
$(JAR) cfv $(TARGET).jar $(PACKAGE)\*.class

test:
$(JAVA) -Djava.library.path=. test

clean:
del *.jar *.exp *.lib *.dll *.class $(PACKAGE)\*.class

cleanall:
del $(TARGET).java *.cxx
36 changes: 36 additions & 0 deletions swig/Makefile.win
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
SWIG = swig
PREFIX = CRFPP

all: perl ruby python java

clean:
del *.pm *.cxx *.py

perl:
$(SWIG) -perl -shadow -c++ $(PREFIX).i
move /Y $(PREFIX)_wrap.cxx ../perl
move /Y $(PREFIX).pm ../perl

ruby:
$(SWIG) -ruby -c++ $(PREFIX).i
move /Y $(PREFIX)_wrap.cxx ../ruby/$(PREFIX)_wrap.cpp

python:
$(SWIG) -python -shadow -c++ $(PREFIX).i
move /Y $(PREFIX)_wrap.cxx ../python
move /Y $(PREFIX).py ../python

csharp:
$(SWIG) -csharp -namespace CRFPP -c++ $(PREFIX).i
move /Y $(PREFIX)_wrap.cxx ../csharp
move /Y *.cs ../csharp

java:
$(SWIG) -java -package org.chasen.crfpp -c++ $(PREFIX).i
if not exist ../java/org/chasen/crfpp mkdir ../java/org/chasen/crfpp
move /Y $(PREFIX)_wrap.cxx ../java
# rm -fr exception.java SWIGTYPE_*.java
move /Y *.java ../java/org/chasen/crfpp



0 comments on commit 934a795

Please sign in to comment.