OpenCores
URL https://opencores.org/ocsvn/core_arm/core_arm/trunk

Subversion Repositories core_arm

[/] [core_arm/] [trunk/] [build/] [Makefile.defs] - Blame information for rev 6

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 tarookumic
#Konrad Eisele,2003
2
 
3
ifdef QUIET
4
 quiet=q_
5
else
6
 quiet=
7
endif
8
 
9
# ===========================================================================
10
# Generic stuff
11
# ===========================================================================
12
 
13
# function to only execute the passed command if necessary
14
# >'< substitution is for echo to work, >$< substitution to preserve $ when reloading .cmd file
15
# note: when using inline perl scripts [perl -e '...$$t=1;...'] in $(cmd_xxx) double $$ your perl vars
16
 
17
if_changed = $(if $(strip $? \
18
                          $(filter-out $(cmd_$(1)),$(cmd_$@))\
19
                          $(filter-out $(cmd_$@),$(cmd_$(1)))),\
20
        @set -e; \
21
        $(if $($(quiet)cmd_$(1)),echo '  $(subst ','\'',$($(quiet)cmd_$(1)))';) \
22
        $(cmd_$(1)); \
23
        echo 'cmd_$@ := $(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).cmd)
24
 
25
 
26
 
27
if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\
28
                          $(filter-out $(cmd_$(1)),$(cmd_$@))\
29
                          $(filter-out $(cmd_$@),$(cmd_$(1)))),\
30
        @set -e; \
31
        $(if $($(quiet)cmd_$(1)),echo '  $(subst ','\'',$($(quiet)cmd_$(1)))';) \
32
        $(cmd_$(1)); \
33
        echo 'cmd_$@ := $(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).cmd; \
34
        echo -n '$(obj)/' >> $(@D)/.$(@F).cmd; \
35
        cat $(depfile)    >> $(@D)/.$(@F).cmd; \
36
        rm -f $(depfile); )
37
 
38
# The temporary file to save gcc -MD generated dependencies must not
39
# contain a comma
40
depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
41
 
42
c_flags        = -Wp,-MD,$(depfile) $(CFLAGS) $(LOCAL_CFLAGS)  $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o)
43
a_flags        = -Wp,-MD,$(depfile) $(AFLAGS)  $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
44
ld_flags       = $(LDFLAGS) $(LDFLAGS_$(@F))
45
 
46
pathsearch        = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(PATH)))))
47
pathsearch-exit   = $(if $(strip $(call pathsearch,$(1))),,@echo $(2);exit 1 )
48
pathsearch-return = $(strip $(call pathsearch,$(1)))
49
 
50
 
51
 

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.