-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
1685 lines (1521 loc) · 59.1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
#* *
#* This file is part of the program and library *
#* SCIP --- Solving Constraint Integer Programs *
#* *
#* Copyright (C) 2002-2019 Konrad-Zuse-Zentrum *
#* fuer Informationstechnik Berlin *
#* *
#* SCIP is distributed under the terms of the ZIB Academic License. *
#* *
#* You should have received a copy of the ZIB Academic License *
#* along with SCIP; see the file COPYING. If not email to [email protected]. *
#* *
#* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
#@file Makefile
#@brief SCIP Makefile
#@author Thorsten Koch
#@author Tobias Achterberg
#@author Marc Pfetsch
#@author Timo Berthold
#-----------------------------------------------------------------------------
# paths variables
#-----------------------------------------------------------------------------
SCIPDIR = ./
INSTALLDIR =
#-----------------------------------------------------------------------------
# include make.project file
#-----------------------------------------------------------------------------
# do not use other open source projects; needs to be set before including make.project
ifeq ($(OPENSOURCE),false)
override EXPRINT = none
override GMP = false
override READLINE = false
override ZLIB = false
override ZIMPL = false
override IPOPT = false
endif
# mark that this is a SCIP internal makefile
SCIPINTERNAL = true
# use PARASCIP=true if compiled with TPI not equal to none
ifeq ($(TPI),omp)
override PARASCIP = true
endif
ifeq ($(TPI),tny)
override PARASCIP = true
endif
# load default settings and detect host architecture
include $(SCIPDIR)/make/make.project
#-----------------------------------------------------------------------------
# default settings
#-----------------------------------------------------------------------------
VERSION = $(SCIP_VERSION)
SCIPGITHASH =
SOFTLINKS =
MAKESOFTLINKS = true
TOUCHLINKS = false
#-----------------------------------------------------------------------------
# define build flags
#-----------------------------------------------------------------------------
BUILDFLAGS = " ARCH=$(ARCH)\\n\
COMP=$(COMP)\\n\
DEBUGSOL=$(DEBUGSOL)\\n\
EXPRINT=$(EXPRINT)\\n\
GAMS=$(GAMS)\\n\
SYM=$(SYM)\\n\
GMP=$(GMP)\\n\
IPOPT=$(IPOPT)\\n\
IPOPTOPT=$(IPOPTOPT)\\n\
WORHP=$(WORHP)\\n\
WORHPOPT=$(WORHPOPT)\\n\
LPS=$(LPS)\\n\
LPSCHECK=$(LPSCHECK)\\n\
LPSOPT=$(LPSOPT)\\n\
NOBLKBUFMEM=$(NOBLKBUFMEM)\\n\
NOBLKMEM=$(NOBLKMEM)\\n\
NOBUFMEM=$(NOBUFMEM)\\n\
OPT=$(OPT)\\n\
OSTYPE=$(OSTYPE)\\n\
PARASCIP=$(PARASCIP)\\n\
READLINE=$(READLINE)\\n\
SANITIZE=$(SANITIZE)\\n\
SHARED=$(SHARED)\\n\
USRARFLAGS=$(USRARFLAGS)\\n\
USRCFLAGS=$(USRCFLAGS)\\n\
USRCXXFLAGS=$(USRCXXFLAGS)\\n\
USRDFLAGS=$(USRDFLAGS)\\n\
USRFLAGS=$(USRFLAGS)\\n\
USRLDFLAGS=$(USRLDFLAGS)\\n\
USROFLAGS=$(USROFLAGS)\\n\
VERSION=$(VERSION)\\n\
ZIMPL=$(ZIMPL)\\n\
ZIMPLOPT=$(ZIMPLOPT)\\n\
ZLIB=$(ZLIB)"
#-----------------------------------------------------------------------------
# LP Solver Interface
#-----------------------------------------------------------------------------
LPILIBSHORTNAME = lpi$(LPS)
LPILIBNAME = $(LPILIBSHORTNAME)-$(VERSION)
LPILIBOBJ =
LPSOPTIONS =
LPIINSTMSG =
LPSCHECKDEP := $(SRCDIR)/depend.lpscheck
LPSCHECKSRC := $(shell cat $(LPSCHECKDEP))
LPSOPTIONS += cpx
ifeq ($(LPS),cpx)
FLAGS += -I$(LIBDIR)/include/cpxinc
LPILIBOBJ = lpi/lpi_cpx.o scip/bitencode.o blockmemshell/memory.o scip/rbtree.o scip/message.o
LPILIBSRC = $(addprefix $(SRCDIR)/,$(LPILIBOBJ:.o=.c))
SOFTLINKS += $(LIBDIR)/include/cpxinc
ifeq ($(SHARED),true)
SOFTLINKS += $(LIBDIR)/shared/libcplex.$(OSTYPE).$(ARCH).$(COMP).$(SHAREDLIBEXT)
else
SOFTLINKS += $(LIBDIR)/static/libcplex.$(OSTYPE).$(ARCH).$(COMP).$(STATICLIBEXT)
endif
LPIINSTMSG = " -> \"cpxinc\" is the path to the CPLEX \"include\" directory, e.g., \"<CPLEX-path>/include/ilcplex\".\n"
LPIINSTMSG += " -> \"libcplex.*.a\" is the path to the CPLEX library, e.g., \"<CPLEX-path>/lib/x86-64_linux/static_pic/libcplex.a\"\n"
LPIINSTMSG += " -> \"libcplex.*.so\" is the path to the CPLEX library, e.g., \"<CPLEX-path>/bin/x86-64_linux/libcplex1263.so\""
endif
# XPRESS is only available as shared library
LPSOPTIONS += xprs
ifeq ($(LPS),xprs)
FLAGS += -I$(LIBDIR)/include/xprsinc
LPILIBOBJ = lpi/lpi_xprs.o scip/bitencode.o blockmemshell/memory.o scip/rbtree.o scip/message.o
LPILIBSRC = $(addprefix $(SRCDIR)/,$(LPILIBOBJ:.o=.c))
SOFTLINKS += $(LIBDIR)/include/xprsinc
SOFTLINKS += $(LIBDIR)/shared/libxprs.$(OSTYPE).$(ARCH).$(COMP).$(SHAREDLIBEXT)
LPIINSTMSG = " -> \"xprsinc\" is the path to the XPRESS \"include\" directory, e.g., \"<XPRESS-path>/include\".\n"
LPIINSTMSG += " -> \"libxprs.*\" is the path to the XPRESS library, e.g., \"<XPRESS-path>/lib/libxprs.so\""
endif
# mosek only supports shared libraries
LPSOPTIONS += msk
ifeq ($(LPS),msk)
FLAGS += -I$(LIBDIR)/include/mskinc
LPILIBOBJ = lpi/lpi_msk.o scip/bitencode.o blockmemshell/memory.o scip/rbtree.o scip/message.o
LPILIBSRC = $(addprefix $(SRCDIR)/,$(LPILIBOBJ:.o=.c))
SOFTLINKS += $(LIBDIR)/include/mskinc
SOFTLINKS += $(LIBDIR)/shared/libmosek.$(OSTYPE).$(ARCH).$(COMP).$(SHAREDLIBEXT)
SOFTLINKS += $(LIBDIR)/shared/libiomp5.$(OSTYPE).$(ARCH).$(COMP).$(SHAREDLIBEXT)
LPIINSTMSG = " -> \"mskinc\" is the path to the Mosek \"include\" directory, e.g., \"<Mosek-path>/tools/platform/linux64x86/h\".\n"
LPIINSTMSG += " -> \"libmosek.*\" is the path to the Mosek library, e.g., \"<Mosek-path>/tools/platform/linux64x86/bin/libmosek64.so\".\n"
LPIINSTMSG += " -> \"libiomp5.*\" is the path to the libiomp5, e.g., \"<Mosek-path>/tools/platform/linux64x86/bin/libiomp5.so\""
endif
LPSOPTIONS += spx1
ifeq ($(LPS),spx1)
LINKER = CPP
FLAGS += -I$(LIBDIR)/include/spxinc
LPILIBOBJ = lpi/lpi_spx1.o scip/bitencode.o blockmemshell/memory.o scip/rbtree.o scip/message.o
LPILIBSRC = $(SRCDIR)/lpi/lpi_spx1.cpp $(SRCDIR)/scip/bitencode.c $(SRCDIR)/blockmemshell/memory.c $(SRCDIR)/scip/message.c
SOFTLINKS += $(LIBDIR)/include/spxinc
ifeq ($(SHARED),true)
SOFTLINKS += $(LIBDIR)/shared/libsoplex.$(OSTYPE).$(ARCH).$(COMP).$(LPSOPT).$(SHAREDLIBEXT)
else
SOFTLINKS += $(LIBDIR)/static/libsoplex.$(OSTYPE).$(ARCH).$(COMP).$(LPSOPT).$(STATICLIBEXT)
endif
LPIINSTMSG = " -> \"spxinc\" is the path to the SoPlex \"src\" directory, e.g., \"<SoPlex-path>/src\".\n"
LPIINSTMSG += " -> \"libsoplex.*\" is the path to the SoPlex library, e.g., \"<SoPlex-path>/lib/libsoplex.$(OSTYPE).$(ARCH).$(COMP).$(LPSOPT).$(STATICLIBEXT)\""
ifeq ($(LPSCHECK),true)
FLAGS += -DSCIP_WITH_LPSCHECK -I$(LIBDIR)/include/cpxinc
SOFTLINKS += $(LIBDIR)/include/cpxinc
ifeq ($(SHARED),true)
SOFTLINKS += $(LIBDIR)/shared/libcplex.$(OSTYPE).$(ARCH).$(COMP).$(SHAREDLIBEXT)
else
SOFTLINKS += $(LIBDIR)/static/libcplex.$(OSTYPE).$(ARCH).$(COMP).$(STATICLIBEXT)
endif
LPIINSTMSG += " -> \"cpxinc\" is the path to the CPLEX \"include\" directory, e.g., \"<CPLEX-path>/include/ilcplex\".\n"
LPIINSTMSG += " -> \"libcplex.*.a\" is the path to the CPLEX library, e.g., \"<CPLEX-path>/lib/x86-64_linux/static_pic/libcplex.a\"\n"
LPIINSTMSG += " -> \"libcplex.*.so\" is the path to the CPLEX library, e.g., \"<CPLEX-path>/bin/x86-64_linux/libcplex1263.so\""
endif
endif
LPSOPTIONS += spx ( = spx2)
ifeq ($(LPS),spx2)
LINKER = CPP
FLAGS += -I$(LIBDIR)/include/spxinc
LPILIBOBJ = lpi/lpi_spx2.o scip/bitencode.o blockmemshell/memory.o scip/rbtree.o scip/message.o
LPILIBSRC = $(SRCDIR)/lpi/lpi_spx2.cpp $(SRCDIR)/scip/bitencode.c $(SRCDIR)/blockmemshell/memory.c $(SRCDIR)/scip/message.c
SOFTLINKS += $(LIBDIR)/include/spxinc
ifeq ($(SHARED),true)
SOFTLINKS += $(LIBDIR)/shared/libsoplex.$(OSTYPE).$(ARCH).$(COMP).$(LPSOPT).$(SHAREDLIBEXT)
else
SOFTLINKS += $(LIBDIR)/static/libsoplex.$(OSTYPE).$(ARCH).$(COMP).$(LPSOPT).$(STATICLIBEXT)
endif
LPIINSTMSG = " -> \"spxinc\" is the path to the SoPlex \"src\" directory, e.g., \"<SoPlex-path>/src\".\n"
LPIINSTMSG += " -> \"libsoplex.*\" is the path to the SoPlex library, e.g., \"<SoPlex-path>/lib/libsoplex.linux.x86.gnu.opt.a\""
ifeq ($(LPSCHECK),true)
FLAGS += -DSCIP_WITH_LPSCHECK -I$(LIBDIR)/include/cpxinc
SOFTLINKS += $(LIBDIR)/include/cpxinc
ifeq ($(SHARED),true)
SOFTLINKS += $(LIBDIR)/shared/libcplex.$(OSTYPE).$(ARCH).$(COMP).$(SHAREDLIBEXT)
else
SOFTLINKS += $(LIBDIR)/static/libcplex.$(OSTYPE).$(ARCH).$(COMP).$(STATICLIBEXT)
endif
LPIINSTMSG += " -> \"cpxinc\" is the path to the CPLEX \"include\" directory, e.g., \"<CPLEX-path>/include/ilcplex\".\n"
LPIINSTMSG += " -> \"libcplex.*.a\" is the path to the CPLEX library, e.g., \"<CPLEX-path>/lib/x86_rhel4.0_3.4/static_pic/libcplex.a\"\n"
LPIINSTMSG += " -> \"libcplex.*.so\" is the path to the CPLEX library, e.g., \"<CPLEX-path>/bin/x86-64_linux/libcplex1263.so\""
endif
endif
ifeq ($(DEBUGSOL),true)
FLAGS += -DWITH_DEBUG_SOLUTION
endif
LPSOPTIONS += clp
ifeq ($(LPS),clp)
LINKER = CPP
FLAGS += -I$(LIBDIR)/$(LIBTYPE)/clp.$(OSTYPE).$(ARCH).$(COMP).$(LPSOPT)/include/coin
LPILIBOBJ = lpi/lpi_clp.o scip/bitencode.o blockmemshell/memory.o scip/rbtree.o scip/message.o
LPILIBSRC = $(SRCDIR)/lpi/lpi_clp.cpp $(SRCDIR)/scip/bitencode.c $(SRCDIR)/blockmemshell/memory.c $(SRCDIR)/scip/message.c
SOFTLINKS += $(LIBDIR)/$(LIBTYPE)/clp.$(OSTYPE).$(ARCH).$(COMP).$(LPSOPT)
LPIINSTMSG = " -> \"clp.$(OSTYPE).$(ARCH).$(COMP).$(LPSOPT)\" is the path to the Clp installation directory, i.e., \"<Clp-path>/include/coin/ClpModel.hpp\" should exist.\n"
endif
LPSOPTIONS += qso
ifeq ($(LPS),qso)
FLAGS += -I$(LIBDIR)/include/qsinc
LPILIBOBJ = lpi/lpi_qso.o scip/bitencode.o blockmemshell/memory.o scip/rbtree.o scip/message.o
LPILIBSRC = $(addprefix $(SRCDIR)/,$(LPILIBOBJ:.o=.c))
SOFTLINKS += $(LIBDIR)/include/qsinc
SOFTLINKS += $(LIBDIR)/static/libqsopt.$(OSTYPE).$(ARCH).$(COMP).$(STATICLIBEXT)
LPIINSTMSG = " -> \"qsinc\" is the path to the QSopt \"include\" directory, e.g., \"<QSopt-path>\".\n"
LPIINSTMSG += " -> \"libqsopt.*\" is the path to the QSopt library, e.g., \"<QSopt-path>/libqsopt.a\""
endif
# Gurobi only supports shared libraries
LPSOPTIONS += grb
ifeq ($(LPS),grb)
FLAGS += -I$(LIBDIR)/include/grbinc
LPILIBOBJ = lpi/lpi_grb.o blockmemshell/memory.o scip/rbtree.o scip/message.o
LPILIBSRC = $(addprefix $(SRCDIR)/,$(LPILIBOBJ:.o=.c))
SOFTLINKS += $(LIBDIR)/include/grbinc
SOFTLINKS += $(LIBDIR)/shared/libgurobi.$(OSTYPE).$(ARCH).$(COMP).$(SHAREDLIBEXT)
LPIINSTMSG = " -> \"grbinc\" is the path to the Gurobi \"include\" directory, e.g., \"<Gurobi-path>/include\".\n"
LPIINSTMSG += " -> \"libgurobi.*\" is the path to the Gurobi library, e.g., \"<Gurobi-path>/lib/libgurobi.so\""
endif
LPSOPTIONS += none
ifeq ($(LPS),none)
LPILIBOBJ = lpi/lpi_none.o blockmemshell/memory.o scip/rbtree.o scip/message.o
LPILIBSRC = $(addprefix $(SRCDIR)/,$(LPILIBOBJ:.o=.c))
endif
LPILIB = $(LPILIBNAME).$(BASE)
LPILIBFILE = $(LIBDIR)/$(LIBTYPE)/lib$(LPILIB).$(LIBEXT)
LPILIBOBJFILES = $(addprefix $(LIBOBJDIR)/,$(LPILIBOBJ))
LPILIBDEP = $(SRCDIR)/depend.lpilib.$(LPS).$(OPT)
LPILIBLINK = $(LIBDIR)/$(LIBTYPE)/lib$(LPILIBSHORTNAME).$(BASE).$(LIBEXT)
LPILIBSHORTLINK = $(LIBDIR)/$(LIBTYPE)/lib$(LPILIBSHORTNAME).$(LIBEXT)
ALLSRC += $(LPILIBSRC)
ifeq ($(SHARED),true)
LPILIBEXTLIBS = $(LIBBUILD_L)$(LIBDIR)/$(LIBTYPE) $(LPSLDFLAGS) $(LINKRPATH)$(realpath $(LIBDIR)/$(LIBTYPE))
endif
#-----------------------------------------------------------------------------
# Parallel Interface
#-----------------------------------------------------------------------------
TPILIBSHORTNAME = tpi$(TPI)
TPILIBNAME = $(TPILIBSHORTNAME)-$(VERSION)
TPILIBOBJ =
TPIOPTIONS += none
ifeq ($(TPI),none)
TPILIBOBJ = tpi/tpi_none.o
FLAGS += -DTPI_NONE
endif
TPIOPTIONS += omp
ifeq ($(TPI),omp)
TPILIBOBJ = tpi/tpi_openmp.o
FLAGS += -DTPI_OMP
endif
TPIOPTIONS += tny
ifeq ($(TPI),tny)
TPILIBOBJ = tpi/tpi_tnycthrd.o \
tinycthread/tinycthread.o
FLAGS += -DTPI_TNYC
endif
TPILIBSRC = $(addprefix $(SRCDIR)/,$(TPILIBOBJ:.o=.c))
TPILIB = $(TPILIBNAME).$(BASE)
TPILIBFILE = $(LIBDIR)/$(LIBTYPE)/lib$(TPILIB).$(LIBEXT)
TPILIBOBJFILES = $(addprefix $(LIBOBJDIR)/,$(TPILIBOBJ))
TPILIBDEP = $(SRCDIR)/depend.tpilib.$(TPI).$(OPT)
TPILIBLINK = $(LIBDIR)/$(LIBTYPE)/lib$(TPILIBSHORTNAME).$(BASE).$(LIBEXT)
TPILIBSHORTLINK = $(LIBDIR)/$(LIBTYPE)/lib$(TPILIBSHORTNAME).$(LIBEXT)
ALLSRC += $(TPILIBSRC)
#-----------------------------------------------------------------------------
# Symmetry Interface
#-----------------------------------------------------------------------------
SYMOPTIONS += none
ifeq ($(SYM),none)
SYMOBJ = symmetry/compute_symmetry_none.o
SYMOBJFILES = $(addprefix $(LIBOBJDIR)/,$(SYMOBJ))
SYMSRC = $(addprefix $(SRCDIR)/,$(SYMOBJ:.o=.cpp))
ALLSRC += $(SYMSRC)
endif
SYMOPTIONS += bliss
ifeq ($(SYM),bliss)
FLAGS += -I$(LIBDIR)/include/
SYMOBJ = symmetry/compute_symmetry_bliss.o
SYMOBJFILES = $(addprefix $(LIBOBJDIR)/,$(SYMOBJ))
SYMSRC = $(addprefix $(SRCDIR)/,$(SYMOBJ:.o=.cpp))
ALLSRC += $(SYMSRC)
SOFTLINKS += $(LIBDIR)/include/bliss
ifeq ($(SHARED),true)
SOFTLINKS += $(LIBDIR)/shared/libbliss.$(OSTYPE).$(ARCH).$(COMP).$(SHAREDLIBEXT)
else
SOFTLINKS += $(LIBDIR)/static/libbliss.$(OSTYPE).$(ARCH).$(COMP).$(STATICLIBEXT)
endif
LPIINSTMSG += "\n -> \"blissinc\" is the path to the BLISS directory, e.g., \"<BLISS-path>\".\n"
LPIINSTMSG += " -> \"libbliss.*.a\" is the path to the BLISS library, e.g., \"<BLISS-path>/libbliss.a\"\n"
LPIINSTMSG += " -> \"libbliss.*.so\" is the path to the BLISS library, e.g., \"<BLISS-path>/libbliss.so\""
endif
#-----------------------------------------------------------------------------
# NLP Solver Interfaces and expression interpreter
#-----------------------------------------------------------------------------
NLPILIBCOBJ = nlpi/nlpi.o \
nlpi/nlpi_all.o \
nlpi/nlpioracle.o \
nlpi/expr.o
NLPILIBCXXOBJ = nlpi/intervalarithext.o
NLPILIBSCIPOBJ = blockmemshell/memory.o \
scip/misc.o \
scip/intervalarith.o \
scip/interrupt.o \
scip/message.o \
scip/rbtree.o
ifeq ($(EXPRINT),none)
NLPILIBCOBJ += nlpi/exprinterpret_none.o
endif
ifeq ($(EXPRINT),cppad)
NLPILIBCXXOBJ += nlpi/exprinterpret_cppad.o
endif
ifeq ($(IPOPT),true)
NLPILIBCXXOBJ += nlpi/nlpi_ipopt.o
else
NLPILIBCOBJ += nlpi/nlpi_ipopt_dummy.o
endif
ifeq ($(FILTERSQP),true)
NLPILIBCOBJ += nlpi/nlpi_filtersqp.o
else
NLPILIBCOBJ += nlpi/nlpi_filtersqp_dummy.o
endif
ifeq ($(WORHP),true)
NLPILIBCOBJ += nlpi/nlpi_worhp.o
else
NLPILIBCOBJ += nlpi/nlpi_worhp_dummy.o
endif
NLPILIBSHORTNAME = nlpi$(NLPILIBSHORTNAMECPPAD)$(NLPILIBSHORTNAMEIPOPT)$(NLPILIBSHORTNAMEFILTERSQP)
NLPILIBNAME = $(NLPILIBSHORTNAME)-$(VERSION)
NLPILIB = $(NLPILIBNAME).$(BASE)
NLPILIBFILE = $(LIBDIR)/$(LIBTYPE)/lib$(NLPILIB).$(LIBEXT)
NLPILIBOBJFILES = $(addprefix $(LIBOBJDIR)/,$(NLPILIBCOBJ)) $(addprefix $(LIBOBJDIR)/,$(NLPILIBCXXOBJ))
NLPILIBSCIPOBJFILES = $(addprefix $(LIBOBJDIR)/,$(NLPILIBSCIPOBJ))
NLPILIBSRC = $(addprefix $(SRCDIR)/,$(NLPILIBCOBJ:.o=.c)) $(addprefix $(SRCDIR)/,$(NLPILIBCXXOBJ:.o=.cpp))
NLPILIBDEP = $(SRCDIR)/depend.nlpilib$(NLPILIBSHORTNAMECPPAD)$(NLPILIBSHORTNAMEIPOPT)$(NLPILIBSHORTNAMEFILTERSQP).$(OPT)
NLPILIBLINK = $(LIBDIR)/$(LIBTYPE)/lib$(NLPILIBSHORTNAME).$(BASE).$(LIBEXT)
NLPILIBSHORTLINK = $(LIBDIR)/$(LIBTYPE)/lib$(NLPILIBSHORTNAME).$(LIBEXT)
ALLSRC += $(NLPILIBSRC)
ifeq ($(SHARED),true)
NLPILIBEXTLIBS = $(LIBBUILD_L)$(LIBDIR)/$(LIBTYPE) $(IPOPTLIBS) $(FILTERSQPLIBS) \
$(LINKRPATH)$(realpath $(LIBDIR)/$(LIBTYPE)/ipopt.$(OSTYPE).$(ARCH).$(COMP).$(IPOPTOPT)/lib) \
$(LINKRPATH)$(realpath $(LIBDIR)/$(LIBTYPE)/worhp.$(OSTYPE).$(ARCH).$(COMP).$(WORHPOPT)/lib)
endif
#-----------------------------------------------------------------------------
# External Libraries
#-----------------------------------------------------------------------------
ZLIBDEP := $(SRCDIR)/depend.zlib
ZLIBSRC := $(shell cat $(ZLIBDEP))
GMPDEP := $(SRCDIR)/depend.gmp
GMPSRC := $(shell cat $(GMPDEP))
READLINEDEP := $(SRCDIR)/depend.readline
READLINESRC := $(shell cat $(READLINEDEP))
ZIMPLDEP := $(SRCDIR)/depend.zimpl
ZIMPLSRC := $(shell cat $(ZIMPLDEP))
GAMSDEP := $(SRCDIR)/depend.gams
GAMSSRC := $(shell cat $(GAMSDEP))
PARASCIPDEP := $(SRCDIR)/depend.parascip
PARASCIPSRC := $(shell cat $(PARASCIPDEP))
ifeq ($(ZIMPL),true)
ifeq ($(GMP),false)
$(error ZIMPL requires the GMP to be linked. Use either ZIMPL=false or GMP=true.)
endif
FLAGS += -DSCIP_WITH_ZIMPL -I$(LIBDIR)/include/zimplinc $(ZIMPL_FLAGS)
DIRECTORIES += $(LIBDIR)/include/zimplinc
SOFTLINKS += $(LIBDIR)/include/zimplinc/zimpl
SOFTLINKS += $(LIBDIR)/$(LIBTYPE)/libzimpl.$(OSTYPE).$(ARCH).$(COMP).$(ZIMPLOPT).$(STATICLIBEXT)
LPIINSTMSG += "\n -> \"zimplinc\" is a directory containing the path to the ZIMPL \"src\" directory, e.g., \"<ZIMPL-path>/src\".\n"
LPIINSTMSG += " -> \"libzimpl.*\" is the path to the ZIMPL library, e.g., \"<ZIMPL-path>/lib/libzimpl.$(OSTYPE).$(ARCH).$(COMP).$(ZIMPLOPT).$(STATICLIBEXT)\""
endif
ifeq ($(GMP),true)
ifeq ($(COMP),msvc)
SOFTLINKS += $(LIBDIR)/mpir.$(ARCH)
SOFTLINKS += $(LIBDIR)/$(LIBTYPE)/libmpir.$(ARCH).$(OPT).lib
SOFTLINKS += $(LIBDIR)/$(LIBTYPE)/libpcre.$(ARCH).$(OPT).lib
LPIINSTMSG += "\n -> \"mpir.$(ARCH)\" is a directory containing the mpir installation, i.e., \"mpir.$(ARCH)/gmp.h\" should exist.\n"
LPIINSTMSG += " -> \"libmpir.*\" is the path to the MPIR library\n"
LPIINSTMSG += " -> \"libpcre.*\" is the path to the PCRE library"
endif
endif
ifeq ($(IPOPT),true)
SOFTLINKS += $(LIBDIR)/$(LIBTYPE)/ipopt.$(OSTYPE).$(ARCH).$(COMP).$(IPOPTOPT)
LPIINSTMSG += "\n -> \"ipopt.$(OSTYPE).$(ARCH).$(COMP).$(IPOPTOPT)\" is a directory containing the ipopt installation, i.e., \"ipopt.$(OSTYPE).$(ARCH).$(COMP).$(IPOPTOPT)/include/coin/IpIpoptApplication.hpp\", \"ipopt.$(OSTYPE).$(ARCH).$(COMP).$(IPOPTOPT)/lib/libipopt*\", ... should exist.\n"
endif
ifeq ($(FILTERSQP),true)
SOFTLINKS += $(LIBDIR)/$(LIBTYPE)/libfiltersqp.$(OSTYPE).$(ARCH).$(COMP).$(STATICLIBEXT)
#SOFTLINKS += $(LIBDIR)/$(LIBTYPE)/libfiltersqp.$(OSTYPE).$(ARCH).$(COMP).$(SHAREDLIBEXT)
SOFTLINKS += $(LIBDIR)/$(LIBTYPE)/libbqpd.$(OSTYPE).$(ARCH).$(COMP).$(STATICLIBEXT)
#SOFTLINKS += $(LIBDIR)/$(LIBTYPE)/libbqpd.$(OSTYPE).$(ARCH).$(COMP).$(SHAREDLIBEXT)
LPIINSTMSG += " -> \"libfiltersqp.$(OSTYPE).$(ARCH).$(COMP).*\" is the path to the filterSQP library.\n"
LPIINSTMSG += " -> \"libbqpd.$(OSTYPE).$(ARCH).$(COMP).*\" is the path to the BQPD library.\n"
endif
# WORHP provides only shared libraries
ifeq ($(WORHP),true)
SOFTLINKS += $(LIBDIR)/$(LIBTYPE)/worhp.$(OSTYPE).$(ARCH).$(COMP).$(WORHPOPT)
LPIINSTMSG += "\n -> \"worhp.$(OSTYPE).$(ARCH).$(COMP).$(WORHPOPT)\" is a directory containing the WORHP installation, i.e., \"worhp.$(OSTYPE).$(ARCH).$(COMP).$(WORHPOPT)/include/worhp/worhp.h\" should exist.\n"
endif
ifeq ($(GAMS),true)
GAMSDIR = $(LIBDIR)/gams.$(OSTYPE).$(ARCH).$(COMP)
FLAGS += -DWITH_GAMS=\"$(abspath $(GAMSDIR))\"
FLAGS += -I$(SCIPDIR)/interfaces/gams/src -I$(GAMSDIR)/apifiles/C/api
SOFTLINKS += $(GAMSDIR)
LPIINSTMSG += "\n -> \"$(GAMSDIR)\" is the path to the GAMS system directory"
endif
ifeq ($(SHARED),true)
SCIPLIBEXTLIBS = $(LIBBUILD_L)$(LIBDIR)/$(LIBTYPE)
ifeq ($(ZLIB),true)
SCIPLIBEXTLIBS += $(ZLIB_LDFLAGS)
endif
ifeq ($(GMP),true)
SCIPLIBEXTLIBS += $(GMP_LDFLAGS)
endif
ifeq ($(READLINE_LDFLAGS),true)
SCIPLIBEXTLIBS += $(READLINE_LDFLAGS)
endif
SCIPLIBEXTLIBS += $(ZIMPLLIB) $(LINKRPATH)$(realpath $(LIBDIR)/$(LIBTYPE))
endif
#-----------------------------------------------------------------------------
# SCIP Library
#-----------------------------------------------------------------------------
SCIPLIBSHORTNAME= scip
SCIPLIBNAME = $(SCIPLIBSHORTNAME)-$(VERSION)
SCIPPLUGINLIBOBJ= scip/benders_default.o \
scip/benderscut_feas.o \
scip/benderscut_int.o \
scip/benderscut_nogood.o \
scip/benderscut_opt.o \
scip/branch_allfullstrong.o \
scip/branch_cloud.o \
scip/branch_distribution.o \
scip/branch_fullstrong.o \
scip/branch_inference.o \
scip/branch_leastinf.o \
scip/branch_lookahead.o \
scip/branch_mostinf.o \
scip/branch_multaggr.o \
scip/branch_nodereopt.o \
scip/branch_pscost.o \
scip/branch_random.o \
scip/branch_relpscost.o \
scip/cons_abspower.o \
scip/compr_largestrepr.o \
scip/compr_weakcompr.o \
scip/concsolver_scip.o \
scip/cons_and.o \
scip/cons_benders.o \
scip/cons_benderslp.o \
scip/cons_bivariate.o \
scip/cons_bounddisjunction.o \
scip/cons_cardinality.o \
scip/cons_conjunction.o \
scip/cons_countsols.o \
scip/cons_cumulative.o \
scip/cons_disjunction.o \
scip/cons_indicator.o \
scip/cons_integral.o \
scip/cons_knapsack.o \
scip/cons_linear.o \
scip/cons_linking.o \
scip/cons_logicor.o \
scip/cons_nonlinear.o \
scip/cons_or.o \
scip/cons_orbisack.o \
scip/cons_orbitope.o \
scip/cons_pseudoboolean.o \
scip/cons_quadratic.o \
scip/cons_setppc.o \
scip/cons_soc.o \
scip/cons_sos1.o \
scip/cons_sos2.o \
scip/cons_superindicator.o \
scip/cons_symresack.o \
scip/cons_varbound.o \
scip/cons_xor.o \
scip/cons_components.o \
scip/dialog_default.o \
scip/event_softtimelimit.o \
scip/disp_default.o \
scip/event_solvingphase.o \
scip/prop_sync.o \
scip/event_globalbnd.o \
scip/heur_sync.o \
scip/heur_actconsdiving.o \
scip/heur_bound.o \
scip/heur_clique.o \
scip/heur_coefdiving.o \
scip/heur_completesol.o \
scip/heur_conflictdiving.o \
scip/heur_crossover.o \
scip/heur_dins.o \
scip/heur_distributiondiving.o \
scip/heur_dualval.o \
scip/heur_farkasdiving.o \
scip/heur_feaspump.o \
scip/heur_fixandinfer.o \
scip/heur_fracdiving.o \
scip/heur_gins.o \
scip/heur_guideddiving.o \
scip/heur_indicator.o \
scip/heur_intdiving.o \
scip/heur_intshifting.o \
scip/heur_linesearchdiving.o \
scip/heur_localbranching.o \
scip/heur_lpface.o \
scip/heur_alns.o \
scip/heur_locks.o \
scip/heur_mutation.o \
scip/heur_multistart.o \
scip/heur_mpec.o \
scip/heur_nlpdiving.o \
scip/heur_objpscostdiving.o \
scip/heur_octane.o \
scip/heur_ofins.o \
scip/heur_oneopt.o \
scip/heur_proximity.o \
scip/heur_pscostdiving.o \
scip/heur_reoptsols.o \
scip/heur_repair.o \
scip/heur_randrounding.o \
scip/heur_rens.o \
scip/heur_rins.o \
scip/heur_rootsoldiving.o \
scip/heur_rounding.o \
scip/heur_shiftandpropagate.o \
scip/heur_shifting.o \
scip/heur_simplerounding.o \
scip/heur_subnlp.o \
scip/heur_trivial.o \
scip/heur_trivialnegation.o \
scip/heur_trysol.o \
scip/heur_twoopt.o \
scip/heur_undercover.o \
scip/heur_vbounds.o \
scip/heur_veclendiving.o \
scip/heur_zeroobj.o \
scip/heur_zirounding.o \
scip/message_default.o \
scip/nodesel_bfs.o \
scip/nodesel_breadthfirst.o \
scip/nodesel_dfs.o \
scip/nodesel_estimate.o \
scip/nodesel_hybridestim.o \
scip/nodesel_restartdfs.o \
scip/nodesel_uct.o \
scip/presol_boundshift.o \
scip/presol_convertinttobin.o \
scip/presol_domcol.o\
scip/presol_dualagg.o\
scip/presol_dualcomp.o\
scip/presol_dualinfer.o\
scip/presol_gateextraction.o \
scip/presol_implics.o \
scip/presol_inttobinary.o \
scip/presol_qpkktref.o \
scip/presol_redvub.o \
scip/presol_symbreak.o \
scip/presol_trivial.o \
scip/presol_tworowbnd.o \
scip/presol_sparsify.o \
scip/presol_stuffing.o \
scip/presol_symmetry.o \
scip/prop_dualfix.o \
scip/prop_genvbounds.o \
scip/prop_nlobbt.o \
scip/prop_obbt.o \
scip/prop_orbitalfixing.o \
scip/prop_probing.o \
scip/prop_pseudoobj.o \
scip/prop_redcost.o \
scip/prop_rootredcost.o \
scip/prop_vbounds.o \
scip/reader_bnd.o \
scip/reader_ccg.o \
scip/reader_cip.o \
scip/reader_cnf.o \
scip/reader_cor.o \
scip/reader_diff.o \
scip/reader_fix.o \
scip/reader_fzn.o \
scip/reader_gms.o \
scip/reader_lp.o \
scip/reader_mps.o \
scip/reader_mst.o \
scip/reader_opb.o \
scip/reader_osil.o \
scip/reader_pip.o \
scip/reader_pbm.o \
scip/reader_ppm.o \
scip/reader_rlp.o \
scip/reader_smps.o \
scip/reader_sol.o \
scip/reader_sto.o \
scip/reader_tim.o \
scip/reader_wbo.o \
scip/reader_zpl.o \
scip/sepa_cgmip.o \
scip/sepa_clique.o \
scip/sepa_closecuts.o \
scip/sepa_aggregation.o \
scip/sepa_convexproj.o \
scip/sepa_disjunctive.o \
scip/sepa_eccuts.o \
scip/sepa_gauge.o \
scip/sepa_gomory.o \
scip/sepa_impliedbounds.o \
scip/sepa_intobj.o \
scip/sepa_mcf.o \
scip/sepa_oddcycle.o \
scip/sepa_rapidlearning.o \
scip/sepa_strongcg.o \
scip/sepa_zerohalf.o \
scip/table_default.o
SCIPLIBOBJ = scip/boundstore.o \
scip/branch.o \
scip/bandit.o \
scip/bandit_epsgreedy.o \
scip/bandit_exp3.o \
scip/bandit_ucb.o \
scip/benders.o \
scip/benderscut.o \
scip/bendersdefcuts.o \
scip/clock.o \
scip/concsolver.o \
scip/concurrent.o \
scip/conflict.o \
scip/conflictstore.o \
scip/cons.o \
scip/cutpool.o \
scip/cuts.o \
scip/debug.o \
scip/dialog.o \
scip/disp.o \
scip/event.o \
scip/fileio.o \
scip/heur.o \
scip/heuristics.o \
scip/compr.o \
scip/history.o \
scip/implics.o \
scip/interrupt.o \
scip/intervalarith.o \
scip/lp.o \
scip/matrix.o \
scip/mem.o \
scip/misc.o \
scip/misc_linear.o \
scip/nlp.o \
scip/nodesel.o \
scip/paramset.o \
scip/presol.o \
scip/presolve.o \
scip/pricestore.o \
scip/pricer.o \
scip/primal.o \
scip/prob.o \
scip/prop.o \
scip/reader.o \
scip/relax.o \
scip/reopt.o \
scip/retcode.o \
scip/scip_benders.o \
scip/scip_branch.o \
scip/scip_compr.o \
scip/scip_concurrent.o \
scip/scip_conflict.o \
scip/scip_cons.o \
scip/scip_copy.o \
scip/scip_cut.o \
scip/scip_datastructures.o\
scip/scip_debug.o \
scip/scip_dialog.o \
scip/scip_disp.o \
scip/scip_event.o \
scip/scip_expr.o \
scip/scip_general.o \
scip/scip_heur.o \
scip/scip_lp.o \
scip/scip_mem.o \
scip/scip_message.o \
scip/scip_nlp.o \
scip/scip_nodesel.o \
scip/scip_nonlinear.o \
scip/scip_numerics.o \
scip/scip_param.o \
scip/scip_presol.o \
scip/scip_pricer.o \
scip/scip_prob.o \
scip/scip_probing.o \
scip/scip_prop.o \
scip/scip_randnumgen.o \
scip/scip_reader.o \
scip/scip_relax.o \
scip/scip_reopt.o \
scip/scip_sepa.o \
scip/scip_sol.o \
scip/scip_solve.o \
scip/scip_solvingstats.o \
scip/scip_table.o \
scip/scip_timing.o \
scip/scip_tree.o \
scip/scip_validation.o \
scip/scip_var.o \
scip/scip_bandit.o \
scip/scipbuildflags.o \
scip/scipcoreplugins.o \
scip/scipdefplugins.o \
scip/scipgithash.o \
scip/scipshell.o \
scip/sepa.o \
scip/sepastore.o \
scip/set.o \
scip/sol.o \
scip/solve.o \
scip/stat.o \
scip/syncstore.o \
scip/table.o \
scip/tree.o \
scip/var.o \
scip/visual.o \
tclique/tclique_branch.o \
tclique/tclique_coloring.o \
tclique/tclique_graph.o \
dijkstra/dijkstra.o \
xml/xmlparse.o
SCIPLIB = $(SCIPLIBNAME).$(BASE)
SCIPLIBFILE = $(LIBDIR)/$(LIBTYPE)/lib$(SCIPLIB).$(LIBEXT)
SCIPLIBOBJFILES = $(addprefix $(LIBOBJDIR)/,$(SCIPPLUGINLIBOBJ))
SCIPLIBOBJFILES += $(addprefix $(LIBOBJDIR)/,$(SCIPLIBOBJ))
SCIPLIBSRC = $(addprefix $(SRCDIR)/,$(SCIPPLUGINLIBOBJ:.o=.c))
SCIPLIBSRC += $(addprefix $(SRCDIR)/,$(SCIPLIBOBJ:.o=.c))
SCIPPLUGININCSRC= $(addprefix $(SRCDIR)/,$(SCIPPLUGINLIBOBJ:.o=.h))
SCIPLIBDEP = $(SRCDIR)/depend.sciplib.$(OPT)
SCIPLIBLINK = $(LIBDIR)/$(LIBTYPE)/lib$(SCIPLIBSHORTNAME).$(BASE).$(LIBEXT)
SCIPLIBSHORTLINK = $(LIBDIR)/$(LIBTYPE)/lib$(SCIPLIBSHORTNAME).$(LIBEXT)
# define library that contains everything
SCIPLIBSOLVERSHORTNAME= scipsolver
SCIPLIBSOLVERNAME = $(SCIPLIBSOLVERSHORTNAME)-$(VERSION)
SCIPLIBSOLVER = $(SCIPLIBSOLVERNAME).$(BASE).$(LPS)
SCIPLIBSOLVERFILE = $(LIBDIR)/$(LIBTYPE)/lib$(SCIPLIBSOLVER).$(LIBEXT)
SCIPLIBSOLVERLINK = $(LIBDIR)/$(LIBTYPE)/lib$(SCIPLIBSOLVERSHORTNAME).$(BASE).$(LPS).$(LIBEXT)
SCIPLIBSOLVERSHORTLINK =$(LIBDIR)/$(LIBTYPE)/lib$(SCIPLIBSOLVERSHORTNAME).$(LIBEXT)
ifeq ($(GAMS),true)
SCIPLIBOBJFILES += $(addprefix $(LIBOBJDIR)/scip/,gmomcc.o gevmcc.o reader_gmo.o)
endif
ALLSRC += $(SCIPLIBSRC)
SCIPGITHASHFILE = $(SRCDIR)/scip/githash.c
SCIPBUILDFLAGSFILE = $(SRCDIR)/scip/buildflags.c
#-----------------------------------------------------------------------------
# Objective SCIP Library
#-----------------------------------------------------------------------------
OBJSCIPLIBSHORTNAME= objscip
OBJSCIPLIBNAME = $(OBJSCIPLIBSHORTNAME)-$(VERSION)
OBJSCIPLIBOBJ = objscip/objbenders.o \
objscip/objbenderscut.o \
objscip/objbranchrule.o \
objscip/objconshdlr.o \
objscip/objdialog.o \
objscip/objdisp.o \
objscip/objeventhdlr.o \
objscip/objheur.o \
objscip/objmessagehdlr.o \
objscip/objnodesel.o \
objscip/objpresol.o \
objscip/objpricer.o \
objscip/objprobdata.o \
objscip/objprop.o \
objscip/objreader.o \
objscip/objrelax.o \
objscip/objsepa.o \
objscip/objtable.o \
objscip/objvardata.o
OBJSCIPLIB = $(OBJSCIPLIBNAME).$(BASE)
OBJSCIPLIBFILE = $(LIBDIR)/$(LIBTYPE)/lib$(OBJSCIPLIB).$(LIBEXT)
OBJSCIPLIBOBJFILES= $(addprefix $(LIBOBJDIR)/,$(OBJSCIPLIBOBJ))
OBJSCIPLIBSRC = $(addprefix $(SRCDIR)/,$(OBJSCIPLIBOBJ:.o=.cpp))
OBJSCIPINCSRC = $(addprefix $(SRCDIR)/,$(OBJSCIPLIBOBJ:.o=.h))
OBJSCIPLIBDEP = $(SRCDIR)/depend.objsciplib.$(OPT)
OBJSCIPLIBLINK = $(LIBDIR)/$(LIBTYPE)/lib$(OBJSCIPLIBSHORTNAME).$(BASE).$(LIBEXT)
OBJSCIPLIBSHORTLINK= $(LIBDIR)/$(LIBTYPE)/lib$(OBJSCIPLIBSHORTNAME).$(LIBEXT)
ALLSRC += $(OBJSCIPLIBSRC)
#-----------------------------------------------------------------------------
# Main Program
#-----------------------------------------------------------------------------
MAINSHORTNAME = scip
MAINNAME = $(MAINSHORTNAME)-$(VERSION)
MAINOBJ = main.o
MAINSRC = $(addprefix $(SRCDIR)/,$(MAINOBJ:.o=.c))
MAINDEP = $(SRCDIR)/depend.main.$(OPT)
MAINFILE = $(BINDIR)/$(MAINNAME).$(BASE).$(LPS).$(TPI)$(EXEEXTENSION)
MAINOBJFILES = $(addprefix $(BINOBJDIR)/,$(MAINOBJ))
MAINLINK = $(BINDIR)/$(MAINSHORTNAME).$(BASE).$(LPS).$(TPI)$(EXEEXTENSION)
MAINSHORTLINK = $(BINDIR)/$(MAINSHORTNAME)$(EXEEXTENSION)
ALLSRC += $(MAINSRC)
ifeq ($(SHARED),true)
WINLIBFILENAME = lib$(MAINNAME).$(BASE).$(LPS).dll
else
WINLIBFILENAME = lib$(MAINNAME).$(BASE).$(LPS).lib
endif
LINKSMARKERFILE = $(LIBDIR)/$(LIBTYPE)/linkscreated.$(LPS)-$(LPSOPT).$(OSTYPE).$(ARCH).$(COMP)$(LINKLIBSUFFIX).$(ZIMPL)-$(ZIMPLOPT).$(IPOPT)-$(IPOPTOPT).$(FILTERSQP).$(GAMS).$(SYM)
LASTSETTINGS = $(OBJDIR)/make.lastsettings
#-----------------------------------------------------------------------------
# Rules
#-----------------------------------------------------------------------------
ifeq ($(VERBOSE),false)
.SILENT: $(MAINFILE) $(SCIPLIBFILE) $(OBJSCIPLIBFILE) $(LPILIBFILE) $(TPILIBFILE) $(NLPILIBFILE) \
$(LPILIBLINK) $(LPILIBSHORTLINK) $(TPILIBLINK) $(TPILIBSHORTLINK) $(SCIPLIBLINK) $(SCIPLIBSHORTLINK) \
$(OBJSCIPLIBLINK) $(OBJSCIPLIBSHORTLINK) $(NLPILIBLINK) $(NLPILIBSHORTLINK) \
$(MAINLINK) $(MAINSHORTLINK) \
$(LPILIBOBJFILES) $(TPILIBOBJFILES) $(NLPILIBOBJFILES) $(SCIPLIBOBJFILES) $(OBJSCIPLIBOBJFILES) $(MAINOBJFILES) $(SYMOBJFILES) \
$(SCIPLIBSOLVERFILE) $(SCIPLIBSOLVERLINK) $(SCIPLIBSOLVERSHORTLINK)
MAKE += -s
endif
.PHONY: all
all: libs
@$(MAKE) $(MAINFILE) $(MAINLINK) $(MAINSHORTLINK)
.PHONY: libs
libs: libscip libobjscip liblpi libtpi libnlpi
ifeq ($(SHARED),true)
@$(MAKE) libscipsolver
endif
.PHONY: preprocess
preprocess: checkdefines
@$(SHELL) -ec 'if test ! -e $(LINKSMARKERFILE) ; \
then \
echo "-> generating necessary links" ; \
$(MAKE) -j1 $(LINKSMARKERFILE) ; \
fi'
@$(MAKE) touchexternal
.PHONY: lint
lint: $(SCIPLIBSRC) $(OBJSCIPLIBSRC) $(LPILIBSRC) $(TPILIBSRC) $(NLPILIBSRC) $(MAINSRC) $(SYMSRC)
-rm -f lint.out
@$(SHELL) -ec 'if test -e lint/co-gcc.mak ; \
then \
echo "-> generating gcc-include-path lint-file" ; \
cd lint; $(MAKE) -f co-gcc.mak ; \
else \
echo "-> lint Makefile not found"; \
fi'
ifeq ($(FILES),)
$(SHELL) -ec 'for i in $^; \
do \
echo $$i; \
$(LINT) lint/main-gcc.lnt +os\(lint.out\) -u -zero \
$(USRFLAGS) $(FLAGS) -I/usr/include -UNDEBUG -USCIP_WITH_READLINE -USCIP_ROUNDING_FE -D_BSD_SOURCE $$i; \
done'
else
$(SHELL) -ec 'for i in $(FILES); \
do \
echo $$i; \
$(LINT) lint/main-gcc.lnt +os\(lint.out\) -u -zero \
$(USRFLAGS) $(FLAGS) -I/usr/include -UNDEBUG -USCIP_WITH_READLINE -USCIP_ROUNDING_FE -D_BSD_SOURCE $$i; \
done'
endif
.PHONY: splint
splint: $(SCIPLIBSRC) $(OBJSCIPLIBSRC) $(LPILIBSRC) $(TPILIBSRC) $(NLPILIBSRC) $(MAINSRC) $(SYMSRC)
-rm -f splint.out
ifeq ($(FILES),)
$(SHELL) -c '$(SPLINT) -I$(SRCDIR) -I/usr/include/linux $(FLAGS) $(SPLINTFLAGS) $(filter %.c %.h,$^) >> splint.out;'
else
$(SHELL) -c '$(SPLINT) -I$(SRCDIR) -I/usr/include/linux $(FLAGS) $(SPLINTFLAGS) $(filter %.c %.h,$(FILES)) >> splint.out;'
endif
.PHONY: doc
doc:
cd doc; $(SHELL) builddoc.sh;
.PHONY: docpreview
docpreview:
# generates preview for a list of files
ifneq ($(FILES),)
echo "generating doxygen preview for $(FILES)"
cd doc; ( cat $(MAINSHORTNAME).dxy && echo 'FILE_PATTERNS = $(FILES)' ) | $(DOXY) -
else
echo "please specify file(s) for which preview should be created"
endif
.PHONY: check
check: test
.PHONY: test
test:
cd check; \
$(SHELL) ./check.sh $(TEST) $(EXECUTABLE) $(SETTINGS) $(BINID) $(OUTPUTDIR) $(TIME) $(NODES) $(MEM) $(THREADS) $(FEASTOL) $(DISPFREQ) \
$(CONTINUE) $(LOCK) $(VERSION) $(LPS) $(DEBUGTOOL) $(CLIENTTMPDIR) $(REOPT) $(OPTCOMMAND) $(SETCUTOFF) $(MAXJOBS) $(VISUALIZE) $(PERMUTE) \
$(SEEDS) $(GLBSEEDSHIFT);
.PHONY: testcount
testcount:
cd check; \
$(SHELL) ./check_count.sh $(TEST) $(MAINFILE) $(SETTINGS) $(notdir $(MAINFILE)).$(HOSTNAME) $(TIME) $(NODES) $(MEM) $(FEASTOL) \
$(DISPFREQ) $(CONTINUE) $(LOCK) $(VERSION) $(LPS);
.PHONY: tags
tags:
rm -f TAGS; ctags -e -R -h ".c.cpp.h" --exclude=".*" src/; sed -i 's!\#undef .*!!g' TAGS
# include target to detect the current git hash
-include make/local/make.detectgithash
# this empty target is needed for the SCIP release versions
githash:: # do not remove the double-colon
# include local targets