forked from eranif/codelite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·847 lines (740 loc) · 34.3 KB
/
configure
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
#!/bin/sh
################################################################################
## This file is part of CodeLite IDE and is released
## under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
################################################################################
createRevisionFile()
{
chmod +x ./le_makerevision.sh
./le_makerevision.sh
}
createVariables()
{
## set the compiler name
# Note the lack of -fPIC. Only use this for .so libs; strange and random bugs occur otherwise
compiler_name="g++ "
c_compiler_name="gcc "
exe_name="Runtime/codelite"
exe_name1="codelite"
is_so_lib=$1
additional_include_path=$2
if [ "$os_name" = "Darwin" ]; then
if [ "$is_64bit" = "yes" ]; then
compiler_name=${compiler_name}" -m64 "
c_compiler_name=${c_compiler_name}" -m64 "
else
compiler_name=${compiler_name}" -m32 "
c_compiler_name=${c_compiler_name}" -m32 "
fi
fi
if [ "$is_64bit" = "yes" ]; then
compiler_name=${compiler_name}" -DON_64_BIT "
c_compiler_name=${c_compiler_name}" -DON_64_BIT "
fi
## If the non-plugin .so libs aren't installed with the plugin ones, add their dir to the rpath
rpaths="-Wl,-rpath,$plugins_dir"
if [ "$non_plugins_dir" != "$plugins_dir" ]; then
rpaths="$rpaths -Wl,-rpath,$non_plugins_dir"
fi
## set the executable name
if [ "$enable_debug" = "yes" ]; then
objects_dir="Debug_gcc_unicode"
configuration="Debug_gcc_unicode"
debug_flag=" -g "
ext=ud
optimization=" -DREGEXP_UNICODE "
wxcfg="--unicode=yes --debug=yes"
else
objects_dir="Release_gcc_unicode"
configuration="Release_gcc_unicode"
ext=u
debug_flag=""
optimization=" -O3 -DREGEXP_UNICODE "
wxcfg="--unicode=yes --debug=no"
fi
echo "OPT=${optimization}" >> Makefile
echo "DEBUG=${debug_flag}" >> Makefile
echo "CMP=${compiler_name} \$(DEBUG) \$(OPT) " >> Makefile
echo "GCC=${c_compiler_name}" >> Makefile
echo "EXE_NAME=${exe_name}" >> Makefile
echo "EXE_NAME_NO_PATH=${exe_name1}" >> Makefile
echo "OBJ_DIR=${objects_dir}" >> Makefile
echo "EXT=${ext}" >> Makefile
echo "OUTPUT_DIR=lib" >> Makefile
echo "WXCFG=${wxcfg}" >> Makefile
echo "DESTDIR=" >> Makefile
echo "" >> Makefile
echo "CCFLAGS= -Wall \$(shell wx-config --cxxflags \$(WXCFG)) -fno-strict-aliasing -DASTYLE_LIB -DYY_NEVER_INTERACTIVE=1 -DGTK -DSCI_LEXER -DLINK_LEXERS -D__WX__ -DINSTALL_DIR=\\\"${prefix}/share/codelite\\\" -DPLUGINS_DIR=\\\"${plugins_dir}\\\"" >> Makefile
echo "LINK_FLAGS = -L${base_dir}/\$(OUTPUT_DIR) ${rpaths} -lplugin\$(EXT) -lcodelite\$(EXT) -lwxsqlite3\$(EXT) \\" >> Makefile
#echo " -lwxscintilla\$(EXT) -lwxpropgrid\$(EXT) -L${base_dir}/sdk/sqlite3/lib \$(shell wx-config --libs \$(WXCFG))" >> Makefile
echo " -lwxscintilla\$(EXT) -L${base_dir}/sdk/sqlite3/lib \$(shell wx-config --libs \$(WXCFG))" >> Makefile
echo "PLUGIN_LINK_FLAGS = -L${base_dir}/\$(OUTPUT_DIR) \$(shell wx-config --libs \$(WXCFG))" >> Makefile
echo "INCLUDES := \$(INCLUDES) ${additional_include_path} " >> Makefile
echo "" >> Makefile
if [ "$os_name" != "Darwin" ] ; then
echo "INCLUDES := \$(INCLUDES) \$(shell pkg-config --cflags gtk+-2.0)" >> Makefile
echo "LINK_FLAGS := \$(LINK_FLAGS) \$(shell pkg-config --libs gtk+-2.0)" >> Makefile
echo "PLUGIN_LINK_FLAGS := \$(PLUGIN_LINK_FLAGS) \$(shell pkg-config --libs gtk+-2.0)" >> Makefile
else
echo "CCFLAGS := \$(CCFLAGS) -D__APPLE__ -DMACOSX" >> Makefile
fi
if [ "$os_name" = "FreeBSD" ]; then
echo "LINK_FLAGS += -lkvm" >> Makefile
fi
echo "INCLUDES := \$(INCLUDES) -I. -I${base_dir}/sdk/codelite_indexer/network -I${base_dir}/sdk/wxsqlite3/include -I${base_dir}/sdk/wxsqlite3/sqlite3/include -I${base_dir}/sdk/wxscintilla/include -I${base_dir}/sdk/wxscintilla/src/scintilla/include -I${base_dir}/sdk/wxpropgrid/include -I${base_dir}/sdk/wxscintilla/src/scintilla/src -I${base_dir}/Interfaces -I${base_dir}/Debugger -I${base_dir}/Plugin -I${base_dir}/CodeLite " >> Makefile
echo "" >> Makefile
echo "" >> Makefile
}
createMainTargets()
{
echo "## build targets" >> Makefile
## default
target_all="all : pre_build SQLite Scintilla PropGrid CodeLite SDK LiteEditor codelite_indexer codelite_cppcheck Plugins "
## if we are on Linux, print the post message
if [ "$os_name" = "Linux" ]; then
target_all="$target_all post_build_msg"
fi
if [ "$os_name" = "Darwin" ]; then
target_all="$target_all Plugins mac_bundle"
fi
## add the "all" target to the makefile
echo "${target_all}" >> Makefile
echo "" >> Makefile
echo "codelite_indexer:" >> Makefile
echo " @cd sdk/codelite_indexer/ && \$(MAKE)" >> Makefile
echo " cp -fr sdk/codelite_indexer/codelite_indexer Runtime/." >> Makefile
echo "" >> Makefile
echo "codelite_cppcheck:" >> Makefile
echo " @cd sdk/codelite_cppcheck/ && \$(MAKE)" >> Makefile
echo " cp -fr sdk/codelite_cppcheck/codelite_cppcheck Runtime/." >> Makefile
echo "" >> Makefile
echo "pre_build:" >> Makefile
echo " ./le_makerevision.sh" >> Makefile
echo " @test -d \$(OBJ_DIR) || mkdir \$(OBJ_DIR)" >> Makefile
echo " @test -d \$(OUTPUT_DIR) || mkdir \$(OUTPUT_DIR)" >> Makefile
echo "" >> Makefile
echo "clean: clean_plugins" >> Makefile
echo " @cd sdk/codelite_indexer && make clean" >> Makefile
echo " @cd sdk/codelite_cppcheck && make clean" >> Makefile
echo " \$(RM) \$(OUTPUT_DIR)/*.a \$(OUTPUT_DIR)/*.so" >> Makefile
echo " \$(RM) -fr \$(OBJ_DIR)" >> Makefile
echo "" >> Makefile
if [ "$os_name" = "Darwin" ]; then
echo "mac_bundle: " >> Makefile
echo " @echo Creating Mac bundle..." >> Makefile
echo " @cd Runtime && ./make_mac_bundle.sh" >> Makefile
echo " @echo done" >> Makefile
echo "" >> Makefile
fi
}
createObjectList ()
{
files_list=$1
object_list_name=$2
echo "${object_list_name} = \\" >> Makefile
for a_file in $files_list
do
a_file_no_ext=`basename $a_file .cxx`
a_file_no_ext=`basename $a_file_no_ext .cpp`
a_file_no_ext=`basename $a_file_no_ext .c`
echo " ${configuration}/${a_file_no_ext}.o\\" >> Makefile
done
echo >> Makefile
}
createCodeLiteCppcheckMakefile ()
{
files_list=$1
echo "Generating sdk/codelite_cppcheck/Makefile..."
current_wd=`pwd`
cd sdk/codelite_cppcheck/
## remove old Makefile
rm -fr Makefile
compiler_name="g++ "
c_compiler_name="gcc "
if [ "$is_64bit" = "yes" ]; then
compiler_name=${compiler_name}" -DON_64_BIT "
c_compiler_name=${c_compiler_name}" -DON_64_BIT "
fi
## set the executable name
if [ "$enable_debug" = "yes" ]; then
debug_flag=" -g "
configuration="Debug"
optimization=" -O0 "
else
configuration="Release"
debug_flag=""
optimization=" -O2 "
fi
echo "OPT=${optimization}" >> Makefile
echo "DEBUG=${debug_flag}" >> Makefile
echo "CMP=${compiler_name} \$(DEBUG) \$(OPT) " >> Makefile
echo "GCC=${c_compiler_name} \$(DEBUG) \$(OPT) " >> Makefile
echo "" >> Makefile
echo "all: codelite_cppcheck" >> Makefile
createObjectList "network/*.cpp src/*.cpp utils/*.cpp" "codelite_cppcheck_objects"
for a_file in $files_list
do
a_file_with_ext=`basename $a_file`
a_file_no_ext=`basename $a_file .cxx`
a_file_no_ext=`basename $a_file_no_ext .cpp`
a_file_no_ext=`basename $a_file_no_ext .c`
file_extension=`basename $a_file | cut -d. -f2`
if [ "$file_extension" = "c" ]; then
echo ${configuration}/${a_file_no_ext}.o: ${a_file} ${configuration}/${a_file_no_ext}.o.d >> Makefile
echo " \$(GCC) -c ${a_file} -I. -o ${configuration}/${a_file_no_ext}.o" >> Makefile
echo ${configuration}/${a_file_no_ext}.o.d: >> Makefile
echo " \$(GCC) -I. -MT${configuration}/${a_file_no_ext}.o -MF${configuration}/${a_file_no_ext}.o.d -MM ${a_file}" >> Makefile
else
echo ${configuration}/${a_file_no_ext}.o: ${a_file} ${configuration}/${a_file_no_ext}.o.d >> Makefile
echo " \$(CMP) -c ${a_file} -I. -o ${configuration}/${a_file_no_ext}.o" >> Makefile
echo ${configuration}/${a_file_no_ext}.o.d: >> Makefile
echo " \$(CMP) -I. -MT${configuration}/${a_file_no_ext}.o -MF${configuration}/${a_file_no_ext}.o.d -MM ${a_file}" >> Makefile
fi
done
echo "-include ${configuration}/*.d" >> Makefile
echo >> Makefile
echo "codelite_cppcheck: make_dirs \$(codelite_cppcheck_objects)" >> Makefile
## On FreeBSD, -ldl is part og libc
if [ "$os_name" = "FreeBSD" ]; then
echo " \$(CMP) -o codelite_cppcheck \$(codelite_cppcheck_objects) -lpthread " >> Makefile
else
echo " \$(CMP) -o codelite_cppcheck \$(codelite_cppcheck_objects) -lpthread -ldl " >> Makefile
fi
echo >> Makefile
echo "make_dirs:" >> Makefile
echo " @echo" >> Makefile
echo " @echo \"----------Building project:[ codelite_cppcheck - ${configuration} ]----------\"" >> Makefile
echo " @echo" >> Makefile
echo " test -d ${configuration} || mkdir ${configuration}" >> Makefile
echo >> Makefile
echo "clean: " >> Makefile
echo " \$(RM) -fr ${configuration}/*.o" >> Makefile
echo " \$(RM) -fr ${configuration}/*.o.d" >> Makefile
echo " \$(RM) -fr codelite_cppcheck" >> Makefile
## restore the path
cd ${current_wd}
}
createCodeLiteIndexerMakefile ()
{
files_list=$1
echo "Generating sdk/codelite_indexer/Makefile..."
current_wd=`pwd`
cd sdk/codelite_indexer/
## remove old Makefile
rm -fr Makefile
compiler_name="g++ "
c_compiler_name="gcc "
if [ "$is_64bit" = "yes" ]; then
compiler_name=${compiler_name}" -DON_64_BIT "
c_compiler_name=${c_compiler_name}" -DON_64_BIT "
fi
## set the executable name
if [ "$enable_debug" = "yes" ]; then
debug_flag=" -g "
configuration="Debug"
optimization=" -O0 "
else
configuration="Release"
debug_flag=""
optimization=" -O2 "
fi
echo "OPT=${optimization}" >> Makefile
echo "DEBUG=${debug_flag}" >> Makefile
echo "CMP=${compiler_name} \$(DEBUG) \$(OPT) " >> Makefile
echo "GCC=${c_compiler_name} \$(DEBUG) \$(OPT) " >> Makefile
echo "" >> Makefile
echo "all: codelite_indexer" >> Makefile
createObjectList "network/*.cpp libctags/*.c *.cpp" "codelite_indexer_objects"
for a_file in $files_list
do
a_file_with_ext=`basename $a_file`
a_file_no_ext=`basename $a_file .cxx`
a_file_no_ext=`basename $a_file_no_ext .cpp`
a_file_no_ext=`basename $a_file_no_ext .c`
file_extension=`basename $a_file | cut -d. -f2`
if [ "$file_extension" = "c" ]; then
echo ${configuration}/${a_file_no_ext}.o: ${a_file} ${configuration}/${a_file_no_ext}.o.d >> Makefile
echo " \$(GCC) -c ${a_file} -DHAVE_CONFIG_H -I. -Ilibctags -o ${configuration}/${a_file_no_ext}.o" >> Makefile
echo ${configuration}/${a_file_no_ext}.o.d: >> Makefile
echo " \$(GCC) -DHAVE_CONFIG_H -I. -Ilibctags -MT${configuration}/${a_file_no_ext}.o -MF${configuration}/${a_file_no_ext}.o.d -MM ${a_file}" >> Makefile
else
echo ${configuration}/${a_file_no_ext}.o: ${a_file} ${configuration}/${a_file_no_ext}.o.d >> Makefile
echo " \$(CMP) -c ${a_file} -DHAVE_CONFIG_H -I. -Ilibctags -o ${configuration}/${a_file_no_ext}.o" >> Makefile
echo ${configuration}/${a_file_no_ext}.o.d: >> Makefile
echo " \$(CMP) -DHAVE_CONFIG_H -I. -Ilibctags -MT${configuration}/${a_file_no_ext}.o -MF${configuration}/${a_file_no_ext}.o.d -MM ${a_file}" >> Makefile
fi
done
echo "-include ${configuration}/*.d" >> Makefile
echo >> Makefile
echo "codelite_indexer: make_dirs \$(codelite_indexer_objects)" >> Makefile
## On FreeBSD, -ldl is part og libc
if [ "$os_name" = "FreeBSD" ]; then
echo " \$(CMP) -o codelite_indexer \$(codelite_indexer_objects) -lpthread " >> Makefile
else
echo " \$(CMP) -o codelite_indexer \$(codelite_indexer_objects) -lpthread -ldl " >> Makefile
fi
echo >> Makefile
echo "make_dirs:" >> Makefile
echo " @echo" >> Makefile
echo " @echo \"----------Building project:[ codelite_indexer - ${configuration} ]----------\"" >> Makefile
echo " @echo" >> Makefile
echo " test -d ${configuration} || mkdir ${configuration}" >> Makefile
echo >> Makefile
echo "clean: " >> Makefile
echo " \$(RM) -fr ${configuration}/*.o" >> Makefile
echo " \$(RM) -fr ${configuration}/*.o.d" >> Makefile
echo " \$(RM) -fr codelite_indexer" >> Makefile
## restore the path
cd ${current_wd}
}
## The rules created here all contain -fPIC. Any other shared-lib-creating functions *must* do this too
createRules_sharedObject ()
{
files_list=$1
object_list_name=$2
rule_name=$3
libname=$4
# createRules_sharedObject() creates both plugin and non-plugin libs
# For plugins, we want a cp -f line at the end to copy them to Runtime/plugins.
# For non-plugins we don't: they're installed direct from ./lib
dont_copy=$5
# Only use any additional link options on the Mac:
# they're not needed for Linux, and (on Linux at least) they break -j2
additional_link_libs=""
if [ "$os_name" = "Darwin" ];then
additional_link_libs=$6
fi
for a_file in $files_list
do
a_file_with_ext=`basename $a_file`
a_file_no_ext=`basename $a_file .cxx`
a_file_no_ext=`basename $a_file_no_ext .cpp`
a_file_no_ext=`basename $a_file_no_ext .c`
file_extension=`basename $a_file | cut -d. -f2`
if [ "$file_extension" = "c" ]; then
echo ${configuration}/${a_file_no_ext}.o: ${a_file} ${configuration}/${a_file_no_ext}.o.d >> Makefile
echo " \$(GCC) -c ${a_file} -fPIC \$(CCFLAGS) \$(INCLUDES) -o ${configuration}/${a_file_no_ext}.o" >> Makefile
echo ${configuration}/${a_file_no_ext}.o.d: >> Makefile
echo " \$(GCC) -fPIC \$(CCFLAGS) \$(INCLUDES) -MT${configuration}/${a_file_no_ext}.o -MF${configuration}/${a_file_no_ext}.o.d -MM ${a_file}" >> Makefile
echo ${configuration}/${a_file_no_ext}.o.i: >> Makefile
echo " \$(GCC) -fPIC \$(CCFLAGS) \$(INCLUDES) -E -o ${configuration}/${a_file_no_ext}.o.i ${a_file}" >> Makefile
else
echo ${configuration}/${a_file_no_ext}.o: ${a_file} ${configuration}/${a_file_no_ext}.o.d >> Makefile
echo " \$(CMP) -c ${a_file} -fPIC \$(CCFLAGS) \$(INCLUDES) -o ${configuration}/${a_file_no_ext}.o" >> Makefile
echo ${configuration}/${a_file_no_ext}.o.d: >> Makefile
echo " \$(CMP) -fPIC \$(CCFLAGS) \$(INCLUDES) -MT${configuration}/${a_file_no_ext}.o -MF${configuration}/${a_file_no_ext}.o.d -MM ${a_file}" >> Makefile
echo ${configuration}/${a_file_no_ext}.o.i: >> Makefile
echo " \$(CMP) -fPIC \$(CCFLAGS) \$(INCLUDES) -E -o ${configuration}/${a_file_no_ext}.o.i ${a_file}" >> Makefile
fi
done
echo >> Makefile
shared_obj_switch=" -shared "
if [ "$os_name" = "Darwin" ]; then
shared_obj_switch=" -dynamiclib "
fi
echo "${rule_name}: \$(${object_list_name})" >> Makefile
echo " \$(CMP) -fPIC ${shared_obj_switch} -o ${base_dir}/\$(OUTPUT_DIR)/${libname}.so \$(${object_list_name}) \$(PLUGIN_LINK_FLAGS) ${additional_link_libs}" >> Makefile
if [ $dont_copy != "dont_copy" ]; then
echo " cp -f ${base_dir}/\$(OUTPUT_DIR)/${libname}.so ${runtime_path}/." >> Makefile
fi
echo >> Makefile
echo "-include ${configuration}/*.o.d" >> Makefile
echo >> Makefile
}
createRules_exe ()
{
files_list=$1
object_list_name=$2
rule_name=$3
exename=$4
for a_file in $files_list
do
a_file_with_ext=`basename $a_file`
a_file_no_ext=`basename $a_file .cxx`
a_file_no_ext=`basename $a_file_no_ext .cpp`
a_file_no_ext=`basename $a_file_no_ext .c`
file_extension=`basename $a_file | cut -d. -f2`
if [ "$file_extension" = "c" ]; then
echo ${configuration}/${a_file_no_ext}.o: ${a_file} ${configuration}/${a_file_no_ext}.o.d >> Makefile
echo " \$(GCC) -c ${a_file} \$(CCFLAGS) \$(INCLUDES) -o ${configuration}/${a_file_no_ext}.o" >> Makefile
echo ${configuration}/${a_file_no_ext}.o.d: >> Makefile
echo " \$(GCC) \$(CCFLAGS) \$(INCLUDES) -MT${configuration}/${a_file_no_ext}.o -MF${configuration}/${a_file_no_ext}.o.d -MM ${a_file}" >> Makefile
echo ${configuration}/${a_file_no_ext}.o.i: >> Makefile
echo " \$(GCC) \$(CCFLAGS) \$(INCLUDES) -E -o ${configuration}/${a_file_no_ext}.o.i ${a_file}" >> Makefile
else
echo ${configuration}/${a_file_no_ext}.o: ${a_file} ${configuration}/${a_file_no_ext}.o.d >> Makefile
echo " \$(CMP) -c ${a_file} \$(CCFLAGS) \$(INCLUDES) -o ${configuration}/${a_file_no_ext}.o" >> Makefile
echo ${configuration}/${a_file_no_ext}.o.d: >> Makefile
echo " \$(CMP) \$(CCFLAGS) \$(INCLUDES) -MT${configuration}/${a_file_no_ext}.o -MF${configuration}/${a_file_no_ext}.o.d -MM ${a_file}" >> Makefile
echo ${configuration}/${a_file_no_ext}.o.i: >> Makefile
echo " \$(CMP) \$(CCFLAGS) \$(INCLUDES) -E -o ${configuration}/${a_file_no_ext}.o.i ${a_file}" >> Makefile
fi
done
echo >> Makefile
echo "${rule_name}: \$(${object_list_name})" >> Makefile
# Hack to make -j2 work. Without it, one job tries to make the CodeLite exe before the other has finished creating libpluginu.so
echo " @sleep 1" >> Makefile
echo " \$(CMP) -o ${exename} \$(${object_list_name}) \$(LINK_FLAGS)" >> Makefile
echo >> Makefile
}
createPluginMakefile()
{
plugin_path=$1
plugin_name=$2
install_path=$3
post_install_path=$4
echo "Generating ${plugin_path}/Makefile..."
current_wd=`pwd`
cd ${plugin_path}
## remove old Makefile
rm -fr Makefile
## set the plugin path relative to the main path
base_dir=".."
if [ "$plugin_name" = "CppCheck" ] ; then
createVariables "yes" "-I../sdk/codelite_cppcheck/"
else
createVariables "yes"
fi
## Hack to include the md5c.c file in the makefile for the qmake plugin
if [ "$plugin_name" = "QmakePlugin" ] ; then
createObjectList "*.cpp md5c.c" "${plugin_name}Objects"
elif [ "$plugin_name" = "CppCheck" ] ; then
createObjectList "*.cpp ../sdk/codelite_cppcheck/network/*.cpp" "${plugin_name}Objects"
else
createObjectList "*.cpp" "${plugin_name}Objects"
fi
createPluginTargets "${plugin_name}" "${post_install_path}"
if [ "$plugin_name" = "QmakePlugin" ] ; then
#createRules_sharedObject "*.cpp md5c.c" "${plugin_name}Objects" "${plugin_name}" "${plugin_name}" "copy" "-L../lib -lplugin\$(EXT) -lcodelite\$(EXT) -lwxscintilla\$(EXT) -lwxsqlite3\$(EXT) -lwxpropgrid\$(EXT)"
createRules_sharedObject "*.cpp md5c.c" "${plugin_name}Objects" "${plugin_name}" "${plugin_name}" "copy" "-L../lib -lplugin\$(EXT) -lcodelite\$(EXT) -lwxscintilla\$(EXT) -lwxsqlite3\$(EXT)"
elif [ "$plugin_name" = "CppCheck" ] ; then
#createRules_sharedObject "*.cpp ../sdk/codelite_cppcheck/network/*.cpp" "${plugin_name}Objects" "${plugin_name}" "${plugin_name}" "copy" "-L../lib -lplugin\$(EXT) -lcodelite\$(EXT) -lwxscintilla\$(EXT) -lwxsqlite3\$(EXT) -lwxpropgrid\$(EXT)"
createRules_sharedObject "*.cpp ../sdk/codelite_cppcheck/network/*.cpp" "${plugin_name}Objects" "${plugin_name}" "${plugin_name}" "copy" "-L../lib -lplugin\$(EXT) -lcodelite\$(EXT) -lwxscintilla\$(EXT) -lwxsqlite3\$(EXT)"
else
#createRules_sharedObject "*.cpp" "${plugin_name}Objects" "${plugin_name}" "${plugin_name}" "copy" "-L../lib -lplugin\$(EXT) -lcodelite\$(EXT) -lwxscintilla\$(EXT) -l wxsqlite3\$(EXT) -lwxpropgrid\$(EXT)"
createRules_sharedObject "*.cpp" "${plugin_name}Objects" "${plugin_name}" "${plugin_name}" "copy" "-L../lib -lplugin\$(EXT) -lcodelite\$(EXT) -lwxscintilla\$(EXT) -l wxsqlite3\$(EXT)"
fi
## restore the path
cd ${current_wd}
echo ".PHONY: ${plugin_name} ${plugin_name}_clean ${plugin_name}_install" >> Makefile
echo "${plugin_name}:" >> Makefile
echo " @\$(MAKE) -C ${plugin_path} -f Makefile" >> Makefile
echo "" >> Makefile
echo "${plugin_name}_clean:" >> Makefile
echo " @\$(MAKE) -C ${plugin_path} -f Makefile clean" >> Makefile
echo "" >> Makefile
echo "${plugin_name}_install:" >> Makefile
echo " cp \$(OUTPUT_DIR)/${plugin_name}.so ${install_path}" >> Makefile
echo "" >> Makefile
}
createPluginTargets()
{
plugin_name=$1
runtime_path=$2
echo "## build tagrets" >> Makefile
echo "all : pre_build ${plugin_name} post_build" >> Makefile
echo "" >> Makefile
echo "pre_build:" >> Makefile
echo " @echo" >> Makefile
echo " @echo \"----------Building project:[ ${plugin_name} - ${configuration} ]----------\"" >> Makefile
echo " @echo" >> Makefile
echo " @test -d \$(OBJ_DIR) || mkdir \$(OBJ_DIR)" >> Makefile
echo " @test -d ${base_dir}/\$(OUTPUT_DIR) || mkdir ${base_dir}/\$(OUTPUT_DIR)" >> Makefile
echo "" >> Makefile
echo "clean:" >> Makefile
echo " \$(RM) ${base_dir}/\$(OUTPUT_DIR)/${plugin_name}.so" >> Makefile
echo " \$(RM) -fr \$(OBJ_DIR)" >> Makefile
echo " \$(RM) -fr ${runtime_path}/${plugin_name}.so" >> Makefile
echo "" >> Makefile
echo "post_build:" >> Makefile
# Don't copy to ${runtime_path} here, do it in the target; otherwise it breaks 'make -j2'
echo "" >> Makefile
}
createInstallTarget()
{
echo "install: core_install plugins_install" >> Makefile
echo "" >> Makefile
echo "core_install:" >> Makefile
echo " @echo installing CodeLite" >> Makefile
echo " @\$(RM) -fr \$(DESTDIR)$prefix/bin/CodeLite" >> Makefile
echo " @\$(RM) -fr \$(DESTDIR)$prefix/share/codelite" >> Makefile
echo " @mkdir -p \$(DESTDIR)$prefix/bin" >> Makefile
echo " @cp \$(EXE_NAME) \$(DESTDIR)$prefix/bin/" >> Makefile
if [ "$make_symlink" = "yes" ] ; then
echo " @ln -s \$(EXE_NAME_NO_PATH) \$(DESTDIR)$prefix/bin/CodeLite" >> Makefile
echo " @chmod +x \$(DESTDIR)$prefix/bin/CodeLite" >> Makefile
fi
echo " @cp Runtime/codelite_fix_files \$(DESTDIR)$prefix/bin/" >> Makefile
echo " @cp Runtime/codelite_exec \$(DESTDIR)$prefix/bin/" >> Makefile
echo " @cp Runtime/codelite_kill_children \$(DESTDIR)$prefix/bin/" >> Makefile
echo " @chmod +x \$(DESTDIR)$prefix/bin/codelite_fix_files" >> Makefile
echo " @chmod +x \$(DESTDIR)$prefix/bin/codelite_exec" >> Makefile
echo " @chmod +x \$(DESTDIR)$prefix/bin/codelite_kill_children" >> Makefile
echo " @cp sdk/codelite_indexer/codelite_indexer \$(DESTDIR)$prefix/bin/" >> Makefile
echo " @cp sdk/codelite_cppcheck/codelite_cppcheck \$(DESTDIR)$prefix/bin/" >> Makefile
echo " @mkdir -p \$(DESTDIR)$prefix/share/applications" >> Makefile
echo " @mkdir -p \$(DESTDIR)$prefix/share/codelite" >> Makefile
echo " @mkdir -p \$(DESTDIR)$prefix/share/codelite/config" >> Makefile
echo " @mkdir -p \$(DESTDIR)$prefix/share/codelite/templates" >> Makefile
echo " @mkdir -p \$(DESTDIR)$plugins_dir/" >> Makefile
# In case the non-plugin.so libs aren't to go into the same dir as plugins...
echo " @mkdir -p \$(DESTDIR)$non_plugins_dir/" >> Makefile
echo " @mkdir -p \$(DESTDIR)$plugins_dir/debuggers" >> Makefile
echo " @mkdir -p \$(DESTDIR)$plugins_dir/resources" >> Makefile
echo " @mkdir -p \$(DESTDIR)$prefix/share/codelite/images" >> Makefile
echo " @mkdir -p \$(DESTDIR)$prefix/share/codelite/rc" >> Makefile
echo " @mkdir -p \$(DESTDIR)$prefix/share/codelite/lexers" >> Makefile
echo " @mkdir -p \$(DESTDIR)$prefix/share/codelite/lexers/Default" >> Makefile
echo " @mkdir -p \$(DESTDIR)$prefix/share/codelite/lexers/BlackTheme" >> Makefile
echo " @mkdir -p \$(DESTDIR)$prefix/share/codelite/src/" >> Makefile
echo " @cp -fr Runtime/plugins/resources/*.* \$(DESTDIR)$plugins_dir/resources/" >> Makefile
echo " @cp -fr Runtime/config/build_settings.xml.default \$(DESTDIR)$prefix/share/codelite/config/" >> Makefile
echo " @cp -fr Runtime/config/plugins.xml.default \$(DESTDIR)$prefix/share/codelite/config/" >> Makefile
echo " @cp -fr Runtime/config/debuggers.xml.gtk \$(DESTDIR)$prefix/share/codelite/config/debuggers.xml.default" >> Makefile
echo " @cp -fr Runtime/config/codelite.xml.default.gtk \$(DESTDIR)$prefix/share/codelite/config/codelite.xml.default" >> Makefile
echo " @cp -fr Runtime/codelite.desktop \$(DESTDIR)$prefix/share/applications/codelite.desktop; " >> Makefile
echo " @cp -fpr Runtime/rc/*.xrc \$(DESTDIR)$prefix/share/codelite/rc/" >> Makefile
echo " @cp -fpr Runtime/templates/* \$(DESTDIR)$prefix/share/codelite/templates/" >> Makefile
echo " @chmod -R +w \$(DESTDIR)$prefix/share/codelite/templates/* " >> Makefile
echo " @cp -fpr Runtime/lexers/Default/*.xml \$(DESTDIR)$prefix/share/codelite/lexers/Default/" >> Makefile
echo " @cp -fpr Runtime/lexers/BlackTheme/*.xml \$(DESTDIR)$prefix/share/codelite/lexers/BlackTheme/" >> Makefile
echo " @cp -fpr lib/lib*${ext}.so \$(DESTDIR)$non_plugins_dir/" >> Makefile
echo " @chmod 0644 \$(DESTDIR)$non_plugins_dir/*.so" >> Makefile
echo " @cp -fpr lib/Debugger.so \$(DESTDIR)$plugins_dir/debuggers/" >> Makefile
echo " @chmod 0644 \$(DESTDIR)$plugins_dir/debuggers/*.so" >> Makefile
echo " @cp -fpr Runtime/index.html \$(DESTDIR)$prefix/share/codelite/" >> Makefile
echo " @cp -fpr Runtime/astyle.sample \$(DESTDIR)$prefix/share/codelite/" >> Makefile
echo " @cp -fpr Runtime/svnreport.html \$(DESTDIR)$prefix/share/codelite/" >> Makefile
echo " @cp -fpr Runtime/images/*.png \$(DESTDIR)$prefix/share/codelite/images/" >> Makefile
echo " @cp -fpr Runtime/config/accelerators.conf.default \$(DESTDIR)$prefix/share/codelite/config/" >> Makefile
echo " @cp -fpr Runtime/src/*.gz \$(DESTDIR)$prefix/share/codelite/src/" >> Makefile
if [ "$add_desktop_icon" = "yes" ] ; then
if test -d $HOME/Desktop/ ; then
echo " @cp -fpr Runtime/codelite.desktop $HOME/Desktop/" >> Makefile
echo " @chmod +x $HOME/Desktop/codelite.desktop" >> Makefile
fi
fi
echo "" >> Makefile
}
createUnInstallTarget()
{
echo "uninstall: " >> Makefile
echo " @echo Uninstalling CodeLite" >> Makefile
if [ "$make_symlink" = "yes" ] ; then
echo " @\$(RM) -fr \$(DESTDIR)$prefix/bin/CodeLite" >> Makefile
fi
# echo " @\$(RM) -fr /usr/lib/libsqlite3-cl.so" >> Makefile
echo " @\$(RM) -fr \$(DESTDIR)$prefix/bin/codelite_fix_files" >> Makefile
echo " @\$(RM) -fr \$(DESTDIR)$prefix/bin/codelite_exec" >> Makefile
echo " @\$(RM) -fr \$(DESTDIR)$prefix/bin/codelite_kill_children" >> Makefile
echo " @\$(RM) -fr \$(DESTDIR)$prefix/bin/codelite_indexer" >> Makefile
echo " @\$(RM) -fr \$(DESTDIR)$prefix/bin/codelite_cppcheck" >> Makefile
echo " @\$(RM) -fr \$(DESTDIR)$prefix/bin/CodeLiteUR" >> Makefile
echo " @\$(RM) -fr \$(DESTDIR)$prefix/bin/CodeLiteUD" >> Makefile
echo " @\$(RM) -fr \$(DESTDIR)$prefix/bin/codelite" >> Makefile
echo " @\$(RM) -fr \$(DESTDIR)$prefix/include/UnitTest++/" >> Makefile
echo " @\$(RM) -fr \$(DESTDIR)$prefix/lib/libUnitTest++.a" >> Makefile
echo " @\$(RM) -fr \$(DESTDIR)$prefix/share/codelite" >> Makefile
echo " @\$(RM) -fr \$(DESTDIR)$non_plugins_dir/" >> Makefile
echo " @\$(RM) -fr \$(DESTDIR)$plugins_dir/" >> Makefile
# Check write permission for /usr/share/applications, in case we're using a 'local' prefix and not doing sudo
echo " @if test -w \$(DESTDIR)$prefix/share/applications ; then \\" >> Makefile
if [ "$add_desktop_icon" = "yes" ] ; then
if test -d $HOME/Desktop/ ; then
echo " \$(RM) -fr \$(DESTDIR)$prefix/share/applications/codelite.desktop; \\" >> Makefile
fi
fi
echo " fi" >> Makefile
echo " @\$(RM) -fr ~/Desktop/codelite.desktop" >> Makefile
echo "" >> Makefile
}
createEndMessage()
{
if [ "$os_name" = "Linux" ]; then
echo "post_build_msg:" >> Makefile
echo " @echo ==========================================================" >> Makefile
echo " @echo Done, please run \"sudo make install\"." >> Makefile
echo " @echo ==========================================================" >> Makefile
fi
}
Show_Help_and_Exit()
{
echo "This is the CodeLite configure script"
echo "Usage: ./configure [OPTION]..."
echo "Available options:"
echo " --prefix=PREFIX install files into the filepath PREFIX (the default is /usr)"
echo " --plugins-dir=PREFIX install plugins into the filepath PREFIX (the default is /usr/lib/codelite)"
echo " --enable-debug create a debug build (the default is disable)"
echo " --help show this help"
exit
}
## main
# checkCURL
## Create variables needed by the makefile
enable_debug="no"
prefix="/usr"
plugins_dir="/usr/lib/codelite"
add_desktop_icon="yes"
make_symlink="no"
os_name=`uname -s`
arch=`uname -m`
## Replace place holders in the desktop file
rm -fr Runtime/codelite.desktop
sed s@%%PREFIX%%@$prefix@g Runtime/codelite.desktop.template >> Runtime/codelite.desktop
## Determine if we are on 64 bit machine
## AMD / Intel will produce x86_64
## while itanium produces ia64
is_64bit="no"
if [ "$arch" = "x86_64" ] || [ "$arch" = "ia64" ]; then
is_64bit="yes"
fi
## Process any arguments that were supplied
until [ -z "$1" ] # Until all parameters used up
do
if [ "$1" = "--enable-debug" ]; then
enable_debug="yes"
# The next 2 aren't in the Usage, but will prevent undesirable things from happening when e.g. making rpms
elif [ "$1" = "--disable-desktop_icon" ]; then
add_desktop_icon="no"
elif [ "$1" = "--disable-make_symlink" ]; then
make_symlink="no"
elif [ "$1" = "--help" ]; then
Show_Help_and_Exit
else
key=`echo $1 | cut -d= -f1`
value=`echo $1 | cut -d= -f2`
if [ "$key" = "--prefix" ]; then
prefix=$value
elif [ "$key" = "--plugins-dir" ]; then
plugins_dir=$value
fi
fi
shift
done
## To where shall we install the .so libs which used to be static e.g. libwxscintillau.so
# I'm using plugins_dir for simplicity, but creating its own name make this easy to change
non_plugins_dir=$plugins_dir
## remove old makefile
makefile_name="Makefile"
base_dir="."
rm -fr ./Makefile
## Create revision file
createRevisionFile
echo "Generating Makefile..."
createVariables "no"
## Create the various object lists
createObjectList "sdk/wxscintilla/src/scintilla/src/*.cxx sdk/wxscintilla/src/*.cpp" "ScintillaObjects"
createObjectList "sdk/codelite_indexer/network/*.cpp CodeLite/*.cpp" "CodeLiteObjects"
createObjectList "LiteEditor/*.cpp" "LiteEditorObjects"
createObjectList "sdk/wxsqlite3/src/*.cpp sqlite3/*.c" "wxSqlite3Objects"
createObjectList "sdk/wxpropgrid/src/*.cpp" "wxPropGridObjects"
createObjectList "Plugin/*.cpp" "SDKObjects"
createMainTargets
echo >> Makefile
## Create the rules
# First the non-plugin .so libs:
createRules_sharedObject "Plugin/*.cpp " "SDKObjects" "SDK" "libplugin\$(EXT)" "dont_copy" "-L./lib -lwxscintilla\$(EXT) -lcodelite\$(EXT)"
createRules_sharedObject "sdk/wxscintilla/src/scintilla/src/*.cxx sdk/wxscintilla/src/*.cpp" "ScintillaObjects" "Scintilla" "libwxscintilla\$(EXT)" "dont_copy"
createRules_sharedObject "sdk/codelite_indexer/network/*.cpp CodeLite/*.cpp" "CodeLiteObjects" "CodeLite" "libcodelite\$(EXT)" "dont_copy" "-L./lib -lwxsqlite3\$(EXT)"
createRules_sharedObject "sdk/wxsqlite3/src/*.cpp sqlite3/*.c" "wxSqlite3Objects" "SQLite" "libwxsqlite3\$(EXT)" "dont_copy" ""
createRules_sharedObject "sdk/wxpropgrid/src/*.cpp" "wxPropGridObjects" "PropGrid" "libwxpropgrid\$(EXT)" "dont_copy" ""
# Then the binary, and indexer
createRules_exe "LiteEditor/*.cpp" "LiteEditorObjects" "LiteEditor" ${exe_name}
createCodeLiteIndexerMakefile "sdk/codelite_indexer/*.cpp sdk/codelite_indexer/network/*.cpp sdk/codelite_indexer/libctags/*.c sdk/codelite_indexer/libctags/*.cpp"
createCodeLiteCppcheckMakefile "sdk/codelite_cppcheck/network/*.cpp sdk/codelite_cppcheck/src/*.cpp sdk/codelite_cppcheck/utils/*.cpp"
createInstallTarget
createUnInstallTarget
echo "-include \$(OBJ_DIR)/*.d" >> Makefile
echo "" >> Makefile
createEndMessage
echo "Plugins:\\" >> Makefile
########################################################
##
## Add any plugin targets you need here
## Append these as dependencie for the main project
##
########################################################
echo "Debugger\\" >> Makefile
echo "Gizmos\\" >> Makefile
echo "cscope\\" >> Makefile
echo "Subversion2\\" >> Makefile
echo "CodeFormatter\\" >> Makefile
echo "Copyright\\" >> Makefile
echo "UnitTestCPP\\" >> Makefile
echo "ExternalTools\\" >> Makefile
echo "SnipWiz\\" >> Makefile
echo "wxformbuilder\\" >> Makefile
echo "abbreviation\\" >> Makefile
#echo "SymbolView\\" >> Makefile
echo "ContinuousBuild\\" >> Makefile
echo "QmakePlugin\\" >> Makefile
echo "CppCheck" >> Makefile
echo "" >> Makefile
echo "plugins_install:\\" >> Makefile
########################################################
##
## For all plugins you add, you can add an entry here for
## the install target
########################################################
echo "Debugger_install\\" >> Makefile
echo "Gizmos_install\\" >> Makefile
echo "cscope_install\\" >> Makefile
echo "Subversion2_install\\" >> Makefile
echo "CodeFormatter_install\\" >> Makefile
echo "Copyright_install\\" >> Makefile
echo "UnitTestCPP_install\\" >> Makefile
echo "ExternalTools_install\\" >> Makefile
echo "SnipWiz_install\\" >> Makefile
echo "wxformbuilder_install\\" >> Makefile
echo "abbreviation_install\\" >> Makefile
#echo "SymbolView_install\\" >> Makefile
echo "ContinuousBuild_install\\" >> Makefile
echo "QmakePlugin_install\\" >> Makefile
echo "CppCheck_install" >> Makefile
echo " @chmod 0644 \$(DESTDIR)$plugins_dir/*.so" >> Makefile
echo "" >> Makefile
echo "clean_plugins:\\" >> Makefile
########################################################
##
## For all plugins you add, add an entry here for 'clean'
##
########################################################
echo "Debugger_clean\\" >> Makefile
echo "Gizmos_clean\\" >> Makefile
echo "cscope_clean\\" >> Makefile
echo "Subversion2_clean\\" >> Makefile
echo "CodeFormatter_clean\\" >> Makefile
echo "Copyright_clean\\" >> Makefile
echo "UnitTestCPP_clean\\" >> Makefile
echo "ExternalTools_clean\\" >> Makefile
echo "SnipWiz_clean\\" >> Makefile
echo "wxformbuilder_clean\\" >> Makefile
echo "abbreviation_clean\\" >> Makefile
#echo "SymbolView_clean\\" >> Makefile
echo "ContinuousBuild_clean\\" >> Makefile
echo "QmakePlugin_clean\\" >> Makefile
echo "CppCheck_clean" >> Makefile
echo "" >> Makefile
########################################################
##
## add plugins here
## createPluginMakefile <plugin path> <plugin name>
##
########################################################
createPluginMakefile "Debugger" "Debugger" "\$(DESTDIR)$plugins_dir/debuggers/" "../Runtime/debuggers"
createPluginMakefile "Gizmos" "Gizmos" "\$(DESTDIR)$plugins_dir/" "../Runtime/plugins"
createPluginMakefile "cscope" "cscope" "\$(DESTDIR)$plugins_dir/" "../Runtime/plugins"
createPluginMakefile "Subversion2" "Subversion2" "\$(DESTDIR)$plugins_dir/" "../Runtime/plugins"
createPluginMakefile "CodeFormatter" "CodeFormatter" "\$(DESTDIR)$plugins_dir/" "../Runtime/plugins"
createPluginMakefile "Copyright" "Copyright" "\$(DESTDIR)$plugins_dir/" "../Runtime/plugins"
createPluginMakefile "UnitTestCPP" "UnitTestCPP" "\$(DESTDIR)$plugins_dir/" "../Runtime/plugins"
createPluginMakefile "ExternalTools" "ExternalTools" "\$(DESTDIR)$plugins_dir/" "../Runtime/plugins"
createPluginMakefile "SnipWiz" "SnipWiz" "\$(DESTDIR)$plugins_dir/" "../Runtime/plugins"
createPluginMakefile "wxformbuilder" "wxformbuilder" "\$(DESTDIR)$plugins_dir/" "../Runtime/plugins"
createPluginMakefile "abbreviation" "abbreviation" "\$(DESTDIR)$plugins_dir/" "../Runtime/plugins"
#createPluginMakefile "SymbolView" "SymbolView" "\$(DESTDIR)$plugins_dir/" "../Runtime/plugins"
createPluginMakefile "ContinuousBuild" "ContinuousBuild" "\$(DESTDIR)$plugins_dir/" "../Runtime/plugins"
createPluginMakefile "QmakePlugin" "QmakePlugin" "\$(DESTDIR)$plugins_dir/" "../Runtime/plugins"
createPluginMakefile "cppchecker" "CppCheck" "\$(DESTDIR)$plugins_dir/" "../Runtime/plugins"