File: Makefile

package info (click to toggle)
kf6-syntax-highlighting 6.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 47,568 kB
  • sloc: xml: 197,750; cpp: 12,850; python: 3,023; sh: 955; perl: 546; ruby: 488; pascal: 393; javascript: 161; php: 150; jsp: 132; lisp: 131; haskell: 124; ada: 119; ansic: 107; makefile: 96; f90: 94; ml: 85; cobol: 81; yacc: 71; csh: 62; erlang: 54; sql: 51; java: 47; objc: 37; awk: 31; asm: 30; tcl: 29; fortran: 18; cs: 10
file content (114 lines) | stat: -rw-r--r-- 1,672 bytes parent folder | download
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
# comment

include Makefile.in
-include Makefile.doesntexist

.PHONY: all

all: target

foo = bar $(var) \
    $(baz) quux

ifeq ($(CC),gcc)
    bla=$(call func,param1,param2)
else ifeq "x" "y"
    $(error this seems wrong)
else
    libs=$(normal_libs)
endif

target1:
        error

target2: bla.cpp $@
	$(CC) bla.c -o bla.o
	$(CC) bla.o $< \
	    -o bla.exe
	@echo "hello" \
  bla bla
	echo "hello" \
  bla bla

target3: ; @echo ’hello \
world’ ; echo "hello \
world"
	@echo "hello"

target4: ; echo ’hello \
world’ ; echo "hello \
world"
	echo "hello"

target5 \
target6 \
target7 &::
	@echo "hello"
# this should not break the rule
  # ifndef is a command
	ifndef

# String Substitution
VAR := $(ANOTHER_VAR:%=%+1)

# Variable Assignment
RELAXED ::= mello
rempl := x
foo := a b c
bar := foo
hello := $($(bar):a=$(rempl))
my??var=value
var??=value
var?=value
var? = value
var :::= value
var ::= value
var += value
var != value
  var = value\#nocomment
  var = value#comment
  var = value;value2
override var = a

define var :::=
bar
endef

override define var :::=
bar
endef

undefine var
override undefine var

export foo bar
export foo = bar
unexport foo bar

prog: private EXTRA_CFLAGS = -L/usr/local/lib
prog: CFLAGS = -g
prog: a.o b.o

# Conditionals
bar =
foo = $(bar)
ifdef bar
frobozz = yes
else ifdef foo
frobozz = no
endif

error_type := 0
check:
ifeq ($(error_type),0)
else ifeq ($(error_type),1)
else ifeq ($(error_type),2)
else ifeq ($(error_type),3)
endif

$(info "'")
$(info '"')
$(info $(??))

$(eval $(call Variable_rule,target/compile_flags,$${CXX} $$(CXXFLAGS)))
$(eval ${call Variable_rule,target/link_flags,$$(CXX) $$(LDFLAGS) $${LDLIBS}})