forked from OpenModelica/OpenModelica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.common
754 lines (637 loc) · 46.3 KB
/
Makefile.common
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
inclu.PHONY : all omc release clean .testvariables checkMSVCwine bootstrap-dependencies-post bootstrap-dependencies-post-compiler-runtime bootstrap-dependencies-post-compiler-builtin bootstrap-dependencies-post-parser parmodauto
unexport PREFIX
top_builddir = $(OMBUILDDIR)
builddir_app=$(OMBUILDDIR)/Applications/
builddir_bin=$(OMBUILDDIR)/bin
builddir_bin_semla=$(OMBUILDDIR)/bin/omc-semla
builddir_lib=$(OMBUILDDIR)/lib
builddir_lib_semla=$(OMBUILDDIR)/lib/omc-semla
builddir_lib_omc=$(OMBUILDDIR)/$(LIB_OMC)
builddir_inc_semla=$(OMBUILDDIR)/include/omc-semla
builddir_inc=$(OMBUILDDIR)/include/omc
builddir_doc=$(OMBUILDDIR)/share/doc
builddir_share=$(OMBUILDDIR)/share/
builddir_man=$(OMBUILDDIR)/share/man/
builddir_java=$(OMBUILDDIR)/share/omc/java/
builddir_locale=$(OMBUILDDIR)/share/locale/
INSTALL_APPDIR = ${DESTDIR}/Applications/MacPorts/
INSTALL_BINDIR = ${DESTDIR}${bindir}
INSTALL_LIBDIR = ${DESTDIR}${libdir}/
INSTALL_INCLUDEDIR = ${DESTDIR}${includedir}
INSTALL_DATADIR = ${DESTDIR}${datadir}
INSTALL_DOCDIR = ${DESTDIR}${docdir}
INSTALL_SHAREDIR = ${DESTDIR}${datadir}/
INSTALL_MANDIR = ${DESTDIR}${datadir}/man/
INSTALL_JAVADIR = ${DESTDIR}${datadir}/omc/java
INSTALL_LOCALEDIR = ${DESTDIR}${datadir}/locale
BUILD_DIRS = \
$(builddir_bin) \
$(OMBUILDDIR)/lib/omc/emcc \
$(builddir_lib_omc) \
$(builddir_inc)/c/ \
$(builddir_inc)/c/gc/ \
$(builddir_inc)/c/linearization/ \
$(builddir_inc)/c/dataReconciliation/ \
$(builddir_inc)/c/optimization/ \
$(builddir_inc)/c/simulation/ \
$(builddir_inc)/c/simulation/results/ \
$(builddir_inc)/c/simulation/solver/ \
$(builddir_inc)/c/simulation/solver/initialization/ \
$(builddir_inc)/c/meta/ \
$(builddir_inc)/c/util/ \
$(builddir_inc)/c/fmi1/ \
$(builddir_inc)/c/fmi2/ \
$(builddir_inc)/scripting-API \
$(builddir_java) \
$(builddir_share)/omc/scripts/ \
$(builddir_doc)/omc/testmodels \
$(builddir_man)/man1/
# Silence unnecessary verbose install messages from CMAKE
CMAKE_FLAGS += -DCMAKE_INSTALL_MESSAGE=LAZY
OMC_IPOPT_ROOT = 3rdParty/Ipopt-3.13.4
OMC_TBB_ROOT = 3rdParty/tbb
ifeq ("$(APP)",".app")
BUILD_DIRS += $(builddir_app)
endif
# create directories directly after parsing the Makefile if OMBUILDDIR is not empty!
ifneq ($(OMBUILDDIR),)
$(info Creating dirs: $(BUILD_DIRS))
$(info $(shell mkdir -p $(BUILD_DIRS)))
endif
.PHONY : interactive omc release all fmi test install-dirs susan susan_all susgen sustst runtimeCPPinstall runtimeCPPinstallOld CMinpack metis Cdaskr libryu boehm-gc libzmq cppzmq libffi $(MINGW_EXTRA_LIBS) antlr-copy $(SEMLA_LIB) $(SEMLA_CLEAN)
ifeq ($(OM_ENABLE_ENCRYPTION),yes)
semla:
mkdir -p ../OMEncryption/3rdParty/SEMLA/build
# Build SEMLA
(cd ../OMEncryption/3rdParty/SEMLA/build && test -f Makefile || \
$(CMAKE) -DCMAKE_COLOR_MAKEFILE:Bool=OFF \
-DTOOL_PRIVATE_KEY_DIRECTORY:String=`pwd`/../src/openssl_keys \
-DLVE_KEYS_DIRECTORY:String=`pwd`/../src/openssl_keys \
-DTOOLS_PUBLIC_KEYS_DIRECTORY:String=`pwd`/../src/openssl_keys \
-DLICENSE_MANAGER:String=testingdummy \
-DDECRYPTOR:String=default \
-DOBFUSCATOR:String=dummy \
-DCMAKE_INSTALL_BINDIR="$(builddir_bin_semla)" \
-DCMAKE_INSTALL_LIBDIR="$(builddir_lib_semla)" \
-DCMAKE_INSTALL_INCLUDEDIR="$(builddir_inc_semla)" \
../src -G $(CMAKE_TARGET))
# Put the msys perl before ucrt perl to compile openssl
env PATH=/usr/bin:"$(PATH)" $(MAKE) -C ../OMEncryption/3rdParty/SEMLA/build install
semla-clean:
rm -rf ../OMEncryption/3rdParty/SEMLA/build
rm -rf ../OMEncryption/3rdParty/SEMLA/install
rm -rf $(builddir_bin)/omc-semla
endif # end of OM_ENABLE_ENCRYPTION
release: omc
bootstrap-dependencies-post: bootstrap-dependencies-post-compiler-runtime bootstrap-dependencies-post-compiler-builtin bootstrap-dependencies-post-parser
bootstrap-dependencies-post-compiler-runtime:
$(MAKE) -f $(defaultMakefileTarget) -C Compiler/runtime install_bootstrapping BOOTSTRAPPING=1 OMBUILDDIR=$(OMBUILDDIR)
bootstrap-dependencies-post-compiler-builtin:
$(MAKE) -f $(defaultMakefileTarget) -C Compiler builtin OMBUILDDIR=$(OMBUILDDIR)
bootstrap-dependencies-post-parser: $(SEMLA_LIB)
$(MAKE) -f $(defaultMakefileTarget) -C Parser install_bootstrapping OMBUILDDIR=$(OMBUILDDIR) OM_ENABLE_ENCRYPTION=$(OM_ENABLE_ENCRYPTION)
bootstrap-dependencies: $(BOOTSTRAP_FMIL_DEP) cppzmq interactive-short
$(MAKE) -f $(defaultMakefileTarget) bootstrap-dependencies-post
antlr-copy:
cp ./3rdParty/antlr/3.2/tool/antlr-3.2.jar ./3rdParty/antlr/3.2/tool/antlr-2.7.7.jar ${builddir_java}/
sim-dependencies: fmi $(BOOTSTRAP_FMIL_DEP) opencl_rt lis metis opc parmodauto
$(builddir_share)/omc/omc_communication.idl: Compiler/runtime/omc_communication.idl
mkdir -p $(builddir_share)/omc
cp -a "$<" "$@"
idl: $(builddir_share)/omc/omc_communication.idl
interactive-common: .testvariables boehm-gc libryu idl antlr-copy libffi $(MINGW_EXTRA_LIBS)
interactive-short: .testvariables interactive-common
$(MAKE) -C SimulationRuntime/c -f $(defaultMakefileTarget) bootstrap-dependencies OMBUILDDIR=$(OMBUILDDIR)
interactive: .testvariables interactive-common lis Cdaskr CMinpack docs cppzmq $(IPOPT_TARGET) $(SUITESPARSE_TARGET) antlr-copy $(MINGW_EXTRA_LIBS) OMSI $(SEMLA_LIB)
$(MAKE) -C SimulationRuntime/c -f $(defaultMakefileTarget) OMBUILDDIR=$(OMBUILDDIR)
$(MAKE) -f $(defaultMakefileTarget) bootstrap-dependencies-post
opc: .testvariables boehm-gc
$(MAKE) -C SimulationRuntime/opc/ua -f $(defaultMakefileTarget) OMBUILDDIR=$(OMBUILDDIR)
test ! `uname` = Darwin || (install_name_tool -id @rpath/libomopcua.dylib "$(builddir_lib_omc)/libomopcua.dylib")
docs:
mkdir -p $(builddir_doc)/omc/testmodels
cp -p Examples/*.* $(builddir_doc)/omc/testmodels/
rm -f $(builddir_doc)/omc/testmodels/CMake*.txt
#$(MAKE) -C Compiler/Translation OMBUILDDIR=$(OMBUILDDIR) release
GC_HEADERS=gc.h gc_allocator.h gc_amiga_redirects.h gc_backptr.h gc_config_macros.h gc_gcj.h gc_pthread_redirects.h
libgc-dev: /usr/include/gc/gc_inline.h
libgc-dev: /usr/include/gc/gc_mark.h
libgc-dev: /usr/include/gc/gc_pthread_redirects.h
libgc-dev: /usr/include/gc/gc_tiny_fl.h
libgc-dev: /usr/include/gc/gc_typed.h
libgc-dev: /usr/include/gc/gc_version.h
libgc-dev: /usr/include/gc/leak_detector.h
libgc-dev: /usr/include/gc/new_gc_alloc.h
libgc-dev: /usr/include/gc/weakpointer.h
boehm-gc: boehm-gc-lib $(OMBUILDDIR)/include/omc/c/gc.h $(OMBUILDDIR)/include/omc/c/gc_config_macros.h $(OMBUILDDIR)/include/omc/c/gc_version.h $(OMBUILDDIR)/include/omc/c/gc_pthread_redirects.h
$(builddir_bin)/libomcgc-1.dll: 3rdParty/gc/.libs/libomcgc-1.dll
cp -p $< $@
cp -p 3rdParty/gc/.libs/libomcgc.dll.a $(builddir_lib)/omc/libomcgc.dll.a
3rdParty/gc/.libs/libomcgc-1.dll: 3rdParty/gc/Makefile
$(MAKE) -C 3rdParty/gc/ libomcgc.la
$(OMBUILDDIR)/include/omc/c/gc.h: 3rdParty/gc/include/gc.h
cp -pPR $< $@
$(OMBUILDDIR)/include/omc/c/gc_config_macros.h: 3rdParty/gc/include/gc_config_macros.h
cp -pPR $< $@
$(OMBUILDDIR)/include/omc/c/gc_version.h: 3rdParty/gc/include/gc_version.h
cp -pPR $< $@
$(OMBUILDDIR)/include/omc/c/gc_pthread_redirects.h: 3rdParty/gc/include/gc_pthread_redirects.h
cp -pPR $< $@
3rdParty/gc/Makefile: 3rdParty/gc/configure.ac
(cd 3rdParty/gc && mkdir -p m4 libatomic_ops/m4 && autoreconf -vif && automake --add-missing && ./configure --prefix="`pwd`" "--host=$(host)" $(LIBGC_EXTRA_CONFIGURATION) --enable-shared --disable-static --disable-gcj-support --disable-java-finalization --enable-large-config CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) -DLARGE_CONFIG -DTHREAD_LOCAL_ALLOC")
ipopt:
mkdir -p $(OMC_IPOPT_ROOT)/build
cd $(OMC_IPOPT_ROOT)/build && $(CMAKE) .. \
-G $(CMAKE_TARGET) \
-DCMAKE_VERBOSE_MAKEFILE:Bool=ON \
-DCMAKE_INSTALL_PREFIX:PATH="$(top_builddir)" \
-DCMAKE_INSTALL_LIBDIR="$(builddir_lib_omc)" \
-DCMAKE_INSTALL_INCLUDEDIR="$(builddir_inc)" \
-DIPOPT_BUILD_SHARED_LIBS:Bool=OFF \
-DMUMPS_BUILD_SHARED_LIBS:Bool=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
$(MAKE) -C $(OMC_IPOPT_ROOT)/build/ install
ipopt-clean:
if test -f $(OMC_IPOPT_ROOT)/build/Makefile; then $(MAKE) -C $(OMC_IPOPT_ROOT)/build/ clean; fi
rm -rf $(OMC_IPOPT_ROOT)/build
suitesparse:
mkdir -p 3rdParty/SuiteSparse-5.8.1/build
cd 3rdParty/SuiteSparse-5.8.1/build && $(CMAKE_NO_CHECK_UNDEFINED) .. -G $(CMAKE_TARGET) \
-DCMAKE_VERBOSE_MAKEFILE:Bool=ON \
-DCMAKE_INSTALL_PREFIX:PATH="$(OMBUILDDIR)" \
-DCMAKE_INSTALL_LIBDIR="$(LIB_OMC)" \
-DCMAKE_INSTALL_INCLUDEDIR="$(OMBUILDDIR)/include/omc/c/" \
-DBUILD_SHARED_LIBS:Bool=$(SUITESPARSE_SHARED)
$(MAKE) -C 3rdParty/SuiteSparse-5.8.1/build install
test ! `uname` = Darwin || install_name_tool -id @rpath/libamd.dylib "$(builddir_lib_omc)/libamd.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libbtf.dylib "$(builddir_lib_omc)/libbtf.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libcolamd.dylib "$(builddir_lib_omc)/libcolamd.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libklu.dylib "$(builddir_lib_omc)/libklu.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsuitesparseconfig.dylib "$(builddir_lib_omc)/libsuitesparseconfig.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libumfpack.dylib "$(builddir_lib_omc)/libumfpack.dylib"
# fix rpaths
test ! `uname` = Darwin || install_name_tool -change libbtf.dylib "@rpath/libbtf.dylib" "$(builddir_lib_omc)/libklu.dylib"
test ! `uname` = Darwin || install_name_tool -change libamd.dylib "@rpath/libamd.dylib" "$(builddir_lib_omc)/libklu.dylib"
test ! `uname` = Darwin || install_name_tool -change libcolamd.dylib "@rpath/libcolamd.dylib" "$(builddir_lib_omc)/libklu.dylib"
test ! `uname` = Darwin || install_name_tool -change libamd.dylib "@rpath/libamd.dylib" "$(builddir_lib_omc)/libumfpack.dylib"
suitesparse-clean:
$(MAKE) -C 3rdParty/SuiteSparse-5.8.1 distclean
rm -rf 3rdParty/SuiteSparse-5.8.1/build 3rdParty/SuiteSparse-5.8.1/build_msvc
$(OMBUILDDIR)/$(LIB_OMC)/libopenblas_openmodelica.a:
$(MAKE) -C 3rdParty/OpenBLAS-0.2.8 CC="$(CC)" CXX="$(CXX)" FC="$(FC)" FCFLAGS="$(FCFLAGS)" USE_THREAD=0 NO_LAPACKE=1 LIBNAMESUFFIX=openmodelica $(OPENBLAS_EXTRA_ARGS)
$(MAKE) -C 3rdParty/OpenBLAS-0.2.8 PREFIX=$(OMBUILDDIR) OPENBLAS_LIBRARY_DIR="$(OMBUILDDIR)/$(LIB_OMC) OPENBLAS_INCLUDE_DIR="$(OMBUILDDIR)/3rdParty/build/install-includes/ NO_LAPACKE=1 LIBNAMESUFFIX=openmodelica install
openblas: $(OMBUILDDIR)/$(LIB_OMC)/libopenblas_openmodelica.a
opencl_rt: boehm-gc
ifeq ("$(OPENCL)","Yes")
$(MAKE) -C SimulationRuntime/ParModelica/explicit/openclrt -f $(defaultMakefileTarget) OMBUILDDIR=$(OMBUILDDIR)
endif
opencl_rt_clean:
$(MAKE) -C SimulationRuntime/ParModelica/explicit/openclrt -f $(defaultMakefileTarget) clean OMBUILDDIR=$(OMBUILDDIR)
tbb: boehm-gc
mkdir -p $(OMC_TBB_ROOT)/build_cmake
cd $(OMC_TBB_ROOT)/build_cmake && $(CMAKE) .. \
-G $(CMAKE_TARGET) \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX="$(top_builddir)" \
-DCMAKE_INSTALL_LIBDIR="$(builddir_lib_omc)" \
-DCMAKE_INSTALL_INCLUDEDIR="$(builddir_inc)" \
-DCMAKE_INSTALL_DATAROOTDIR="$(builddir_share)" \
-DTBB_BUILD_TESTS=OFF \
-DTBB_BUILD_SHARED=OFF \
-DTBB_BUILD_TBBMALLOC=OFF \
-DTBB_BUILD_TBBMALLOC_PROXY=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
$(MAKE) -C $(OMC_TBB_ROOT)/build_cmake install
tbb_clean:
if test -f $(OMC_TBB_ROOT)/build_cmake/Makefile; then $(MAKE) -C $(OMC_TBB_ROOT)/build_cmake/ clean; fi
rm -rf $(OMC_TBB_ROOT)/build_cmake
parmodauto: tbb
$(MAKE) -C SimulationRuntime/ParModelica/auto/ -f $(defaultMakefileTarget) OMBUILDDIR=$(OMBUILDDIR)
parmodauto_clean: tbb_clean
$(MAKE) -C SimulationRuntime/ParModelica/auto/ -f $(defaultMakefileTarget) clean OMBUILDDIR=$(OMBUILDDIR)
breakprocess:
(cd tools/debugging/ && time g++ BreakProcess.cpp -o BreakProcess -static-libgcc)
(cd tools/debugging/ && cp BreakProcess.exe $(builddir_bin))
runtimeCPPinstall: all-runtimeCPPinstall
all-runtimeCPPinstall: omc-and-runtimeCPPinstall
# OMSICPPinstall depends on omc which compiles everything needed such as FMI, sundials, OMSI, etc
omc-and-runtimeCPPinstall:
$(MAKE) -f $(defaultMakefileTarget) runtimeCPPinstallOld OMBUILDDIR=$(OMBUILDDIR)
CMAKE_ARGS=$(filter CMAKE_%, $(MAKEFLAGS))
omcCAPIinstall: ModelicaExternalC
$(MAKE) -C SimulationRuntime/OMSICpp/ -f $(defaultMakefileTarget) omcCAPIinstall CC="$(CC)" CXX="$(CXX)" $(CMAKE_ARGS) OMBUILDDIR=$(OMBUILDDIR)
runtimeCPP: OMSICPPinstall antlr-copy $(MINGW_EXTRA_LIBS)
$(MAKE) -C SimulationRuntime/cpp/ -f $(defaultMakefileTarget) OMBUILDDIR=$(OMBUILDDIR)
runtimeCPPinstallOld: runtimeCPP
$(MAKE) -C SimulationRuntime/cpp/ -f $(defaultMakefileTarget) CC="$(CC)" CXX="$(CXX)" install ANALYZATION_MODE="$(ANALYZATION_MODE)" $(CMAKE_ARGS) OMBUILDDIR=$(OMBUILDDIR)
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppMath.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppExtensionUtilities.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppModelicaUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppModelicaUtilities.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppDataExchange.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppDataExchange.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppDataExchange.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppSimulationSettings.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppSimulationSettings.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppSimulationSettings.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppBroyden.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppBroyden.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppBroyden.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppBroyden.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppBroyden.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppEuler.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppEuler.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppEuler.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppEuler.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppEuler.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppRTEuler.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppRTEuler.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppRTEuler.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppRTEuler.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppRTEuler.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppRK12.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppRK12.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppRK12.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppRK12.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppRK12.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppNewton.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppNewton.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppNewton.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppNewton.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppNewton.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppHybrj.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppHybrj.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppHybrj.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppHybrj.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppHybrj.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppPeer.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppPeer.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppPeer.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppPeer.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppPeer.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppSolver.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppSolver.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppSolver.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppIDA.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppIDA.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppIDA.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppIDA.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppIDA.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppFMU.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppFMU.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppFMU.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppKinsol.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppKinsol.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppKinsol.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppKinsol.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppKinsol.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppSystem.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppSystem.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppSystem.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppSimulationSettings.dylib @rpath/libOMCppSimulationSettings.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppSystem.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppCVode.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppCVode.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppCVode.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppCVode.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppCVode.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppLinearSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppLinearSolver.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppLinearSolver.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppLinearSolver.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppLinearSolver.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppSimController.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppSimController.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppModelicaUtilities.dylib @rpath/libOMCppModelicaUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppSimController.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppSimController.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppUmfPack.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppUmfPack.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppUmfPack.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppUmfPack.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppExtensionUtilities.dylib @rpath/libOMCppExtensionUtilities.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppUmfPack.dylib
test ! `uname` = Darwin || install_name_tool -id @rpath/libOMCppUmfPack.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppUmfPack.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppSolver.dylib @rpath/libOMCppSolver.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppUmfPack.dylib
test ! `uname` = Darwin || install_name_tool -change libOMCppMath.dylib @rpath/libOMCppMath.dylib $(OMBUILDDIR)/$(LIB_OMC)/cpp/libOMCppUmfPack.dylib
runtimeCPPclean:
$(MAKE) -C SimulationRuntime/cpp/ -f $(defaultMakefileTarget) clean OMBUILDDIR=$(OMBUILDDIR)
testlibrariemsl31cpp:
(cd testsuite/openmodelica/cppruntime/libraries/msl31 && time $(MAKE) -f Makefile > testsuite-msl31-cpp-trace.txt 2>&1)
echo "log is in testsuite/openmodelica/cppruntime/libraries/msl31/testsuite-msl31-cpp-trace.txt"
testlibrariemsl32cpp:
(cd testsuite/openmodelica/cppruntime/libraries/msl32 && time $(MAKE) -f Makefile > testsuite-msl32-cpp-trace.txt 2>&1)
echo "log is in testsuite/openmodelica/cppruntime/libraries/msl32/testsuite-msl32-cpp-trace.txt"
# Build and install FMILibrary
fmil: $(OMBUILDDIR)/$(LIB_OMC)/$(LIBFMILIB)
$(OMBUILDDIR)/$(LIB_OMC)/$(LIBFMILIB): 3rdParty/FMIL/build/Makefile
@# Pass CC/CFLAGS/CPPFLAGS because FMIL does not configure subprojects with the selected CC. Shocking; a cmake project not working the way it should.
test -f 3rdParty/FMIL/build/$(LIBFMILIB) || CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" $(MAKE) -C 3rdParty/FMIL/build
test -d 3rdParty/FMIL/install || $(MAKE) -C 3rdParty/FMIL/build install
test "(" ! `uname` = Darwin ")" -o "(" ! -f 3rdParty/FMIL/install/$(LIB_OMC)/libfmilib_shared$(SHREXT) ")" || install_name_tool -id @rpath/libfmilib_shared$(SHREXT) 3rdParty/FMIL/install/$(LIB_OMC)/libfmilib_shared$(SHREXT)
cp -pPR 3rdParty/FMIL/install/$(LIB_OMC)/$(LIBFMILIB) $(builddir_lib_omc)
cp -v -pPR 3rdParty/FMIL/install/$(LIB_OMC)/libfmilib* $(builddir_lib_omc);\
test ! -f $(OMBUILDDIR)/$(LIB_OMC)/libfmilib_shared$(SHREXT) || ln -sf libfmilib_shared$(SHREXT) $(OMBUILDDIR)/$(LIB_OMC)/libfmilib$(SHREXT)
#TODO: Only copy required headers, add them in omc/fmi subfolder, and do not copy c/txt-files
mkdir -p $(builddir_inc)/fmil/
cp -pPR 3rdParty/FMIL/install/include/* $(builddir_inc)/fmil/
3rdParty/FMIL/build/Makefile: 3rdParty/FMIL/CMakeLists.txt $(LIBMODELICAZLIB)
test -d 3rdParty/FMIL
mkdir -p 3rdParty/FMIL/build
(cd 3rdParty/FMIL/build && test -f Makefile || CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" $(CMAKE) -D CMAKE_AR:String="$(AR)" $(MINGW_FMIL_FLAGS) -D FMILIB_BUILD_SHARED_LIB:Bool=ON -D FMILIB_BUILD_TESTS:Bool=OFF -D FMILIB_GENERATE_DOXYGEN_DOC:Bool=OFF -DCMAKE_INSTALL_PREFIX:String=../install -DCMAKE_INSTALL_LIBDIR="$(LIB_OMC)" -DCMAKE_INSTALL_INCLUDEDIR=include -DOMC_ZLIB_LIBRARY=$(LIBMODELICAZLIB) -DOMC_ZLIB_INCLUDE_DIR=$(builddir_inc) .. -G $(CMAKE_TARGET))
# Install expat
expat: fmil
cp -pPR 3rdParty/FMIL/build/ExpatEx/install/lib/libexpat$(STAEXT) $(builddir_lib_omc)
qjson:
test -d 3rdParty/qjson-0.8.1
mkdir -p 3rdParty/qjson-0.8.1/build/include/qjson
(cd 3rdParty/qjson-0.8.1/build && test -f Makefile || CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" $(CMAKE) -D CMAKE_AR:String="$(AR)" .. -G $(CMAKE_TARGET))
test -f 3rdParty/qjson-0.8.1/build/lib/libqjson$(SHREXT) || $(MAKE) -C 3rdParty/qjson-0.8.1/build
test "(" ! `uname` = Darwin ")" -o "(" ! -f 3rdParty/qjson-0.8.1/build/lib/libqjson$(SHREXT) ")" || install_name_tool -id @rpath/libqjson$(SHREXT) 3rdParty/qjson-0.8.1/build/lib/libqjson$(SHREXT)
cp -a 3rdParty/qjson-0.8.1/build/lib/libqjson*$(SHREXT)* $(builddir_lib_omc)
cp -a 3rdParty/qjson-0.8.1/src/*.h 3rdParty/qjson-0.8.1/build/include/qjson
CMinpack: $(builddir_lib_omc)/$(LIBCMINPACKLIB)
$(builddir_lib_omc)/$(LIBCMINPACKLIB): 3rdParty/CMinpack/build/Makefile
test -f 3rdParty/CMinpack/build/$(LIBCMINPACKLIB) || $(MAKE) -C 3rdParty/CMinpack/build
test ! `uname` = Darwin || install_name_tool -id @rpath/$(LIBCMINPACKLIB) 3rdParty/CMinpack/build/$(LIBCMINPACKLIB)
# copy dll/so to $(LIB_OMC)/ folders
(rm -f $(builddir_lib_omc)/$(LIBCMINPACKLIB)*)
(cp -af 3rdParty/CMinpack/build/$(LIBCMINPACKLIB)* $(builddir_lib_omc))
# Darwin has to be special always
(test ! `uname` = Darwin || cp -af 3rdParty/CMinpack/build/lib*.dylib $(builddir_lib_omc))
3rdParty/CMinpack/build/Makefile: 3rdParty/CMinpack/CMakeLists.txt
test -d 3rdParty/CMinpack
mkdir -p 3rdParty/CMinpack/build
(cd 3rdParty/CMinpack/build && test -f Makefile || CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" $(CMAKE) -DCMAKE_VERBOSE_MAKEFILE:Bool=ON -D CMAKE_AR:String="$(AR)" -DCMAKE_COLOR_MAKEFILE:Bool=OFF -DCMINPACK_BUILD_SHARED_LIBS:Bool=$(CMINPACKLIB_SHARED) -DCMAKE_INSTALL_PREFIX:String=../install -DCMAKE_INSTALL_LIBDIR="$(LIB_OMC)" .. -G $(CMAKE_TARGET))
CMinpack-clean:
rm -rf 3rdParty/CMinpack/install
#This is a bad idea, because the cache contains the absolute path to cmake that was used for build -> if the cmake location has changed, the clean command will fail
#if test -f 3rdParty/CMinpack/build/Makefile; then $(MAKE) -C 3rdParty/CMinpack/build clean; fi
#rm -f 3rdParty/CMinpack/build/Makefile
rm -rf 3rdParty/CMinpack/build
libzmq: $(builddir_lib_omc)/$(LIBZMQLIB)
$(builddir_lib_omc)/$(LIBZMQLIB):
test -d 3rdParty/libzmq
mkdir -p 3rdParty/libzmq/build
(cd 3rdParty/libzmq/build && test -f Makefile || CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" $(CMAKE) -DCMAKE_VERBOSE_MAKEFILE:Bool=ON -DCMAKE_AR:String="$(AR)" -DCMAKE_INSTALL_PREFIX="`pwd`" -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_COLOR_MAKEFILE:Bool=OFF -DWITH_PERF_TOOL:Bool=OFF -DZMQ_BUILD_TESTS:Bool=OFF -DENABLE_CPACK:Bool=OFF -DCMAKE_BUILD_TYPE=Release .. -G $(CMAKE_TARGET))
test -f 3rdParty/libzmq/build/lib/$(LIBZMQLIB) || $(MAKE) -C 3rdParty/libzmq/build install
test ! `uname` = Darwin || install_name_tool -id @rpath/$(LIBZMQLIB) 3rdParty/libzmq/build/lib/$(LIBZMQLIB)
# copy dll/so to $(LIB_OMC) and $(builddir_bin) folders
#(rm -f $(builddir_lib_omc)/$(LIBZMQLIB)*)
#(rm -f $(builddir_bin)/$(LIBZMQLIB)*)
(cp -af 3rdParty/libzmq/build/lib/$(LIBZMQLIB)* $(builddir_lib_omc))
cp 3rdParty/libzmq/build/include/* $(builddir_inc)/c/
# Darwin has to be special always; libzmq*.dylib while Linux is libzmq.so* ...
(test ! `uname` = Darwin || cp -af 3rdParty/libzmq/build/lib/lib*.dylib $(builddir_lib_omc))
ifeq ($(SHREXT),.dll)
(cp -af 3rdParty/libzmq/build/lib/$(LIBZMQLIB)* $(builddir_bin))
endif
cppzmq: libzmq
test -d 3rdParty/cppzmq
mkdir -p 3rdParty/cppzmq/build
(cd 3rdParty/cppzmq/build && test -f Makefile || CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" $(CMAKE) -DCMAKE_FIND_DEBUG_MODE:Bool=ON -DCPPZMQ_BUILD_TESTS:Bool=OFF -DZeroMQ_DIR=../libzmq/build/share/cmake/ZeroMQ -DCMAKE_VERBOSE_MAKEFILE:Bool=ON -DCMAKE_FIND_DEBUG_MODE:Bool=ON -DCMAKE_AR:String="$(AR)" -DCMAKE_INSTALL_PREFIX="`pwd`" -DCMAKE_COLOR_MAKEFILE:Bool=OFF -DWITH_PERF_TOOL:Bool=OFF .. -G $(CMAKE_TARGET))
$(MAKE) -C 3rdParty/cppzmq/build install
libzmq-clean:
rm -rf 3rdParty/libzmq/build
cppzmq-clean:
rm -rf 3rdParty/cppzmq/build
metis: $(OMBUILDDIR)/$(LIB_OMC)/libmetis$(STAEXT)
$(OMBUILDDIR)/$(LIB_OMC)/libmetis$(STAEXT): 3rdParty/metis-5.1.0/CMakeLists.txt
mkdir -p 3rdParty/metis-5.1.0/build
(cd 3rdParty/metis-5.1.0/build && $(CMAKE) ../ -DCMAKE_VERBOSE_MAKEFILE:Bool=ON -DCMAKE_INSTALL_LIBDIR="$(LIB_OMC)" -DCMAKE_INSTALL_INCLUDEDIR="include" -G $(CMAKE_TARGET) && CC="$(CC)" CFLAGS="$(CFLAGS)" $(MAKE))
cp 3rdParty/metis-5.1.0/build/libmetis/libmetis$(STAEXT) $(OMBUILDDIR)/$(LIB_OMC)/libmetis$(STAEXT)
metis-clean:
test ! -f 3rdParty/metis-5.1.0/Makefile || $(MAKE) -C 3rdParty/metis-5.1.0 clean
rm -rf 3rdParty/metis-5.1.0/CMakeCache.txt 3rdParty/metis-5.1.0/libmetis/libmetis.a 3rdParty/metis-5.1.0/CMakeFiles 3rdParty/metis-5.1.0/Makefile 3rdParty/metis-5.1.0/cmake_install.cmake 3rdParty/metis-5.1.0/include/CMakeFiles 3rdParty/metis-5.1.0/include/Makefile 3rdParty/metis-5.1.0/include/cmake_install.cmake 3rdParty/metis-5.1.0/libmetis/CMakeFiles 3rdParty/metis-5.1.0/libmetis/Makefile 3rdParty/metis-5.1.0/libmetis/cmake_install.cmake 3rdParty/metis-5.1.0/programs/CMakeFiles 3rdParty/metis-5.1.0/programs/Makefile 3rdParty/metis-5.1.0/programs/cmake_install.cmake
libryu: 3rdParty/ryu/ryu/libryu.a
3rdParty/ryu/ryu/libryu.a:
test -d 3rdParty/ryu/ryu
(cd 3rdParty/ryu/ryu && $(MAKE) -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)")
cp 3rdParty/ryu/ryu/ryu.h $(builddir_inc)/
cp 3rdParty/ryu/ryu/om_format.h $(builddir_inc)/
cp 3rdParty/ryu/ryu/libryu$(STAEXT) $(OMBUILDDIR)/$(LIB_OMC)/libryu$(STAEXT)
Cdaskr: 3rdParty/Cdaskr/solver/libcdaskr.a
3rdParty/Cdaskr/solver/libcdaskr.a:
test -d 3rdParty/Cdaskr/solver
(cd 3rdParty/Cdaskr/solver && $(MAKE) -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)")
Cdaskr-clean:
cd 3rdParty/Cdaskr/solver && $(MAKE) -f Makefile clean
testfast: test
test:
(time $(MAKE) -C testsuite -f Makefile)
testlog:
(time $(MAKE) -C testsuite -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!
susan: all sustst
sustst:
(cd Compiler/susan_codegen && $(MAKE) -f Makefile test)
cleancompiler:
cd Compiler/boot && rm -rf "$(OMBUILDDIR)"
$(MAKE) -f $(defaultMakefileTarget) -C Compiler/Script clean OMBUILDDIR=$(OMBUILDDIR)
distclean: clean
(cd Compiler && $(MAKE) -f $(defaultMakefileTarget) reallyclean OMBUILDDIR=$(OMBUILDDIR))
rm -f Compiler/.depend
rm -f $(autoconfGeneratedFiles)
rm -f config.status config.log
rm -rf build/
fmil-clean:
rm -rf 3rdParty/FMIL/build 3rdParty/FMIL/install 3rdParty/FMIL/Makefile
gc-clean:
if test -f 3rdParty/gc/Makefile; then $(MAKE) -C 3rdParty/gc distclean; fi
rm -f 3rdParty/gc/Makefile
bootstrap-clean:
$(MAKE) -C Compiler/boot clean -f $(defaultMakefileTarget) OMBUILDDIR=$(OMBUILDDIR)
openblas-clean:
# OpenBLAS make clean actually gives error-messages. Let it do it, but silently
test ! -d 3rdParty/OpenBLAS-0.2.8 || $(MAKE) -C 3rdParty/OpenBLAS-0.2.8 clean > /dev/null 2>&1
clean: $(SEMLA_CLEAN) fmil-clean opencl_rt_clean gc-clean lis-clean runtimeCPPclean CMinpack-clean metis-clean Cdaskr-clean bootstrap-clean msgpack-clean openblas-clean suitesparse-clean OMSI-clean libffi-clean ipopt-clean ModelicaExternalC-clean zlib-clean
(cd SimulationRuntime/c && $(MAKE) -f $(defaultMakefileTarget) clean OMBUILDDIR=$(OMBUILDDIR))
(cd Compiler && $(MAKE) -f $(defaultMakefileTarget) clean OMBUILDDIR=$(OMBUILDDIR))
(cd Parser && $(MAKE) -f $(defaultMakefileTarget) clean OMBUILDDIR=$(OMBUILDDIR))
$(MAKE) -C Compiler/Template -f $(defaultMakefileTarget) clean OMBUILDDIR=$(OMBUILDDIR)
(rm -rf SimulationRuntime/build_c)
rm -rf 3rdParty/sundials-5.4.0/build
rm -rf $(OMBUILDDIR)/share $(OMBUILDDIR)/lib $(OMBUILDDIR)/include $(OMBUILDDIR)/bin/OMShell* $(OMBUILDDIR)/bin/OMNotebook* \
$(OMBUILDDIR)/bin/omc $(OMBUILDDIR)/bin/omc.exe $(OMBUILDDIR)/bin/omc-diff $(OMBUILDDIR)/bin/omc-diff.exe \
bom-error.log bom-error.sh tab-error.log
install-dirs:
@test ! "${DESTDIR}/${prefix}" -ef "${top_builddir}/build" || (echo Error: Install and build dirs are the same && false)
if [ "$(APP)" = ".app" ]; then mkdir -p ${INSTALL_APPDIR}; fi
mkdir -p ${INSTALL_BINDIR}
mkdir -p ${INSTALL_LIBDIR}
mkdir -p ${INSTALL_INCLUDEDIR}/omc
mkdir -p ${INSTALL_INCLUDEDIR}/$(host_short)/omc/antlr3
mkdir -p ${INSTALL_DOCDIR}/omc/testmodels
mkdir -p ${INSTALL_MANDIR}/man1/
mkdir -p ${INSTALL_LOCALEDIR}
mkdir -p ${INSTALL_SHAREDIR}/omc/scripts ${INSTALL_JAVADIR}
install: install-dirs
echo Installing OpenModelica...
# Application directory (OSX)
if [ "$(APP)" = ".app" ]; then cp -rp ${builddir_app} $(INSTALL_APPDIR); fi
# Binaries
cp -a ${builddir_bin}/* ${INSTALL_BINDIR}
# Libraries
cp -a ${builddir_lib}/* ${INSTALL_LIBDIR}
# Includes
cp -a ${builddir_inc}/* ${INSTALL_INCLUDEDIR}/omc
cp -a $(OMBUILDDIR)/include/$(host_short)/omc/antlr3 ${INSTALL_INCLUDEDIR}/$(host_short)/omc/antlr3
# License
cp -p COPYING ${INSTALL_DOCDIR}/omc/
# Documents
test -z "$(HAVE_DOCDIR)" || cp -p ${builddir_doc}/omc/*.pdf ${INSTALL_DOCDIR}/omc/
cp -p ${builddir_doc}/omc/testmodels/* ${INSTALL_DOCDIR}/omc/testmodels/
# man pages
# cp -p ${builddir_man}/man1/*.gz ${INSTALL_MANDIR}/man1/
# Shared data
cp -rp ${builddir_share}/omc/*.* ${builddir_share}/omc/runtime ${INSTALL_SHAREDIR}/omc/
# Scripts
cp -rp ${builddir_share}/omc/scripts/*.* ${INSTALL_SHAREDIR}/omc/scripts
# Java
cp -p /${builddir_java}/* ${INSTALL_JAVADIR}
# Translations
#cp -rp /${builddir_locale}/* ${INSTALL_LOCALEDIR}/
3rdParty/msgpack-0.5.8/Makefile:
cd 3rdParty/msgpack-0.5.8 && ./configure --prefix="`pwd`" "--host=$(host)" CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS) $(MSGPACK_CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS) "
$(builddir_lib_omc)/libmsgpackc.so.2.0.0: 3rdParty/msgpack-0.5.8/Makefile
$(MAKE) -C 3rdParty/msgpack-0.5.8
cp -a 3rdParty/msgpack-0.5.8/src/.libs/libmsgpackc.so* build/$(LIB_OMC)/
$(builddir_lib_omc)/libmsgpackc.2.dylib: 3rdParty/msgpack-0.5.8/Makefile
$(MAKE) -C 3rdParty/msgpack-0.5.8
install_name_tool -id @rpath/libmsgpackc.2.dylib 3rdParty/msgpack-0.5.8/src/.libs/libmsgpackc.2.dylib
cp -a 3rdParty/msgpack-0.5.8/src/.libs/libmsgpackc*dylib build/$(LIB_OMC)/
cp -a 3rdParty/msgpack-0.5.8/src/msgpack.h 3rdParty/msgpack-0.5.8/src/msgpack/ $(builddir_inc)/c
$(builddir_lib_omc)/libmsgpackc.a: 3rdParty/msgpack-0.5.8/Makefile
$(MAKE) -C 3rdParty/msgpack-0.5.8
cp -a 3rdParty/msgpack-0.5.8/src/.libs/libmsgpackc.a build/$(LIB_OMC)/
cp -a 3rdParty/msgpack-0.5.8/src/msgpack.h 3rdParty/msgpack-0.5.8/src/msgpack/ $(builddir_inc)/c
ifeq ($(SHREXT),.so)
msgpack: build/$(LIB_OMC)/libmsgpackc.so.2.0.0
else
ifeq ($(SHREXT),.dylib)
msgpack: build/$(LIB_OMC)/libmsgpackc.2.dylib
else
msgpack: build/$(LIB_OMC)/libmsgpackc.a
endif
endif
msgpack-clean:
test ! -f 3rdParty/msgpack-0.5.8/Makefile || $(MAKE) -C 3rdParty/msgpack-0.5.8 distclean || true
rm -f 3rdParty/msgpack-0.5.8/Makefile
# build sqlite3
sqlite3: 3rdParty/sqlite3/Makefile
$(MAKE) -C 3rdParty/sqlite3/ install CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)"
3rdParty/sqlite3/Makefile: 3rdParty/sqlite3/configure.ac
(cd 3rdParty/sqlite3 && autoreconf -vif && automake --add-missing && ./configure --prefix="`pwd`/build" "--host=$(host)" CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)")
clean-sqlite3:
rm -rf 3rdParty/sqlite3/build
# build sundials
sundials: suitesparse
$(MAKE) -f $(defaultMakefileTarget) $(builddir_lib_omc)/libsundials_ida.a
$(builddir_lib_omc)/libsundials_ida.a: 3rdParty/sundials-5.4.0/CMakeLists.txt
mkdir -p 3rdParty/sundials-5.4.0/build
(cd 3rdParty/sundials-5.4.0/build && \
$(CMAKE) .. -G $(CMAKE_TARGET) \
-DCMAKE_VERBOSE_MAKEFILE:Bool=ON \
-DCMAKE_INSTALL_PREFIX="`pwd`" \
-DCMAKE_INSTALL_INCLUDEDIR=include \
-DSUNDIALS_BUILD_SHARED_LIBS:Bool=ON \
-DSUNDIALS_BUILD_STATIC_LIBS:Bool=ON \
-DCMAKE_C_FLAGS="$(CFLAGS) -lm -L $(builddir_lib_omc)" \
-DLDFLAGS="$(LDFLAGS)" \
-DSUNDIALS_KLU_ENABLE:Bool=ON \
-DSUNDIALS_KLU_LIBRARY_DIR="$(builddir_lib_omc)" \
-DKLU_INCLUDE_DIR="$(OMBUILDDIR)/include/omc/c/suitesparse" \
$(SUITESPARSE_LIBS) \
-DSUNDIALS_EXAMPLES_ENABLE_C:Bool=OFF \
-DSUNDIALS_EXAMPLES_ENABLE_CXX:Bool=OFF \
-DSUNDIALS_EXAMPLES_INSTALL=OFF $(IS_MINGW32) $(IS_MINGW64) \
-DSUNDIALS_LAPACK_ENABLE:Bool=ON \
-DLAPACK_LIBRARIES="$(LD_LAPACK)" \
-DCMAKE_Fortran_COMPILER="$(FC)" $(EXTRA_MACOS_FLAGS_SUNDIALS) \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON)
$(MAKE) -C 3rdParty/sundials-5.4.0/build install
# Test SUNDIALS but allow it to fail
#-$(MAKE) -C 3rdParty/sundials-5.4.0/build test test_install || echo "WARNING: SUNDIALS test failing, continuing any way"
mkdir -p $(builddir_inc)/sundials
(cp -pfr 3rdParty/sundials-5.4.0/build/include/* $(builddir_inc))
# copy the libs to the build/lib/omc directory
find 3rdParty/sundials-5.4.0/build/lib* -not -type d -exec cp -apf {} $(builddir_lib_omc) ";"
# this is rather weird, only the file with full version number is the actual lib all the other ones are symlinks
# strange stuff is that *install_name_tool* on a symlink will replace the symlink with the changed dylib
# see http://mac-os-forge.2317878.n4.nabble.com/install-name-tool-problem-with-symlinks-on-Xcode-12-2-td406984.html
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_arkode.4.4.0.dylib "$(builddir_lib_omc)/libsundials_arkode.4.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_cvode.5.4.0.dylib "$(builddir_lib_omc)/libsundials_cvode.5.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_cvodes.5.4.0.dylib "$(builddir_lib_omc)/libsundials_cvodes.5.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_ida.5.4.0.dylib "$(builddir_lib_omc)/libsundials_ida.5.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_idas.4.4.0.dylib "$(builddir_lib_omc)/libsundials_idas.4.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_kinsol.5.4.0.dylib "$(builddir_lib_omc)/libsundials_kinsol.5.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_nvecserial.5.4.0.dylib "$(builddir_lib_omc)/libsundials_nvecserial.5.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_nvecmanyvector.5.4.0.dylib "$(builddir_lib_omc)/libsundials_nvecmanyvector.5.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_sunlinsolband.3.4.0.dylib "$(builddir_lib_omc)/libsundials_sunlinsolband.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_sunlinsoldense.3.4.0.dylib "$(builddir_lib_omc)/libsundials_sunlinsoldense.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_sunlinsolklu.3.4.0.dylib "$(builddir_lib_omc)/libsundials_sunlinsolklu.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_sunlinsollapackband.3.4.0.dylib "$(builddir_lib_omc)/libsundials_sunlinsollapackband.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_sunlinsollapackdense.3.4.0.dylib "$(builddir_lib_omc)/libsundials_sunlinsollapackdense.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_sunlinsolpcg.3.4.0.dylib "$(builddir_lib_omc)/libsundials_sunlinsolpcg.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_sunlinsolspbcgs.3.4.0.dylib "$(builddir_lib_omc)/libsundials_sunlinsolspbcgs.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_sunlinsolspfgmr.3.4.0.dylib "$(builddir_lib_omc)/libsundials_sunlinsolspfgmr.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_sunlinsolspgmr.3.4.0.dylib "$(builddir_lib_omc)/libsundials_sunlinsolspgmr.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_sunlinsolsptfqmr.3.4.0.dylib "$(builddir_lib_omc)/libsundials_sunlinsolsptfqmr.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_sunmatrixband.3.4.0.dylib "$(builddir_lib_omc)/libsundials_sunmatrixband.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_sunmatrixdense.3.4.0.dylib "$(builddir_lib_omc)/libsundials_sunmatrixdense.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_sunmatrixsparse.3.4.0.dylib "$(builddir_lib_omc)/libsundials_sunmatrixsparse.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_sunnonlinsolfixedpoint.2.4.0.dylib "$(builddir_lib_omc)/libsundials_sunnonlinsolfixedpoint.2.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -id @rpath/libsundials_sunnonlinsolnewton.2.4.0.dylib "$(builddir_lib_omc)/libsundials_sunnonlinsolnewton.2.4.0.dylib"
# fix the rpath in some of the libs
test ! `uname` = Darwin || install_name_tool -change libsundials_sunmatrixdense.3.dylib "@rpath/libsundials_sunmatrixdense.3.dylib" "$(builddir_lib_omc)/libsundials_sunlinsoldense.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -change libsundials_sunmatrixdense.3.dylib "@rpath/libsundials_sunmatrixdense.3.dylib" "$(builddir_lib_omc)/libsundials_sunlinsollapackdense.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -change libsundials_sunmatrixdense.3.dylib "@rpath/libsundials_sunmatrixdense.3.dylib" "$(builddir_lib_omc)/libsundials_sunlinsollapackdense.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -change libsundials_sunmatrixsparse.3.dylib "@rpath/libsundials_sunmatrixsparse.3.dylib" "$(builddir_lib_omc)/libsundials_sunlinsolklu.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -change libsundials_sunmatrixband.3.dylib "@rpath/libsundials_sunmatrixband.3.dylib" "$(builddir_lib_omc)/libsundials_sunlinsolband.3.4.0.dylib"
test ! `uname` = Darwin || install_name_tool -change libsundials_sunmatrixband.3.dylib "@rpath/libsundials_sunmatrixband.3.dylib" "$(builddir_lib_omc)/libsundials_sunlinsollapackband.3.4.0.dylib"
# copy the dlls to the build bin directory
test ! "$(SHREXT)" = ".dll" || (cp -pf 3rdParty/sundials-5.4.0/build/lib/*$(SHREXT) $(builddir_bin))
@touch "$@"
clean-sundials:
rm -rf 3rdParty/sundials-5.4.0/build "$(OMBUILDDIR)/include/omc/cpp/sundials" "$(builddir_lib_omc)/libsundials"* "$(builddir_inc)/sundials"
# Build libffi
LIBFFI=3rdParty/libffi
libffi: $(LIBFFI)
(cd "$(LIBFFI)" && (test -f Makefile || ./autogen.sh))
(cd "$(LIBFFI)" && (test -f Makefile || (./configure --prefix="`pwd`/install" "--host=$(host)" --enable-shared=no --disable-docs CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" && $(MAKE) clean)))
$(MAKE) -C "$(LIBFFI)"
$(MAKE) -C "$(LIBFFI)" install
libffi-clean:
if test -f $(LIBFFI)/Makefile; then $(MAKE) -C "$(LIBFFI)" clean; fi
sanity-check: omc
$(OMBUILDDIR)/bin/omc Examples/SanityCheck.mos
$(LIBMODELICAZLIB):
mkdir -p $(ZLIB_DIR)/build
cd $(ZLIB_DIR)/build && $(CMAKE) .. \
-G $(CMAKE_TARGET) \
-DCMAKE_VERBOSE_MAKEFILE:Bool=ON \
-DCMAKE_INSTALL_PREFIX:PATH="$(top_builddir)" \
-DCMAKE_INSTALL_LIBDIR="$(builddir_lib_omc)" \
-DCMAKE_INSTALL_INCLUDEDIR="$(builddir_inc)" \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
$(MAKE) -C $(ZLIB_DIR)/build/ install
zlib-clean:
if test -f $(ZLIB_DIR)/build/Makefile; then $(MAKE) -C $(ZLIB_DIR)/build/ clean; fi
rm -rf $(ZLIB_DIR)/build
MODELICAEXTERNALC_DIR=SimulationRuntime/ModelicaExternalC
ModelicaExternalC: interactive $(LIBMODELICAZLIB)
mkdir -p $(MODELICAEXTERNALC_DIR)/build
cd $(MODELICAEXTERNALC_DIR)/build && $(CMAKE) .. \
-G $(CMAKE_TARGET) \
-DCMAKE_VERBOSE_MAKEFILE:Bool=ON \
-DCMAKE_INSTALL_PREFIX:PATH="$(top_builddir)" \
-DCMAKE_INSTALL_LIBDIR="$(builddir_lib_omc)" \
-DCMAKE_INSTALL_BINDIR="$(builddir_bin)" \
-DCMAKE_INSTALL_INCLUDEDIR="$(builddir_inc)" \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DMODELICA_EXTERNAL_C_STANDALONE=ON
$(MAKE) -C $(MODELICAEXTERNALC_DIR)/build/ install
ModelicaExternalC-clean:
if test -f $(MODELICAEXTERNALC_DIR)/build/Makefile; then $(MAKE) -C $(MODELICAEXTERNALC_DIR)/build/ clean; fi
rm -rf $(MODELICAEXTERNALC_DIR)/build
$(LIBMODELICASTANDARDTABLES): $(LIBMODELICAEXTERNALC)
@test -f "$@"
$(LIBMODELICAIO): $(LIBMODELICAEXTERNALC)
@test -f "$@"
$(LIBMODELICAMATIO): $(LIBMODELICAEXTERNALC)
@test -f "$@"
git-clean:
test -e .git
git clean -fdx
git-sanity-check: git-clean
test "./Compiler/boot/bootstrap-sources.tar.xz" = "`find . -type f -size +684k | grep -v 3rdParty`"
for commit in `git rev-list origin/master..HEAD`; do \
(! git ls-tree --name-only -r $$commit | egrep "(.*[.](html|png|svg|o|so|la|stamp|a|dll|exe|cab|lnk|msi|log|class|jar|pyc|db|zip|DS_Store|pdf|tex|md5|dep)$$)|SimulationRuntime/cpp/Doc") || exit 1; \
(MASTER=`git ls-tree origin/master 3rdParty | grep -E -o "[0-9a-f]{40}"` && HASH=`git ls-tree $$commit 3rdParty | grep -E -o "[0-9a-f]{40}"` && cd 3rdParty && (test -z "`git rev-list $$HASH..$$MASTER`" || echo "ERROR: Commit is reverting 3rdParty to an older commit. This is probably not intended.")) \
done
! (git rev-list origin/master..HEAD | xargs git grep "Generated by Susan" -- Compiler/Template)