-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile.omdev.mingw
84 lines (70 loc) · 3.83 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
all : .testvariables settings release
autoconfGeneratedFiles =
prefix = ./install
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
libdir = ${exec_prefix}/lib
includedir = ${prefix}/include
datadir = ${prefix}/share
docdir = ${prefix}/doc
defaultMakefileTarget = Makefile.omdev.mingw
include Makefile.common
CONFIG_REVISION = $(shell wget --user=anonymous --password='none' --no-check-certificate -q https://www.openmodelica.org/svn/OpenModelica/trunk -O - | grep title | grep Revision | cut -d ' ' -f 4 | cut -d ':' -f 1)
revision:
@echo Current revision: $(CONFIG_REVISION)
ifeq ($(CONFIG_REVISION),)
@if test -f revision.h; \
then echo Could not retrieve revision number. revision.h not updated; \
else echo "" > revision.h; echo Could not retrieve revision number. empty revision.h was created; \
fi;
else # revision is not empty, update it if it changed
@if test -f revision.h; \
then \
echo "#define CONFIG_REVISION \"$(CONFIG_REVISION)\"" > revision.h.tmp; diff revision.h revision.h.tmp > /dev/null; \
if [ $$? -eq 0 ]; then echo No change in revision; rm revision.h.tmp; \
else echo Revision has changed. updating revision.h; \mv revision.h.tmp revision.h; touch Compiler/runtime/config.h; \
fi; \
else \
echo "#define CONFIG_REVISION \"$(CONFIG_REVISION)\"" > revision.h; echo Retrieved revision number. revision.h was created; \
fi;
endif
.testvariables: revision
ifndef OMDEV
@echo You have to set the OMDEV variabile pointing to your OMDev package root! Exiting....
@echo Take the OMDev package from: http://www.ida.liu.se/~adrpo/omc/omdev/
@echo For questions or problems email Adrian Pop, [email protected]
ABORT Please Define OMDEV
endif
settings:
@echo Building OMC using OMDev with the following settings...
@echo Using OMDev: $(OMDEV)
@echo Using Files: $(OMC_BUILD_FROM)
@echo Using Path : "$(PATH)"
which gcc
omdev_extra_dlls: install-openturns
echo Copying needed .dlls to the build/bin directory
(cp -puf $(OMDEV)/tools/mingw/bin/mingwm10.dll $(builddir_bin)/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/bin/x86_win32/omniORB416_vc10_rt.dll $(builddir_bin)/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/bin/x86_win32/omnithread34_vc10_rt.dll $(builddir_bin)/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/x86_win32/_omnipy.pyd $(builddir_lib)/)
(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/)
(cp -puf $(OMDEV)/tools/mingw/lib/libregex.a $(builddir_lib)/omc)
(cp -pf $(OMDEV)/lib/mico-msys-mingw/static/libmico2313.a $(builddir_lib)/omc/)
(cp -pufr $(OMDEV)/tools/xsltproc $(builddir_lib)/omc/libexec/)
(cp -pufr $(OMDEV)/tools/gnuplot $(builddir_lib)/omc/libexec/)
(cp -puf $(OMDEV)/lib/3rdParty/Sundials/lib/release/mingw/*.a $(builddir_lib)/omc/)
omc: interactive docs omdev_extra_dlls breakprocess fmi
(cd Compiler && time $(MAKE) -f Makefile.omdev.mingw release)
omcd: interactive docs omdev_extra_dlls breakprocess fmi
(cd Compiler && time $(MAKE) -f Makefile.omdev.mingw debug)
omc_profiler: interactive docs omdev_extra_dlls breakprocess fmi
(cd Compiler && time $(MAKE) -f Makefile.omdev.mingw profiler)
# Empty; only Unix version uses QT makefiles, etc...
qtclean:
.PRECIOUS: Makefile.omdev.mingw