lin
2025-07-30 fcd736bf35fd93b563e9bbf594f2aa7b62028cc9
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
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
 
# This file contains definitions which control the C compiler.
 
 
COPTIONS =                    \
   -g                    \
   -O2                    \
   -funit-at-a-time
 
# Compiler is too old to support
#
#    -Wframe-larger-than=256
#    -Wlarger-than=4096
#    -Wsync-nand
 
# Enable GC on unused functions and data
CGC    =                    \
   -ffunction-sections            \
   -fdata-sections
 
PTHREAD    =                     \
   -pthread
 
LDGC    =                    \
   -Xlinker --gc-sections
 
CWARN    =                    \
   -Waddress                \
   -Waggregate-return            \
   -Wall                    \
   -Warray-bounds                \
   -Wbad-function-cast            \
   -Wcast-align                \
   -Wchar-subscripts            \
   -Wclobbered                \
   -Wcomment                \
   -Wconversion                \
   -Wdeclaration-after-statement        \
   -Wdisabled-optimization            \
   -Wempty-body                \
   -Werror                    \
   -Wextra                    \
   -Wfloat-equal                \
   -Wformat                \
   -Wformat-nonliteral            \
   -Wformat-security            \
   -Wformat-y2k                \
   -Wignored-qualifiers            \
   -Wimplicit                \
   -Winit-self                \
   -Winline                \
   -Wlogical-op                \
   -Wmain                    \
   -Wmissing-braces            \
   -Wmissing-declarations            \
   -Wmissing-field-initializers        \
   -Wmissing-format-attribute        \
   -Wmissing-include-dirs            \
   -Wmissing-noreturn            \
   -Wmissing-parameter-type        \
   -Wmissing-prototypes            \
   -Wnested-externs            \
   -Wold-style-declaration            \
   -Wold-style-definition            \
   -Woverlength-strings            \
   -Woverride-init                \
   -Wpacked                \
   -Wparentheses                \
   -Wpointer-arith                \
   -Wpointer-sign                \
   -Wredundant-decls            \
   -Wreturn-type                \
   -Wsequence-point            \
   -Wshadow                \
   -Wsign-compare                \
   -Wsign-conversion            \
   -Wstack-protector            \
   -Wstrict-aliasing            \
   -Wstrict-aliasing=3            \
   -Wstrict-overflow            \
   -Wstrict-overflow=5            \
   -Wstrict-prototypes            \
   -Wswitch                \
   -Wswitch-default            \
   -Wswitch-enum                \
   -Wtrigraphs                \
   -Wtype-limits                \
   -Wundef                    \
   -Wuninitialized                \
   -Wunknown-pragmas            \
   -Wunsafe-loop-optimizations        \
   -Wunused-function            \
   -Wunused-label                \
   -Wunused-parameter            \
   -Wunused-value                \
   -Wunused-variable            \
   -Wvariadic-macros            \
   -Wvla                    \
   -Wvolatile-register-var            \
   -Wwrite-strings                \
   -pedantic-errors
 
INCLUDES    =                \
       -I$(ADHD_DIR)/include        \
       -I$(ADHD_SOURCE_DIR)        \
       -I$(ADHD_DIR)/cras/src/common    \
       -I$(ADHD_DIR)/cras/src/libcras
 
CFLAGS        =                \
   -std=gnu99                \
   -MD                     \
   $(INCLUDES)                \
   $(PTHREADS)                \
   $(CWARN) $(COPTIONS) $(CGC) $(LDGC)