2017-01-10 21:05:56 +01:00
# ---------- Java support using SWIG ----------
2018-03-02 13:41:00 +01:00
.PHONY : help_java # Generate list of Java targets with descriptions.
2018-02-23 14:55:24 +01:00
help_java :
2018-03-02 13:41:00 +01:00
@echo Use one of the following Java targets:
2018-02-27 14:49:18 +01:00
i f e q ( $( SYSTEM ) , w i n )
@tools\g rep.exe "^.PHONY: .* #" $( CURDIR) /makefiles/Makefile.java.mk | tools\s ed.exe "s/\.PHONY: \(.*\) # \(.*\)/\1\t\2/"
2018-03-06 15:03:19 +01:00
@echo off & echo(
2018-02-27 14:49:18 +01:00
e l s e
2018-02-23 14:55:24 +01:00
@grep "^.PHONY: .* #" $( CURDIR) /makefiles/Makefile.java.mk | sed "s/\.PHONY: \(.*\) # \(.*\)/\1\t\2/" | expand -t24
2018-03-06 13:58:23 +01:00
@echo
2018-02-27 14:49:18 +01:00
e n d i f
2017-01-10 21:05:56 +01:00
2018-02-23 14:55:24 +01:00
.PHONY : rjava cjava
2012-01-20 16:39:15 +00:00
2016-10-06 12:08:29 +02:00
JAVA_ORTOOLS_LIBS = $( LIB_DIR) /com.google.ortools.jar $( LIB_DIR) /$( LIB_PREFIX) jniortools.$( JNI_LIB_EXT)
2017-04-26 17:30:25 +02:00
$(GEN_DIR)/ortools/constraint_solver/constraint_solver_java_wrap.cc : $( SRC_DIR ) /ortools /constraint_solver /java /constraint_solver .i $( SRC_DIR ) /ortools /constraint_solver /java /routing .i $( SRC_DIR ) /ortools /base /base .i $( SRC_DIR ) /ortools /util /java /vector .i $( SRC_DIR ) /ortools /base /base .i $( SRC_DIR ) /ortools /util /java /proto .i $( CP_DEPS ) $( SRC_DIR ) /ortools /constraint_solver /routing .h
$( SWIG_BINARY) -I$( INC_DIR) -c++ -java -o $( GEN_DIR) $Sortools $Sconstraint_solver $Sconstraint_solver_java_wrap .cc -package com.google.ortools.constraintsolver -module operations_research_constraint_solver -outdir $( GEN_DIR) $Scom $Sgoogle $Sortools $Sconstraintsolver $( SRC_DIR) $Sortools $Sconstraint_solver $Sjava $Srouting .i
2011-04-06 13:37:23 +00:00
2017-04-26 17:30:25 +02:00
$(OBJ_DIR)/swig/constraint_solver_java_wrap.$O : $( GEN_DIR ) /ortools /constraint_solver /constraint_solver_java_wrap .cc $( CP_DEPS ) $( SRC_DIR ) /ortools /constraint_solver /routing .h
$( CCC) $( JNIFLAGS) $( JAVA_INC) -c $( GEN_DIR) $Sortools $Sconstraint_solver $Sconstraint_solver_java_wrap .cc $( OBJ_OUT) $( OBJ_DIR) $Sswig $Sconstraint_solver_java_wrap .$O
2011-04-06 13:37:23 +00:00
2017-04-26 17:30:25 +02:00
$(GEN_DIR)/ortools/algorithms/knapsack_solver_java_wrap.cc : $( SRC_DIR ) /ortools /algorithms /java /knapsack_solver .i $( SRC_DIR ) /ortools /base /base .i $( SRC_DIR ) /ortools /util /java /vector .i $( SRC_DIR ) /ortools /algorithms /knapsack_solver .h
$( SWIG_BINARY) -I$( INC_DIR) -c++ -java -o $( GEN_DIR) $Sortools $Salgorithms $Sknapsack_solver_java_wrap .cc -package com.google.ortools.algorithms -module operations_research_algorithms -outdir $( GEN_DIR) $Scom $Sgoogle $Sortools $Salgorithms $( SRC_DIR) $Sortools $Salgorithms $Sjava $Sknapsack_solver .i
2014-01-16 01:23:35 +00:00
2017-04-26 17:30:25 +02:00
$(OBJ_DIR)/swig/knapsack_solver_java_wrap.$O : $( GEN_DIR ) /ortools /algorithms /knapsack_solver_java_wrap .cc
$( CCC) $( JNIFLAGS) $( JAVA_INC) -c $( GEN_DIR) $Sortools $Salgorithms $Sknapsack_solver_java_wrap .cc $( OBJ_OUT) $( OBJ_DIR) $Sswig $Sknapsack_solver_java_wrap .$O
2014-01-16 01:23:35 +00:00
2017-04-26 17:30:25 +02:00
$(GEN_DIR)/ortools/graph/graph_java_wrap.cc : $( SRC_DIR ) /ortools /graph /java /graph .i $( SRC_DIR ) /ortools /base /base .i $( GRAPH_DEPS )
$( SWIG_BINARY) -I$( INC_DIR) -c++ -java -o $( GEN_DIR) $Sortools $Sgraph $Sgraph_java_wrap .cc -package com.google.ortools.graph -module operations_research_graph -outdir $( GEN_DIR) $Scom $Sgoogle $Sortools $Sgraph $( SRC_DIR) $Sortools $Sgraph $Sjava $Sgraph .i
2014-01-16 01:23:35 +00:00
2017-04-26 17:30:25 +02:00
$(GEN_DIR)/ortools/linear_solver/linear_solver_java_wrap.cc : $( SRC_DIR ) /ortools /linear_solver /java /linear_solver .i $( SRC_DIR ) /ortools /base /base .i $( SRC_DIR ) /ortools /util /java /vector .i $( LP_DEPS )
$( SWIG_BINARY) $( SWIG_INC) -I$( INC_DIR) -c++ -java -o $( GEN_DIR) $Sortools $Slinear_solver $Slinear_solver_java_wrap .cc -package com.google.ortools.linearsolver -module operations_research_linear_solver -outdir $( GEN_DIR) $Scom $Sgoogle $Sortools $Slinearsolver $( SRC_DIR) $Sortools $Slinear_solver $Sjava $Slinear_solver .i
2014-01-16 01:23:35 +00:00
2017-04-26 17:30:25 +02:00
$(OBJ_DIR)/swig/linear_solver_java_wrap.$O : $( GEN_DIR ) /ortools /linear_solver /linear_solver_java_wrap .cc $( LP_DEPS )
$( CCC) $( JNIFLAGS) $( JAVA_INC) -c $( GEN_DIR) $Sortools $Slinear_solver $Slinear_solver_java_wrap .cc $( OBJ_OUT) $( OBJ_DIR) $Sswig $Slinear_solver_java_wrap .$O
2014-01-16 01:23:35 +00:00
2017-04-26 17:30:25 +02:00
$(OBJ_DIR)/swig/graph_java_wrap.$O : $( GEN_DIR ) /ortools /graph /graph_java_wrap .cc $( GRAPH_DEPS )
$( CCC) $( JNIFLAGS) $( JAVA_INC) -c $( GEN_DIR) $Sortools $Sgraph $Sgraph_java_wrap .cc $( OBJ_OUT) $( OBJ_DIR) $Sswig $Sgraph_java_wrap .$O
2011-04-06 13:37:23 +00:00
2017-04-26 17:30:25 +02:00
$(GEN_DIR)/com/google/ortools/constraintsolver/SearchLimitProtobuf.java : $( SRC_DIR ) /ortools /constraint_solver /search_limit .proto
2018-05-16 13:28:12 +02:00
$( PROTOC) --proto_path= $( SRC_DIR) --java_out= $( GEN_DIR) $( SRC_DIR) $Sortools $Sconstraint_solver $Ssearch_limit .proto
2016-02-03 15:15:58 +01:00
2017-04-26 17:30:25 +02:00
$(GEN_DIR)/com/google/ortools/constraintsolver/SolverParameters.java : $( SRC_DIR ) /ortools /constraint_solver /solver_parameters .proto
2018-05-16 13:28:12 +02:00
$( PROTOC) --proto_path= $( SRC_DIR) --java_out= $( GEN_DIR) $( SRC_DIR) $Sortools $Sconstraint_solver $Ssolver_parameters .proto
2016-02-03 15:15:58 +01:00
2017-04-26 17:30:25 +02:00
$(GEN_DIR)/com/google/ortools/constraintsolver/RoutingParameters.java : $( SRC_DIR ) /ortools /constraint_solver /routing_parameters .proto
2018-05-16 13:28:12 +02:00
$( PROTOC) --proto_path= $( SRC_DIR) --java_out= $( GEN_DIR) $( SRC_DIR) $Sortools $Sconstraint_solver $Srouting_parameters .proto
2016-02-03 15:15:58 +01:00
2017-04-26 17:30:25 +02:00
$(GEN_DIR)/com/google/ortools/constraintsolver/RoutingEnums.java : $( SRC_DIR ) /ortools /constraint_solver /routing_enums .proto
2018-05-16 13:28:12 +02:00
$( PROTOC) --proto_path= $( SRC_DIR) --java_out= $( GEN_DIR) $( SRC_DIR) $Sortools $Sconstraint_solver $Srouting_enums .proto
2016-02-03 15:15:58 +01:00
2016-06-03 05:22:03 -07:00
$(LIB_DIR)/protobuf.jar : dependencies /install /lib /protobuf .jar
2016-02-03 16:07:11 +01:00
$( COPY) dependencies$Sinstall $Slib $Sprotobuf .jar $( LIB_DIR)
2014-01-16 01:23:35 +00:00
$(LIB_DIR)/com.google.ortools.jar : \
2016-02-03 16:07:11 +01:00
$( LIB_DIR) /protobuf.jar \
2017-04-26 17:30:25 +02:00
$( GEN_DIR) /ortools/constraint_solver/constraint_solver_java_wrap.cc \
$( GEN_DIR) /ortools/algorithms/knapsack_solver_java_wrap.cc \
$( GEN_DIR) /ortools/graph/graph_java_wrap.cc \
$( GEN_DIR) /ortools/linear_solver/linear_solver_java_wrap.cc \
2016-02-03 15:15:58 +01:00
$( GEN_DIR) /com/google/ortools/constraintsolver/SolverParameters.java \
$( GEN_DIR) /com/google/ortools/constraintsolver/SearchLimitProtobuf.java \
$( GEN_DIR) /com/google/ortools/constraintsolver/RoutingParameters.java \
$( GEN_DIR) /com/google/ortools/constraintsolver/RoutingEnums.java
2017-04-26 17:30:25 +02:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp lib$Sprotobuf .jar $( SRC_DIR) $Sortools $Scom $Sgoogle $Sortools $Sconstraintsolver $S *.java $( GEN_DIR) $Scom $Sgoogle $Sortools $Sconstraintsolver $S *.java $( GEN_DIR) $Scom $Sgoogle $Sortools $Salgorithms $S *.java $( GEN_DIR) $Scom $Sgoogle $Sortools $Sgraph $S *.java $( GEN_DIR) $Scom $Sgoogle $Sortools $Slinearsolver $S *.java
2014-01-16 01:23:35 +00:00
$( JAR_BIN) cf $( LIB_DIR) $Scom .google.ortools.jar -C $( OBJ_DIR) com$Sgoogle $Sortools $S
2016-06-27 22:32:11 +02:00
$(LIB_DIR)/$(LIB_PREFIX)jniortools.$(JNI_LIB_EXT) : \
2014-02-09 21:38:17 +00:00
$( OBJ_DIR) /swig/constraint_solver_java_wrap.$O \
$( OBJ_DIR) /swig/knapsack_solver_java_wrap.$O \
$( OBJ_DIR) /swig/graph_java_wrap.$O \
$( OBJ_DIR) /swig/linear_solver_java_wrap.$O \
2016-06-28 00:18:34 +02:00
$( OR_TOOLS_LIBS)
2018-05-14 17:30:40 +02:00
$( DYNAMIC_LD) $( LD_OUT) $( LIB_DIR) $S $( LIB_PREFIX) jniortools.$( JNI_LIB_EXT) $( OBJ_DIR) $Sswig $Sconstraint_solver_java_wrap .$O $( OBJ_DIR) /swig/knapsack_solver_java_wrap.$O $( OBJ_DIR) /swig/graph_java_wrap.$O $( OBJ_DIR) /swig/linear_solver_java_wrap.$O $( OR_TOOLS_LNK) $( OR_TOOLS_LDFLAGS)
2011-04-06 13:37:23 +00:00
# Java CP Examples
2016-10-06 12:08:29 +02:00
i f e q ( $( EX ) , ) # Those rules will be used if EX variable is not set
2014-06-11 22:28:04 +00:00
compile_RabbitsPheasants : $( OBJ_DIR ) /com /google /ortools /samples /RabbitsPheasants .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/RabbitsPheasants.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /RabbitsPheasants .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SRabbitsPheasants .java
2011-04-06 13:37:23 +00:00
run_RabbitsPheasants : compile_RabbitsPheasants
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.RabbitsPheasants
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_LsApi : $( OBJ_DIR ) /com /google /ortools /samples /LsApi .class
2012-07-26 17:36:11 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/LsApi.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /LsApi .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SLsApi .java
2012-07-26 17:36:11 +00:00
run_LsApi : compile_LsApi
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.LsApi
2012-07-26 17:36:11 +00:00
2014-06-11 22:28:04 +00:00
compile_GolombRuler : $( OBJ_DIR ) /com /google /ortools /samples /GolombRuler .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/GolombRuler.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /GolombRuler .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SGolombRuler .java
2011-04-06 13:37:23 +00:00
run_GolombRuler : compile_GolombRuler
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.GolombRuler
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_Partition : $( OBJ_DIR ) /com /google /ortools /samples /Partition .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/Partition.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /Partition .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SPartition .java
2011-04-06 13:37:23 +00:00
run_Partition : compile_Partition
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.Partition
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_SendMoreMoney : $( OBJ_DIR ) /com /google /ortools /samples /SendMoreMoney .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/SendMoreMoney.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /SendMoreMoney .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SSendMoreMoney .java
2011-04-06 13:37:23 +00:00
run_SendMoreMoney : compile_SendMoreMoney
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.SendMoreMoney
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_SendMoreMoney2 : $( OBJ_DIR ) /com /google /ortools /samples /SendMoreMoney 2.class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/SendMoreMoney2.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /SendMoreMoney 2.java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SSendMoreMoney2 .java
2011-04-06 13:37:23 +00:00
run_SendMoreMoney2 : compile_SendMoreMoney 2
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.SendMoreMoney2
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_LeastDiff : $( OBJ_DIR ) /com /google /ortools /samples /LeastDiff .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/LeastDiff.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /LeastDiff .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SLeastDiff .java
2011-04-06 13:37:23 +00:00
run_LeastDiff : compile_LeastDiff
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.LeastDiff
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_MagicSquare : $( OBJ_DIR ) /com /google /ortools /samples /MagicSquare .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/MagicSquare.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /MagicSquare .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SMagicSquare .java
2011-04-06 13:37:23 +00:00
run_MagicSquare : compile_MagicSquare
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.MagicSquare
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_NQueens : $( OBJ_DIR ) /com /google /ortools /samples /NQueens .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/NQueens.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /NQueens .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SNQueens .java
2011-04-06 13:37:23 +00:00
run_NQueens : compile_NQueens
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.NQueens
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_NQueens2 : $( OBJ_DIR ) /com /google /ortools /samples /NQueens 2.class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/NQueens2.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /NQueens 2.java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SNQueens2 .java
2011-04-06 13:37:23 +00:00
run_NQueens2 : compile_NQueens 2
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.NQueens2
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_AllDifferentExcept0 : $( OBJ_DIR ) /com /google /ortools /samples /AllDifferentExcept 0.class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/AllDifferentExcept0.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /AllDifferentExcept 0.java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SAllDifferentExcept0 .java
2011-04-06 13:37:23 +00:00
run_AllDifferentExcept0 : compile_AllDifferentExcept 0
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.AllDifferentExcept0
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_Diet : $( OBJ_DIR ) /com /google /ortools /samples /Diet .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/Diet.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /Diet .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SDiet .java
2011-04-06 13:37:23 +00:00
run_Diet : compile_Diet
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.Diet
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_Map : $( OBJ_DIR ) /com /google /ortools /samples /Map .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/Map.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /Map .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SMap .java
2011-04-06 13:37:23 +00:00
run_Map : compile_Map
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.Map
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_Map2 : $( OBJ_DIR ) /com /google /ortools /samples /Map 2.class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/Map2.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /Map 2.java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SMap2 .java
2011-04-06 13:37:23 +00:00
run_Map2 : compile_Map 2
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.Map2
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_Minesweeper : $( OBJ_DIR ) /com /google /ortools /samples /Minesweeper .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/Minesweeper.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /Minesweeper .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SMinesweeper .java
2011-04-06 13:37:23 +00:00
run_Minesweeper : compile_Minesweeper
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.Minesweeper
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_QuasigroupCompletion : $( OBJ_DIR ) /com /google /ortools /samples /QuasigroupCompletion .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/QuasigroupCompletion.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /QuasigroupCompletion .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SQuasigroupCompletion .java
2011-04-06 13:37:23 +00:00
run_QuasigroupCompletion : compile_QuasigroupCompletion
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.QuasigroupCompletion
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_SendMostMoney : $( OBJ_DIR ) /com /google /ortools /samples /SendMostMoney .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/SendMostMoney.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /SendMostMoney .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SSendMostMoney .java
2011-04-06 13:37:23 +00:00
run_SendMostMoney : compile_SendMostMoney
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.SendMostMoney
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_Seseman : $( OBJ_DIR ) /com /google /ortools /samples /Seseman .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/Seseman.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /Seseman .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SSeseman .java
2011-04-06 13:37:23 +00:00
run_Seseman : compile_Seseman
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.Seseman
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_Sudoku : $( OBJ_DIR ) /com /google /ortools /samples /Sudoku .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/Sudoku.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /Sudoku .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SSudoku .java
2011-04-06 13:37:23 +00:00
run_Sudoku : compile_Sudoku
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.Sudoku
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_Tsp : $( OBJ_DIR ) /com /google /ortools /samples /Tsp .class
2012-05-02 20:00:03 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/Tsp.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /Tsp .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $STsp .java
2012-05-02 20:00:03 +00:00
run_Tsp : compile_Tsp
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.Tsp $( ARGS)
2011-04-06 13:37:23 +00:00
2013-10-27 20:24:38 +00:00
compile_CapacitatedVehicleRoutingProblemWithTimeWindows : $( OBJ_DIR ) /com /google /ortools /samples /CapacitatedVehicleRoutingProblemWithTimeWindows .class
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/CapacitatedVehicleRoutingProblemWithTimeWindows.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /CapacitatedVehicleRoutingProblemWithTimeWindows .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SCapacitatedVehicleRoutingProblemWithTimeWindows .java
2013-10-27 20:24:38 +00:00
run_CapacitatedVehicleRoutingProblemWithTimeWindows : compile_CapacitatedVehicleRoutingProblemWithTimeWindows
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.CapacitatedVehicleRoutingProblemWithTimeWindows $( ARGS)
2013-10-27 20:24:38 +00:00
2014-06-11 22:28:04 +00:00
compile_Xkcd : $( OBJ_DIR ) /com /google /ortools /samples /Xkcd .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/Xkcd.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /Xkcd .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SXkcd .java
2011-04-06 13:37:23 +00:00
run_Xkcd : compile_Xkcd
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.Xkcd
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_SurvoPuzzle : $( OBJ_DIR ) /com /google /ortools /samples /SurvoPuzzle .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/SurvoPuzzle.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /SurvoPuzzle .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SSurvoPuzzle .java
2011-04-06 13:37:23 +00:00
run_SurvoPuzzle : compile_SurvoPuzzle
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.SurvoPuzzle
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_Circuit : $( OBJ_DIR ) /com /google /ortools /samples /Circuit .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/Circuit.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /Circuit .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SCircuit .java
2011-04-06 13:37:23 +00:00
run_Circuit : compile_Circuit
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.Circuit
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_CoinsGrid : $( OBJ_DIR ) /com /google /ortools /samples /CoinsGrid .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/CoinsGrid.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /CoinsGrid .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SCoinsGrid .java
2011-04-06 13:37:23 +00:00
run_CoinsGrid : compile_CoinsGrid
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.CoinsGrid
2011-04-06 13:37:23 +00:00
# Java Algorithms Examples
2014-06-11 22:28:04 +00:00
compile_Knapsack : $( OBJ_DIR ) /com /google /ortools /samples /Knapsack .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/Knapsack.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /Knapsack .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SKnapsack .java
2011-04-06 13:37:23 +00:00
run_Knapsack : compile_Knapsack
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.Knapsack
2011-04-06 13:37:23 +00:00
# Java Algorithms Examples
2014-06-11 22:28:04 +00:00
compile_FlowExample : $( OBJ_DIR ) /com /google /ortools /samples /FlowExample .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/FlowExample.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /FlowExample .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SFlowExample .java
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
run_FlowExample : compile_FlowExample $( JAVA_ORTOOLS_LIBS )
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.FlowExample
2012-01-10 14:16:39 +00:00
2014-06-11 22:28:04 +00:00
compile_LinearAssignmentAPI : $( OBJ_DIR ) /com /google /ortools /samples /LinearAssignmentAPI .class
2012-01-10 14:16:39 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/LinearAssignmentAPI.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /LinearAssignmentAPI .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) com$Sgoogle $Sortools $Ssamples $SLinearAssignmentAPI .java
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
run_LinearAssignmentAPI : compile_LinearAssignmentAPI $( JAVA_ORTOOLS_LIBS )
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.LinearAssignmentAPI
2011-04-06 13:37:23 +00:00
2012-01-09 14:44:31 +00:00
# Java Linear Programming Examples
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_LinearProgramming : $( OBJ_DIR ) /com /google /ortools /samples /LinearProgramming .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/LinearProgramming.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /LinearProgramming .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SLinearProgramming .java
2011-04-06 13:37:23 +00:00
2011-11-07 15:29:46 +00:00
run_LinearProgramming : compile_LinearProgramming
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.LinearProgramming
2011-04-06 13:37:23 +00:00
2014-06-11 22:28:04 +00:00
compile_IntegerProgramming : $( OBJ_DIR ) /com /google /ortools /samples /IntegerProgramming .class
2011-04-06 13:37:23 +00:00
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/IntegerProgramming.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /IntegerProgramming .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SIntegerProgramming .java
2011-04-06 13:37:23 +00:00
2011-11-07 15:29:46 +00:00
run_IntegerProgramming : compile_IntegerProgramming
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Xss2048k -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.IntegerProgramming
2012-01-08 18:57:31 +00:00
2016-04-14 13:23:00 +02:00
compile_Issue173 : $( OBJ_DIR ) /com /google /ortools /samples /Issue 173.class
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/Issue173.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /Issue 173.java
2016-04-14 13:23:00 +02:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SIssue173 .java
run_Issue173 : compile_Issue 173
$( JAVA_BIN) -Xss2048k -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.Issue173
2015-06-18 14:26:33 +02:00
# Integer programming Coin-CBC section
run_MultiThreadIntegerProgramming : compile_MultiThreadIntegerProgramming
2016-02-03 16:07:11 +01:00
$( JAVA_BIN) -Xss2048k -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar com.google.ortools.samples.MultiThreadTest
2015-06-18 14:26:33 +02:00
compile_MultiThreadIntegerProgramming : $( OBJ_DIR ) /com /google /ortools /samples /MultiThreadTest .class
2016-10-06 12:08:29 +02:00
$(OBJ_DIR)/com/google/ortools/samples/MultiThreadTest.class : $( JAVA_ORTOOLS_LIBS ) $( EX_DIR ) /com /google /ortools /samples /MultiThreadTest .java
2016-02-03 16:07:11 +01:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_DIR) $Scom $Sgoogle $Sortools $Ssamples $SMultiThreadTest .java
2015-06-18 14:26:33 +02:00
2012-01-25 15:24:01 +00:00
# Compile and Run CP java example:
2016-10-06 12:08:29 +02:00
e l s e # This generic rule will be used if EX variable is set
2016-09-29 18:50:59 +02:00
i f e q ( $( SYSTEM ) , w i n )
EX_read_package = $( shell findstr /r "^package.*\;" $( EX) )
e l s e
EX_read_package = $( shell grep '^package.*\;' $( EX) )
e n d i f
EX_name = $( basename $( notdir $( EX) ) )
EX_package = $( subst ; ,,$( subst package ,,$( EX_read_package) ) )
i f e q ( $( EX_read_package ) , )
EX_class_file = $( OBJ_DIR) $S $( EX_name) .class
EX_class = $( EX_name)
e l s e
EX_class_file = $( OBJ_DIR) $S $( subst .,$S ,$( EX_package) ) $S $( EX_name) .class
EX_class = $( EX_package) .$( EX_name)
2016-10-06 12:08:29 +02:00
$(EX_class_file) : $( JAVA_ORTOOLS_LIBS ) $( EX )
2016-09-29 18:50:59 +02:00
$( JAVAC_BIN) -d $( OBJ_DIR) -cp $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX)
cjava : $( EX_class_file )
2016-10-06 12:08:29 +02:00
rjava : $( EX_class_file ) $( JAVA_ORTOOLS_LIBS )
2016-09-29 18:50:59 +02:00
$( JAVA_BIN) -Djava.library.path= $( LIB_DIR) -cp $( OBJ_DIR) $( CPSEP) $( LIB_DIR) $Scom .google.ortools.jar$( CPSEP) $( LIB_DIR) $Sprotobuf .jar $( EX_class) $( ARGS)
e n d i f
2016-10-06 12:08:29 +02:00
2017-01-11 19:12:16 +01:00
e n d i f # ifeq ($(EX),)
# Main target
2018-02-23 14:55:24 +01:00
.PHONY : java # Build Java OR-Tools.
.PHONY : test_java # Test Java OR-Tools using various examples.
2018-03-07 17:47:37 +01:00
i f e q ( $( JAVA_BIN ) , )
2017-01-11 19:12:16 +01:00
java :
2018-03-07 17:47:37 +01:00
$@ echo JAVA_HOME = ${ JAVA_HOME }
2018-02-23 14:55:24 +01:00
$@ echo JAVA_BIN = ${ JAVA_BIN }
$( warning Cannot find 'java' command which is needed for build. Please make sure it is installed and in system path. Check Makefile.local for more information.)
2017-01-11 19:12:16 +01:00
test_java : java
e l s e
2018-03-06 11:42:06 +01:00
java : ortoolslibs $( JAVA_ORTOOLS_LIBS )
2017-01-11 19:12:16 +01:00
test_java : test_java_examples
2018-02-23 14:55:24 +01:00
BUILT_LANGUAGES += , Java
2017-01-11 19:12:16 +01:00
e n d i f
2018-02-23 14:55:24 +01:00
.PHONY : clean_java # Clean Java output from previous build.
2017-01-11 19:12:16 +01:00
clean_java :
-$( DEL) $( LIB_DIR) $S $( LIB_PREFIX) jni*.$( JNI_LIB_EXT)
-$( DEL) $( LIB_DIR) $S *.jar
-$( DEL) $( GEN_DIR) $Scom $Sgoogle $Sortools $Sconstraintsolver $S *.java
-$( DEL) $( GEN_DIR) $Scom $Sgoogle $Sortools $Sgraph $S *.java
-$( DEL) $( GEN_DIR) $Scom $Sgoogle $Sortools $Salgorithms $S *.java
-$( DEL) $( GEN_DIR) $Scom $Sgoogle $Sortools $Slinearsolver $S *.java
2017-04-26 17:30:25 +02:00
-$( DEL) $( GEN_DIR) $Sortools $Salgorithms $S *java_wrap*
-$( DEL) $( GEN_DIR) $Sortools $Sconstraint_solver $S *java_wrap*
-$( DEL) $( GEN_DIR) $Sortools $Sgraph $S *java_wrap*
-$( DEL) $( GEN_DIR) $Sortools $Slinear_solver $S *java_wrap*
2017-01-11 19:12:16 +01:00
-$( DEL) $( OBJ_DIR) $Scom $Sgoogle $Sortools $Sconstraintsolver $S *.class
-$( DEL) $( OBJ_DIR) $Scom $Sgoogle $Sortools $Sgraph $S *.class
-$( DEL) $( OBJ_DIR) $Scom $Sgoogle $Sortools $Salgorithms $S *.class
-$( DEL) $( OBJ_DIR) $Scom $Sgoogle $Sortools $Slinearsolver $S *.class
-$( DEL) $( OBJ_DIR) $Scom $Sgoogle $Sortools $Ssamples $S *.class
2017-04-09 21:56:47 +02:00
-$( DEL) $( OBJ_DIR) $Sswig $S *java_wrap.$O
2018-02-23 14:55:24 +01:00
.PHONY : detect_java # Show variables used to build Java OR-Tools.
detect_java :
2018-03-06 14:34:17 +01:00
@echo Relevant info for the Java build:
2018-03-07 17:47:37 +01:00
@echo JAVA_HOME = $( JAVA_HOME)
2018-02-23 14:55:24 +01:00
@echo JAVA_BIN = $( JAVA_BIN)
@echo JAVA_INC = $( JAVA_INC)
@echo JAVAC_BIN = $( JAVAC_BIN)
@echo JAR_BIN = $( JAR_BIN)
2018-03-02 16:40:31 +01:00
@echo JNIFLAGS = $( JNIFLAGS)
2018-03-06 14:34:17 +01:00
i f e q ( $( SYSTEM ) , w i n )
2018-03-06 15:03:19 +01:00
@echo off & echo(
2018-03-06 14:34:17 +01:00
e l s e
@echo
e n d i f