File: make.install

package info (click to toggle)
scip 10.0.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 76,156 kB
  • sloc: ansic: 716,600; cpp: 41,095; awk: 9,195; sh: 4,918; makefile: 4,044; python: 2,076; perl: 731; xml: 660; java: 314; php: 24; lisp: 15
file content (141 lines) | stat: -rw-r--r-- 8,847 bytes parent folder | download
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
#* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
#*                                                                           *
#*                  This file is part of the program and library             *
#*         SCIP --- Solving Constraint Integer Programs                      *
#*                                                                           *
#*  Copyright (c) 2002-2026 Zuse Institute Berlin (ZIB)                      *
#*                                                                           *
#*  Licensed under the Apache License, Version 2.0 (the "License");          *
#*  you may not use this file except in compliance with the License.         *
#*  You may obtain a copy of the License at                                  *
#*                                                                           *
#*      http://www.apache.org/licenses/LICENSE-2.0                           *
#*                                                                           *
#*  Unless required by applicable law or agreed to in writing, software      *
#*  distributed under the License is distributed on an "AS IS" BASIS,        *
#*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
#*  See the License for the specific language governing permissions and      *
#*  limitations under the License.                                           *
#*                                                                           *
#*  You should have received a copy of the Apache-2.0 license                *
#*  along with SCIP; see the file LICENSE. If not visit scipopt.org.         *
#*                                                                           *
#* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

#@file    make.install
#@brief   Makefile targets for installing and removing SCIP
#@author  Stefan Heinz
#@author  Michael Winkler

# should header files be deleted?
DELHEADERS	=	false

# installs headers, libraries, and binary
.PHONY: install
install:	installheaders installlibs installbinary


.PHONY: installheaders
installheaders:
ifneq ($(INSTALLDIR),)
		@echo "-> install SCIP headers into INSTALLDIR <$(INSTALLDIR)>"
		@-install -m 755 -d $(INSTALLDIR)/$(INCLUDEDIR)/scip/ $(INSTALLDIR)/$(INCLUDEDIR)/objscip/ $(INSTALLDIR)/$(INCLUDEDIR)/lpi/ $(INSTALLDIR)/$(INCLUDEDIR)/blockmemshell/ $(INSTALLDIR)/$(INCLUDEDIR)/dijkstra/ $(INSTALLDIR)/$(INCLUDEDIR)/symmetry/ $(INSTALLDIR)/$(INCLUDEDIR)/tclique/ $(INSTALLDIR)/$(INCLUDEDIR)/xml/
		@-install -m 644 -p $(SRCDIR)/scip/*.h $(SCIPCONFIGHFILE) $(SCIPEXPORTHFILE) $(INSTALLDIR)/$(INCLUDEDIR)/scip/
		@-install -m 644 -p $(OBJSCIPINCSRC) $(INSTALLDIR)/$(INCLUDEDIR)/objscip/
		@-install -m 644 -p $(SRCDIR)/lpi/*.h $(INSTALLDIR)/$(INCLUDEDIR)/lpi/
		@-install -m 644 -p $(SRCDIR)/blockmemshell/*.h $(INSTALLDIR)/$(INCLUDEDIR)/blockmemshell/
		@-install -m 644 -p $(SRCDIR)/dijkstra/*.h $(INSTALLDIR)/$(INCLUDEDIR)/dijkstra/
		@-install -m 644 -p $(SRCDIR)/symmetry/*.h $(INSTALLDIR)/$(INCLUDEDIR)/symmetry/
		@-install -m 644 -p $(SRCDIR)/tclique/*.h $(INSTALLDIR)/$(INCLUDEDIR)/tclique/
		@-install -m 644 -p $(SRCDIR)/xml/*.h $(INSTALLDIR)/$(INCLUDEDIR)/xml/
else
		$(error "Installation directory required - use make install INSTALLDIR=<dir>, e.g., make install INSTALLDIR=/usr/local")
endif



.PHONY: installlibs
installlibs:	libs
ifneq ($(INSTALLDIR),)
		@echo "-> install SCIP libraries into INSTALLDIR <$(INSTALLDIR)>"
		@-install -m 755 -d $(INSTALLDIR)/$(LIBDIR)/
		@-install -m 644 -p $(LPILIBFILE) $(TPILIBFILE) $(OBJSCIPLIBFILE) $(INSTALLDIR)/$(LIBDIR)/
ifeq ($(SHARED),true)
		@-install -m 644 -p $(SCIPLIBFILE) $(INSTALLDIR)/$(LIBDIR)/
endif
		@-install -m 644 -p $(SCIPLIBBASEFILE) $(INSTALLDIR)/$(LIBDIR)/
ifeq ($(SHARED)$(OSTYPE),truedarwin)
		@install_name_tool -id $(realpath $(INSTALLDIR)/$(LIBDIR)/$(notdir $(LPILIBFILE))) $(INSTALLDIR)/$(LIBDIR)/$(notdir $(LPILIBFILE))
		@install_name_tool -id $(realpath $(INSTALLDIR)/$(LIBDIR)/$(notdir $(TPILIBFILE))) $(INSTALLDIR)/$(LIBDIR)/$(notdir $(TPILIBFILE))
		@install_name_tool -id $(realpath $(INSTALLDIR)/$(LIBDIR)/$(notdir $(SCIPLIBFILE))) $(INSTALLDIR)/$(LIBDIR)/$(notdir $(SCIPLIBFILE))
		@install_name_tool -id $(realpath $(INSTALLDIR)/$(LIBDIR)/$(notdir $(OBJSCIPLIBFILE))) $(INSTALLDIR)/$(LIBDIR)/$(notdir $(OBJSCIPLIBFILE))
endif
		@-(cd $(INSTALLDIR)/$(LIBDIR)/ && rm -f $(notdir $(LPILIBLINK)) && $(LN_s) $(notdir $(LPILIBFILE)) $(notdir $(LPILIBLINK)));
		@-(cd $(INSTALLDIR)/$(LIBDIR)/ && rm -f $(notdir $(LPILIBSHORTLINK)) && $(LN_s) $(notdir $(LPILIBLINK)) $(notdir $(LPILIBSHORTLINK)));
ifeq ($(SHARED),true)
		@-(cd $(INSTALLDIR)/$(LIBDIR)/ && rm -f $(notdir $(SCIPLIBLINK)) && $(LN_s) $(notdir $(SCIPLIBFILE)) $(notdir $(SCIPLIBLINK)));
		@-(cd $(INSTALLDIR)/$(LIBDIR)/ && rm -f $(notdir $(SCIPLIBSHORTLINK)) && $(LN_s) $(notdir $(SCIPLIBLINK)) $(notdir $(SCIPLIBSHORTLINK)));
endif
		@-(cd $(INSTALLDIR)/$(LIBDIR)/ && rm -f $(notdir $(SCIPLIBBASELINK)) && $(LN_s) $(notdir $(SCIPLIBBASEFILE)) $(notdir $(SCIPLIBBASELINK)));
		@-(cd $(INSTALLDIR)/$(LIBDIR)/ && rm -f $(notdir $(SCIPLIBBASESHORTLINK)) && $(LN_s) $(notdir $(SCIPLIBBASELINK)) $(notdir $(SCIPLIBBASESHORTLINK)));
		@-(cd $(INSTALLDIR)/$(LIBDIR)/ && rm -f $(notdir $(OBJSCIPLIBLINK)) && $(LN_s) $(notdir $(OBJSCIPLIBFILE)) $(notdir $(OBJSCIPLIBLINK)));
		@-(cd $(INSTALLDIR)/$(LIBDIR)/ && rm -f $(notdir $(OBJSCIPLIBSHORTLINK)) && $(LN_s) $(notdir $(OBJSCIPLIBLINK)) $(notdir $(OBJSCIPLIBSHORTLINK)));
endif



.PHONY: installbinary
installbinary:	all
ifneq ($(INSTALLDIR),)
		@echo "-> install SCIP binary into INSTALLDIR <$(INSTALLDIR)>"
		@-install -m 755 -d $(INSTALLDIR)/$(BINDIR)/
		@-install -m 755 -p $(MAINFILE) $(INSTALLDIR)/$(BINDIR)/
ifeq ($(SHARED)$(OSTYPE),truedarwin)  # update library paths when using shared libs on Mac OS X
		@install_name_tool -change $(LPILIBFILE) @loader_path/../$(LIBDIR)/$(notdir $(LPILIBFILE)) $(INSTALLDIR)/$(MAINFILE)
		@install_name_tool -change $(TPILIBFILE) @loader_path/../$(LIBDIR)/$(notdir $(TPILIBFILE)) $(INSTALLDIR)/$(MAINFILE)
		@install_name_tool -change $(SCIPLIBFILE) @loader_path/../$(LIBDIR)/$(notdir $(SCIPLIBFILE)) $(INSTALLDIR)/$(MAINFILE)
		@install_name_tool -change $(OBJSCIPLIBFILE) @loader_path/../$(LIBDIR)/$(notdir $(OBJSCIPLIBFILE)) $(INSTALLDIR)/$(MAINFILE)
endif
		@-(cd $(INSTALLDIR)/$(BINDIR)/ && rm -f $(notdir $(MAINLINK)) && $(LN_s) $(notdir $(MAINFILE)) $(notdir $(MAINLINK)));
		@-(cd $(INSTALLDIR)/$(BINDIR)/ && rm -f $(notdir $(MAINSHORTLINK)) && $(LN_s) $(notdir $(MAINLINK)) $(notdir $(MAINSHORTLINK)));
endif


.PHONY: uninstall
uninstall:
ifneq ($(INSTALLDIR),)
		@echo "-> remove binary from INSTALLDIR <$(INSTALLDIR)>"
		@-(cd $(INSTALLDIR) && rm -vf $(MAINFILE) $(MAINLINK) $(MAINSHORTLINK));
		@echo "-> remove libraries from INSTALLDIR <$(INSTALLDIR)>"
		-(cd $(INSTALLDIR)/$(LIBDIR) && rm -vf $(notdir $(LPILIBFILE)) $(notdir $(LPILIBLINK)) $(notdir $(LPILIBSHORTLINK)) $(notdir $(TPILIBFILE)) $(notdir $(OBJSCIPLIBFILE)) $(notdir $(OBJSCIPLIBLINK)) $(notdir $(OBJSCIPLIBSHORTLINK)));
ifeq ($(SHARED),true)
		@-(cd $(INSTALLDIR)/$(LIBDIR) && rm -vf $(notdir $(SCIPLIBFILE)) $(notdir $(SCIPLIBLINK)) $(notdir $(SCIPLIBSHORTLINK)));
else
		@-(cd $(INSTALLDIR)/$(LIBDIR) && rm -vf $(notdir $(SCIPLIBBASEFILE)) $(notdir $(SCIPLIBBASELINK)) $(notdir $(SCIPLIBBASESHORTLINK)));
endif
ifeq ($(DELHEADERS), true)
		@echo "-> remove scip headers from INSTALLDIR <$(INSTALLDIR)>"
		@-mkdir -p $(INSTALLDIR)/$(INCLUDEDIR)/scip
		@-rm -f $(INSTALLDIR)/$(INCLUDEDIR)/scip/*.h
		@-mkdir -p $(INSTALLDIR)/$(INCLUDEDIR)/objscip
		@-rm -f $(INSTALLDIR)/$(INCLUDEDIR)/objscip/*.h
		@-mkdir -p $(INSTALLDIR)/$(INCLUDEDIR)/lpi/
		@-rm -f $(INSTALLDIR)/$(INCLUDEDIR)/lpi/*.h
		@-mkdir -p $(INSTALLDIR)/$(INCLUDEDIR)/blockmemshell/
		@-rm -f $(INSTALLDIR)/$(INCLUDEDIR)/blockmemshell/*.h
		@-mkdir -p $(INSTALLDIR)/$(INCLUDEDIR)/dijkstra/
		@-rm -f $(INSTALLDIR)/$(INCLUDEDIR)/dijkstra/*.h
		@-mkdir -p $(INSTALLDIR)/$(INCLUDEDIR)/symmetry/
		@-rm -f $(INSTALLDIR)/$(INCLUDEDIR)/symmetry/*.h
		@-mkdir -p $(INSTALLDIR)/$(INCLUDEDIR)/tclique/
		@-rm -f $(INSTALLDIR)/$(INCLUDEDIR)/tclique/*.h
		@-mkdir -p $(INSTALLDIR)/$(INCLUDEDIR)/xml/
		@-rm -f $(INSTALLDIR)/$(INCLUDEDIR)/xml/*.h
		@-rmdir $(INSTALLDIR)/$(INCLUDEDIR)/scip $(INSTALLDIR)/$(INCLUDEDIR)/objscip $(INSTALLDIR)/$(INCLUDEDIR)/lpi/ $(INSTALLDIR)/$(INCLUDEDIR)/blockmemshell/ $(INSTALLDIR)/$(INCLUDEDIR)/dijkstra/ $(INSTALLDIR)/$(INCLUDEDIR)/symmetry/ $(INSTALLDIR)/$(INCLUDEDIR)/tclique/ $(INSTALLDIR)/$(INCLUDEDIR)/xml/
else
		@echo "-> keeping scip headers under <$(INSTALLDIR)/$(INCLUDEDIR)>; rerun with 'DELHEADERS=true' to force deletion"
endif
else
		$(error "no installation directory specified - use make uninstall INSTALLDIR=<dir>, e.g., make uninstall INSTALLDIR=/usr/local")
endif