-
Notifications
You must be signed in to change notification settings - Fork 83
/
env.mk.in
715 lines (624 loc) · 19.8 KB
/
env.mk.in
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
# $Id: env.mk.in 68602 2015-01-23 00:13:11Z sbjang $
#
include $(ALTIDEV_HOME)/vars.mk
#----------------------------------------------------------------------------
# Include macros
#----------------------------------------------------------------------------
# 운영체제에 맞는 FLAG들을 지정함
#only for solaris CC 5.0 above..
ifeq "$(compat5)" "1"
compat4=0
else
compat4=1
endif
ifeq (,$(compat4))
compat4 = 0
endif
ifeq (,$(debug))
debug = 1
endif
ifeq (,$(distrib))
distrib = 0
endif
ifeq (,$(threads))
threads = 1
endif
ifeq (,$(compile64))
compile64 = 0
endif
exceptions=0
threads=1
rtti=0
shared_libs=1
static_libs=1
shared_libs_only=
static_libs_only=
ifeq "$(BUILD_MODE)" "debug"
srcdebug=1
bindebug=1
inline=0
fast=0
optimize=0
else
ifeq "$(BUILD_MODE)" "prerelease"
srcdebug=0
bindebug=1
debug=1
inline=1
fast=1
optimize=1
else
ifeq "$(BUILD_MODE)" "release"
srcdebug=0
bindebug=0
inline=1
fast=1
optimize=1
else
error:
@echo "ERROR!!!! UNKNOWN BUILD_MODE($(BUILD_MODE))";
@exit;
endif # release
endif # prerelease
endif # debug
#----------------------------------------------------------------------------
# wrapper_macros.GNU,v 4.90 1999/12/27 03:50:08 vishal Exp
#----------------------------------------------------------------------------
#
# PDL supports the following flags. They can be enabled either on
# the command line, e.g., "make purify=1", or added to your
# platform_macros.GNU. To disable the option, set the flag to null,
# e.g., "make debug=". Some flags support setting to 0 disable,
# e.g., "make debug=0". debug=1 is enabled in the platform files
# that are released with PDL.
#
# Please note that the effects of a flag may be platform specific.
# Also, combinations of certain flags may or may not be allowed on
# specific platforms, e.g., debug=1 opt=1 is supported by g++ but
# not all other C++ compilers.
#
# Flag Description
# ---- -----------
# debug Enable debugging; see DCFLAGS and DCCFLAGS.
# exceptions Enable exception handling (not supported by all platforms).
# minimum_corba Enable minimumCORBA support. (Documented here, but
# implemented in TAO/rules.TAO.GNU.)
# fast Enable -fast option, e.g., with Sun C++.
# inline Enable PDL inlining. Some platforms enable inlining by
# default, others do not.
# optimize Enable optimization; see OCFLAGS and OCCFLAGS.
# orbix Enable use of Orbix.
# probe Enable PDL_Timeprobes.
# profile Enable profiling; see PCFLAGS and PCCFLAGS.
# purify Purify all executables. purify must be in user's PATH!
# quantify Quantify all executables. quantify must be in user's PATH!
# repo Use GNU template repository (g++ with repo patches and
# egcs only).
# rtti Enable run-time type identification. On some platforms,
# it is enabled by default, so this is ignored.
# shared_libs Build shared libraries. Ignored if static_libs_only is set.
# static_libs Build static libraries. Ignored if shared_libs_only is set.
# shared_libs_only Only build shared libraries. Ignored if no SHLIBs are
# specified by the Makefile, as in performance-tests/Misc.
# static_libs_only Only build static libraries.
# threads Build with thread support.
#
# Usually, users do not need to be concerned with make targets.
# Just enter "make" on the command line to build. A few notable
# targets are listed below.
#
# Target Description
# ------ -----------
# show_statics Lists all static objects in object files built for
# current directory. Only supported for g++.
# show_uninit Lists all uninitialized in object files built for
# current directory. Only supported for g++.
#
# The following describes the PDL wrapper macros:
#
# Variable Description
# -------- -----------
# ARFLAGS Flags for the archive utility (ar)
# CC C compiler command
# CXX C++ compiler command
# COMPILE.c Flags for compiling with C
# COMPILE.cc Flags for compiling with C++
# CPPFLAGS C pre-processor flags
# CFLAGS C compilation flags
# CCFLAGS C++ compilation flags
# DCFLAGS C compilation flags for debugging
# DCCFLAGS C++ compilation flags for debugging
# DEFFLAGS C++ preprocessor flag for defining symbols
# DLD Name of dynamic linker
# LD Name of linker
# IDL Name of the CORBA IDL compiler
# LDFLAGS ld linker flags
# LINK.c Flags for linking with C
# LINK.cc Flags for linking with C++
# MAKEFLAGS Flags that are passed into the compilation from the commandline
# OCFLAGS Optimizing C compilation flags
# OCCFLAGS Optimizing C++ compilation flags
# ORBIX_ROOT Root of IONA's Orbix CORBA implementation
# PCFLAGS C compilation flags for profiling
# PCCFLAGS C++ compilation flags for profiling
# PRELINK Executable to precede linking, such as quantify
# PURELINK If set, contains purify executable as well as all options
# PURE_CACHE_BASE_DIR
# The base directory in which Pure products will produce
# instrumented libraries. If you don't want that to be below
# /tmp, set this variable in your environment or on the make
# command line.
# PURE_CACHE_DIR
# The full name of the directory in which Pure produces will
# produce instrumented libraries.
# PTDIRS Pathnames of directories containing template code
# RM Name of program to use to remove files
# SOFLAGS Flags used to build a shared library
# SOLINK.cc Link line necessary to build a share library
# VAR Variant identifier suffix
# VDIR Directory for object code
# VSHDIR Directory for shared object code
# PD_DIR Pathname for the root of the build tree
#
#----------------------------------------------------------------------------
# Platform-dependent macro definitions
# (link to the appropriate platform-specific config file).
#----------------------------------------------------------------------------
#### Default to building shared libraries only. Set it here to give the
#### platform a chance to override.
shared_libs = 1
static_libs = 1
#### Let platform just look at whether or not exceptions is defined.
#### With the following override, it doesn't have to check for 0.
ifeq ($(exceptions),0)
override exceptions =
endif # exceptions
ifeq ($(fast),0)
override fast =
endif # fast
ifeq ($(rtti),0)
override rtti =
endif # rtti
#### Defined versioned_so = 1 if your platform requires version number
#### be appended after so library.
versioned_so = 0
include $(PD_DIR)/makefiles/platform_macros.GNU
#----------------------------------------------------------------------------
# Platform-independent macro definitions
#----------------------------------------------------------------------------
CPPFLAGS += $(DEFFLAGS) $(INCLDIRS)
IDL = idl
IDLFLAGS = -A -B -s S.cpp -c C.cpp
# by jdlee
#ifeq (,$(findstring -I$(PD_DIR)/include,$(INCLDIRS)))
# INCLDIRS += -I$(PD_DIR)/include
#endif
ifeq (,$(findstring -L$(PD_DIR)/lib,$(LDFLAGS)))
LDFLAGS += -L$(PD_DIR)/lib -L./
endif
LEX = flex
ifndef COMSPEC
ifdef ComSpec
#### PDL+TAO use COMSPEC, but ComSpec is defined.
COMSPEC = $(ComSpec)
endif # ComSpec
endif # ! COMPSPEC
ifdef COMSPEC
#### Assume we're on a WIN32 host.
PDL_NUL = nul
else # ! WIN32
PDL_NUL = /dev/null
endif # ! WIN32
#### Redirect stderr to nul device, and mask exit status.
PDL_NUL_STDERR = 2>$(PDL_NUL) || true
PCFLAGS += #### set in platform_macros.GNU file, e.g., -p
PCCFLAGS += #### set in platform_macros.GNU file, e.g., -p
VAR =
VDIR = .obj/
ifndef VSHDIR
VSHDIR = .shobj/
endif # VSHDIR
ifndef VODBCDIR
VODBCDIR = .odbcobj/
endif # VODBCDIR
# NOTE: VLDLIBS is defined below, in case it is overridden for static-
# or shared-only builds.
YACC = yacc
# Define SOEXT trailing digits if platform needs it.
ifeq ($(versioned_so),1)
PDL_LDSO_Version_Number := $(shell echo .`perl -ne 'if (/PDL version/) \
{ s/[^0-9]+(\d+\.\d+)(\.\d+)?.+/\1/ ; print }' ${PD_DIR}/VERSION `)
else
PDL_LDSO_Version_Number =
endif
#----------------------------------------------------------------------------
# Platform-dependent macros that require platform_macros.GNU.
#----------------------------------------------------------------------------
ifndef OBJDIRS
OBJDIRS = .obj .shobj # .obj_debug .obj_profile .obj_optimize
endif # OBJDIRS
ifndef OBJEXT
OBJEXT=o
endif
ifndef SOEXT
SOEXT=so
endif
ifndef LIBEXT
LIBEXT=a
endif
nullstring :=
space := $(nullstring) # end of the line
ifndef CC_OUTPUT_FLAG
CC_OUTPUT_FLAG = -o$(space)
endif # CC_OUTPUT_FLAG
ifndef SO_OUTPUT_FLAG
SO_OUTPUT_FLAG = -o$(space)
endif # SO_OUTPUT_FLAG
ifndef LINK_OUTPUT_FLAG
LINK_OUTPUT_FLAG = -o$(space)
endif # LINK_OUTPUT_FLAG
#----------------------------------------------------------------------------
# make flags
#----------------------------------------------------------------------------
ifeq ($(optimize),0)
override optimize =
endif # optimize
ifneq ($(optimize),)
CFLAGS += $(OCFLAGS)
CCFLAGS += $(OCCFLAGS)
CPPFLAGS += -DCOMPILER_OPT_FLAGS='"$(OCCFLAGS)"'
else
CPPFLAGS += -DCOMPILER_OPT_FLAGS='""'
endif # optimize
ifneq ($(bindebug),0)
CFLAGS += $(BCFLAGS)
CCFLAGS += $(BCCFLAGS)
endif # debug
ifeq ($(srcdebug),0)
ifeq (,$(findstring $(CFLAGS),$(CCFLAGS)))
CCFLAGS += -DPDL_NDEBUG
else
CFLAGS += -DPDL_NDEBUG
endif
else
CFLAGS += $(DCFLAGS)
CCFLAGS += $(DCCFLAGS)
endif # debug
ifeq ($(threads),0)
override threads =
endif # threads
ifeq ($(CC),gcc) ## BUGBUG by jdlee
ifeq ($(exceptions),)
#### Disable the default exception handling of g++ >= 2.8.0.
CCFLAGS += -fno-exceptions -fcheck-new
else # exceptions
CPPFLAGS += -DPDL_HAS_EXCEPTIONS
#### Disable this warning on g++ >= 2.8.0 if exceptions are enabled,
#### it gets confused and reports too many bogus warnings.
CFLAGS += -Wno-uninitialized
endif # exceptions
endif # gcc
ifeq ($(profile),0)
override profile =
endif # profile
ifneq ($(profile),)
CFLAGS += $(PCFLAGS)
CCFLAGS += $(PCCFLAGS)
endif # profile
ifeq ($(inline),0)
CCFLAGS += -DPDL_NO_INLINE
else
ifeq ($(inline),1)
CCFLAGS += -D__PDL_INLINE__
endif # inline eq 1
endif # inline eq 0
ifeq ($(shared_libs),0)
override shared_libs =
endif # shared_libs
ifeq ($(static_libs),0)
override static_libs =
endif # static_libs
ifeq ($(shared_libs_only),0)
override shared_libs_only =
endif # shared_libs_only
ifeq ($(static_libs_only),0)
override static_libs_only =
endif # static_libs_only
ifdef shared_libs_only
override shared_libs = 1
override static_libs =
endif # shared_libs_only
ifdef static_libs_only
override shared_libs =
override static_libs = 1
endif # static_libs_only
#### We need to set VBIN here, because it's used in the BUILD
#### definitions below.
VBIN = $(BIN:%=%$(VAR))
ifdef shared_libs
ifdef static_libs
#### Build both shared and static libs.
BUILD = $(VSHLIB) $(SHLIBA) $(VLIB) $(VBIN)
else # ! static_libs
#### Build shared libs only.
#### Don't build static libs.
BUILD = $(VSHLIB) $(SHLIBA) $(VBIN)
LIB =
# OBJEXT = so
ifndef VXWORKS
VDIR = .shobj/
ifeq ($(BIN),)
#### No executables are being built, so don't create .obj/.
OBJDIRS = .shobj
endif # BIN
endif # ! VXWORKS
endif # ! static_libs
ifdef SHLIBA
LDLIBS := $(LDLIBS:-l%=-l%shr)
PDL_SHLIBS := $(PDL_SHLIBS:-l%=-l%shr)
endif # SHLIBA
else # ! shared_libs
ifdef static_libs
#### Don't build shared libs.
BUILD = $(VLIB) $(VBIN)
OBJDIRS = .obj
PIC =
SHLIB =
SOEXT = o
VSHDIR = .obj/
VLDLIBS = $(LDLIBS:%.so=%.o)
else # ! static_libs
#### Don't build any libs.
BUILD = $(VBIN)
endif # ! static_libs
endif # ! shared_libs
VLDLIBS := $(LDLIBS) $(LIBS)
ifeq ($(probe),0)
override probe =
endif # probe
ifeq ($(probe),1)
CCFLAGS += -DPDL_COMPILE_TIMEPROBES
endif # probe
ifeq ($(purify),0)
override purify =
endif # purify
PURE_CACHE_BASE_DIR = /tmp/purifycache
PURE_CACHE_DIR = $(PURE_CACHE_BASE_DIR)-$(LOGNAME)-$(notdir $(CXX) )
ifdef purify
#### Pick up Purify directory from the users PATH.
PDL_PURIFY_DIR := \
$(shell type purify | sed -e 's/.* is //' -e 's%/purify$$%%')
#### You might want to adjust the Purify options below.
#### -best-effort is undocumented but supported, and seems
#### to help avoid occasional link failure.
PURELINK += purify -best-effort -cache-dir=$(PURE_CACHE_DIR) \
-chain-length=20 -fds-inuse-at-exit=no \
-inuse-at-exit -max_threads=100
CCFLAGS += -DPDL_HAS_PURIFY
CPPFLAGS += -I$(PDL_PURIFY_DIR)
endif # purify
ifeq ($(quantify),0)
override quantify =
endif # quantify
ifdef quantify
#### Pick up Quantify directory from the users PATH.
PDL_QUANTIFY_DIR := \
$(shell type quantify | sed -e 's/.* is //' -e 's%/quantify$$%%')
#### You might want to adjust the Quantify options below.
#### -best-effort is undocumented but supported, and seems
#### to help avoid occasional link failure.
PRELINK += quantify -best-effort -cache-dir=$(PURE_CACHE_DIR) \
-max_threads=100
CCFLAGS += -DPDL_HAS_QUANTIFY
CPPFLAGS += -I$(PDL_QUANTIFY_DIR)
ifeq ($(shell uname -p),sparc)
PRELINK += -record-register-window-traps
endif # sparc
endif # quantify
ifeq ($(repo),0)
override repo =
endif # repo
ifdef repo
#### Remove -fno-implicit-templates from, and add -frepo to, CCFLAGS.
CCFLAGS := $(strip $(subst -fno-implicit-templates,,$(CCFLAGS)))
CCFLAGS += -frepo -DPDL_HAS_GNU_REPO
pdl_lib_prelink := 1
endif # repo
#----------------------------------------------------------------------------
# Conditional macro definitions
#----------------------------------------------------------------------------
CONFIGURE = ./configure -C --enable-product=@ALTIBASE_PRODUCT@
ASSEMBLE = $(AS) $(ASFLAGS)
COMPILE.c = $(CC) $(XCC) $(CFLAGS) $(CPPFLAGS) -c
COMPILE.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(PTDIRS) -c
COMPILE-NO_DASH_G.cc = `echo $(COMPILE.cc) | sed 's/-g //'`
# 960905 Marius Kjeldahl <[email protected]>
# Added the line below to be used for compiling executable shared objects
COMPILEESO.cc = $(CXX) $(CCFLAGS) $(CPPFLAGS) $(PTDIRS)
ifeq ($(LINK.c),override)
LINK.c = $(LINK.c.override)
else
LINK.c = $(PURELINK) $(PRELINK) $(LD) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) \
$(LDLIBS) $(LIBS)
endif # LINK.c.override
ifeq ($(LINK.cc),override)
LINK.cc = $(LINK.cc.override)
else
LINK.cc = $(PURELINK) $(PRELINK) $(LD) $(CCFLAGS) $(CPPFLAGS) $(PTDIRS)
endif # LINK.cc.override
SOLINK.c = $(PRELINK) $(CDLD) $(SOFLAGS)
SOLINK.cc = $(PRELINK) $(DLD) $(SOFLAGS)
GENERRMSG = $(ALTI_HOME)/bin/$(PRODUCT_PREFIX)genErrMsg$(BINEXT)
GENERRMSGMANUAL = $(ALTI_HOME)/bin/$(PRODUCT_PREFIX)genErrMsgManual$(BINEXT)
#----------------------------------------------------------------------------
# end of wrapper_macros.GNU,v 4.90 1999/12/27 03:50:08 vishal Exp
#----------------------------------------------------------------------------
CCFLAGS += -DPDL_LACKS_PDL_TOKEN
CCFLAGS += -DPDL_LACKS_PDL_OTHER
include $(PD_DIR)/makefiles2/platform.mk
ifeq ($(CROSS_COMPILE),)
INCLUDES = -I$(CORE_DIR)/include \
-I$(PD_DIR)/makeinclude \
-I$(PD_DIR)/include/ \
-I$(ID_DIR)/include/ \
-I/usr/local/include \
$(READLINE_INCLUDES)
else
INCLUDES = -I$(CORE_DIR)/include \
-I$(PD_DIR)/makeinclude \
-I$(PD_DIR)/include/ \
-I$(ID_DIR)/include/ \
$(READLINE_INCLUDES)
endif
include $(DEV_DIR)/alticore.mk
LIBDIRS = -L. -L$(ALTI_HOME)/lib -L$(PD_DIR)/lib
DEFOPT = -D
IDROPT = -I
LDROPT = -L
LIBOPT = -l
LIBAFT =
AROUT =
LDOUT = $(LINK_OUTPUT_FLAG)
SOOUT = $(SO_OUTPUT_FLAG)
CCOUT = $(CC_OUTPUT_FLAG)
OBJEXT = o
ifndef SOEXT
SOEXT = so
endif # SOEXT
BINEXT =
LIBEXT = a
LIBPRE = lib
COPY = cp
RM = rm -rf
VERBOSE_MODE=0
ifeq "$(VERBOSE_MODE)" "1"
quiet =
Q =
S =
else
quiet = quiet_
Q = @
S = -s
endif
# Task-1994 초고속 Coverage측정방법 고안
ifeq "$(COMPILER_NAME)" "GCC"
# GCC로 컴파일 할때만 gcov사용가능
ifeq "$(ALTIBASE_ENABLE_GCOV)" "yes"
CCFLAGS += -fprofile-arcs -ftest-coverage
LFLAGS += -fprofile-arcs -ftest-coverage
endif
endif
# TASK-6198 Samsung Smart SSD
ifeq "$(ALTIBASE_ENABLE_SMARTSSD)" "yes"
CCFLAGS += -I$(THIRDPARTY_DIR)/SmartSSD
LFLAGS += -lsdm -L$(THIRDPARTY_DIR)/SmartSSD
endif
########################
#### ENV_TEST for checkEnv at id/chk and cm/chk
########################
ifeq "$(OS_TARGET)" "POWERPC64_LINUX"
ENV_TEST = 0
endif
ifeq "$(OS_TARGET)" "POWERPC_LINUX"
ENV_TEST = 0
else
ifeq "$(OS_TARGET)" "ITRON"
ENV_TEST = 0
else
ifeq "$(OS_TARGET)" "ARM_LINUX"
ENV_TEST = 0
else
ifeq "$(OS_TARGET)" "ELDK_LINUX"
ENV_TEST = 0
else
ifeq "$(OS_TARGET)" "MIPS64_LINUX"
ENV_TEST = 0
else
ifneq ($(CROSS_COMPILE),)
ENV_TEST = 0
else
ENV_TEST = 1
endif
endif
endif
endif
endif
endif
########################
#### common rules
########################
quiet_cmd_ar_a_o = AR $@
cmd_ar_a_o = $(AR) $(ARFLAGS) $(AROUT)$@ $? > /dev/null
quiet_cmd_so_o = SO $@
cmd_so_o = $(SOLINK.cc) $(SOFLAGS) $(SOOUT)$@ $^ > /dev/null
define LIB_IT
$(Q) $(if $(quiet),echo ' $($(quiet)cmd_ar_a_o)')
$(Q) $(cmd_ar_a_o)
endef
define SHLIB_IT
$(Q) $(if $(quiet),echo ' $($(quiet)cmd_so_o)')
$(Q) $(cmd_so_o)
endef
quiet_cmd_cc_o_c = CC $@
cmd_cc_o_c = mkdir -p $(dir $@); $(COMPILE.cc) $(INCLUDES) $(CC_OUTPUT_FLAG)$@ $<
define COMPILE_IT
$(Q) $(if $(quiet),echo ' $($(quiet)cmd_cc_o_c)')
$(Q) $(cmd_cc_o_c)
endef
%.$(LIBEXT):
$(LIB_IT)
%.$(SOEXT):
$(SHLIB_IT)
$(TARGET_DIR)/%.o: $(DEV_DIR)/%.cpp
$(COMPILE_IT)
$(TARGET_DIR)/%.o: $(DEV_DIR)/%.c
mkdir -p $(dir $@)
$(COMPILE.c) $(INCLUDES) $(CC_OUTPUT_FLAG)$@ $<
$(TARGET_DIR)/%.o: $(DEV_DIR)/%.s
$(Q) echo " AS $@"
mkdir -p $(dir $@)
$(ASSEMBLE) $(CC_OUTPUT_FLAG)$@ $<
$(TARGET_DIR)/%_shobj.o: $(DEV_DIR)/%.s
$(Q) echo " AS $@"
mkdir -p $(dir $@)
$(ASSEMBLE) $(APIC) $(CC_OUTPUT_FLAG)$@ $<
$(TARGET_DIR)/%.o: $(DEV_DIR)/%.S
$(Q) echo " AS $@"
mkdir -p $(dir $@)
$(ASSEMBLE) $(INCLUDES) $(CC_OUTPUT_FLAG)$@ $<
%.p: %.cpp
$(CXX) $(EFLAGS) $(DEFINES) $(INCLUDES) $< > $@
%.s: %.cpp
$(CXX) $(SFLAGS) $(DEFINES) $(INCLUDES) $< > $@
#######################################################
# controlled by
# LIB
# SHLIB
# SHLIBA
# SRCS
# VAR
# SOLINK
#######################################################
VLIB = $(LIB:%.$(LIBEXT)=%$(VAR).$(LIBEXT))
VSHLIB = $(SHLIB:%.$(SOEXT)=%$(VAR).$(SOEXT))
VSHLIBA = $(SHLIBA:%.$(LIBEXT)=%$(VAR).$(LIBEXT))
VSHOBJS = $(SRCS:$(DEV_DIR)/%.cpp=$(TARGET_DIR)/%_shobj.$(OBJEXT))
# C++ related targets
ifeq "$(BUILD_MODE)" "release"
ifeq "$(OS_LINUX_KERNEL)" "1"
ifeq "$(ENABLE_SHARED)" "y"
COMPILE.cc := $(strip $(subst -O2,,$(COMPILE.cc)))
COMPILE.c := $(strip $(subst -O2,,$(COMPILE.c)))
endif
endif
endif
#$(VSHDIR)%.o: %.cpp
$(TARGET_DIR)/%_shobj.o: $(DEV_DIR)/%.cpp
$(Q) echo " CC $@"
$(Q) mkdir -p $(dir $@)
$(Q) $(COMPILE.cc) $(INCLUDES) $(PIC) $(CC_OUTPUT_FLAG) $@ $<
#$(VSHDIR)%.o: %.c
$(TARGET_DIR)/%_shobj.o: $(DEV_DIR)/%.c
$(Q) echo " CC $@"
$(Q) mkdir -p $(dir $@)
$(Q) $(COMPILE.c) $(INCLUDES) $(PIC) $(CC_OUTPUT_FLAG) $@ $<