forked from OpenModelica/OpenModelica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.omdev.mingw
97 lines (72 loc) · 4.22 KB
/
Makefile.omdev.mingw
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
defaultMakefileTarget = Makefile.omdev.mingw
REALPATH = $(realpath .)
OMBUILDDIR=$(REALPATH)/build
.PHONY: omc omc-diff omlibrary-core omplot omedit omnotebook omshell omoptim
omc:
$(MAKE) -f $(defaultMakefileTarget) -C OMCompiler OMBUILDDIR=$(OMBUILDDIR)
omc-diff: omc
$(MAKE) -C testsuite/ -f Makefile omc-diff OMBUILDDIR=$(OMBUILDDIR)
omlibrary-core:
$(MAKE) -C libraries BUILD_DIR=$(OMBUILDDIR)/lib/omlibrary core
omlibrary-all:
$(MAKE) -C libraries BUILD_DIR=$(OMBUILDDIR)/lib/omlibrary all
omplot:
$(MAKE) -C OMPlot -f $(defaultMakefileTarget) OMBUILDDIR=$(OMBUILDDIR)
omedit: omplot
$(MAKE) -f $(defaultMakefileTarget) -C OMEdit OMBUILDDIR=$(OMBUILDDIR)
omnotebook: omplot
$(MAKE) -f $(defaultMakefileTarget) -C OMNotebook/OMNotebook/OMNotebookGUI OMBUILDDIR=$(OMBUILDDIR)
omshell:
$(MAKE) -f $(defaultMakefileTarget) -C OMShell/OMShell/OMShellGUI OMBUILDDIR=$(OMBUILDDIR)
omoptim: omplot
$(MAKE) -f $(defaultMakefileTarget) -C OMOptim OMBUILDDIR=$(OMBUILDDIR)
qtclients: omplot omedit omnotebook omshell omoptim
clean-qtclients:
simulationruntimecmsvc:
$(MAKE) -C OMCompiler -f $(defaultMakefileTarget) OMBUILDDIR=$(OMBUILDDIR) simulationruntimecmsvc
runtimeCPPmsvcinstall:
$(MAKE) -C OMCompiler -f $(defaultMakefileTarget) OMBUILDDIR=$(OMBUILDDIR) runtimeCPPmsvcinstall
runtimeCPPinstall:
$(MAKE) -C OMCompiler -f $(defaultMakefileTarget) OMBUILDDIR=$(OMBUILDDIR) runtimeCPPinstall
testlogwindows:
(time $(MAKE) -C testsuite -f Makefile 2>&1 | tee testsuite/testsuite-trace.txt) || true
(time $(MAKE) -C testsuite/openmodelica/cruntime/msvc/ -f Makefile >> testsuite/testsuite-trace.txt 2>&1) || true
(export RTEST_OMCFLAGS=+target=msvc ; time $(MAKE) -C testsuite/openmodelica/cppruntime/ -f Makefile >> testsuite/testsuite-trace.txt 2>&1) || true
echo "log is in testsuite/testsuite-trace.txt"
fgrep -v "... ok" testsuite/testsuite-trace.txt
echo "Successful tests: "
cat testsuite/testsuite-trace.txt | grep "... ok" | wc -l
echo "Failed models: "
cat testsuite/testsuite-trace.txt | grep "==== Log" | wc -l
cat testsuite/testsuite-trace.txt | grep "==== Log" ; echo DONE!
builddir_lib=$(OMBUILDDIR)/lib
builddir_share=$(OMBUILDDIR)/share
IDLPYTHON = $(OMDEV)/lib/omniORB-4.1.6-msvc-10/bin/x86_win32/omniidl -bpython -Wbglobal=_OMCIDL -Wbpackage=OMPythonIDL
IDLPYTHONTARGET = $(builddir_share)/omc/scripts/PythonInterface/OMPythonIDL/omc_communication_idl.py
IDLFILE=OMCompiler/Compiler/runtime/omc_communication.idl
install-python: $(IDLPYTHONTARGET)
.PHONY: script-files-python
script-files-python: mkbuilddirs-python
# copy library files neeeded by OMPython
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/x86_win32/_omnipy.pyd $(builddir_lib)/python)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/python/omniORB/__init__.py $(builddir_lib)/python/omniORB/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/python/omniORB/boxes_idl.py $(builddir_lib)/python/omniORB/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/python/omniORB/CORBA.py $(builddir_lib)/python/omniORB/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/python/omniORB/corbaidl_idl.py $(builddir_lib)/python/omniORB/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/python/omniORB/minorCodes.py $(builddir_lib)/python/omniORB/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/python/omniORB/PortableServer.py $(builddir_lib)/python/omniORB/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/python/omniORB/tcInternal.py $(builddir_lib)/python/omniORB/)
# copy OMPython files
cp -rfp OMPython/setup.py $(builddir_share)/omc/scripts/PythonInterface
cp -rfp OMPython/OMPython/* $(builddir_share)/omc/scripts/PythonInterface/OMPython
$(IDLPYTHONTARGET) : $(IDLFILE) script-files-python
$(IDLPYTHON) -C$(builddir_share)/omc/scripts/PythonInterface $(IDLFILE)
mkbuilddirs-python:
# create directories
mkdir -p $(builddir_lib)/python/omniORB
mkdir -p $(builddir_share)/omc/scripts/PythonInterface/OMPython/OMParser
clean-python:
rm -rf OMPython/build/ OMPython/OMPythonIDL/ OMPython/OMPython/_GlobalID* OMPython/OMPython/omc_communication_idl.py
clean:
$(MAKE) -f $(defaultMakefileTarget) -C OMCompiler clean OMBUILDDIR=$(OMBUILDDIR)
test ! -d $(OMBUILDDIR) || rm -rf $(OMBUILDDIR)