Linux Audio

Check our new training course

Real-Time Linux with PREEMPT_RT training

Feb 18-20, 2025
Register
Loading...
v4.17
 1# SPDX-License-Identifier: GPL-2.0
 2include ../../scripts/Makefile.include
 3include ../../scripts/utilities.mak		# QUIET_CLEAN
 4
 5ifeq ($(srctree),)
 6srctree := $(patsubst %/,%,$(dir $(CURDIR)))
 7srctree := $(patsubst %/,%,$(dir $(srctree)))
 8srctree := $(patsubst %/,%,$(dir $(srctree)))
 9#$(info Determined 'srctree' to be $(srctree))
10endif
11
12CC ?= $(CROSS_COMPILE)gcc
13AR ?= $(CROSS_COMPILE)ar
14LD ?= $(CROSS_COMPILE)ld
15
16MAKEFLAGS += --no-print-directory
17
18LIBFILE = $(OUTPUT)libapi.a
19
20CFLAGS := $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
21CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -U_FORTIFY_SOURCE -fPIC
22
23ifeq ($(DEBUG),0)
24ifeq ($(CC_NO_CLANG), 0)
25  CFLAGS += -O3
26else
27  CFLAGS += -O6
28endif
29endif
30
31ifeq ($(DEBUG),0)
32  CFLAGS += -D_FORTIFY_SOURCE
33endif
34
35# Treat warnings as errors unless directed not to
36ifneq ($(WERROR),0)
37  CFLAGS += -Werror
38endif
39
40CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
41CFLAGS += -I$(srctree)/tools/lib/api
42CFLAGS += -I$(srctree)/tools/include
43
44RM = rm -f
45
46API_IN := $(OUTPUT)libapi-in.o
47
48all:
49
50export srctree OUTPUT CC LD CFLAGS V
51include $(srctree)/tools/build/Makefile.include
52
53all: fixdep $(LIBFILE)
54
55$(API_IN): FORCE
56	@$(MAKE) $(build)=libapi
57
58$(LIBFILE): $(API_IN)
59	$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(API_IN)
60
61clean:
62	$(call QUIET_CLEAN, libapi) $(RM) $(LIBFILE); \
63	find $(if $(OUTPUT),$(OUTPUT),.) -name \*.o -or -name \*.o.cmd -or -name \*.o.d | xargs $(RM)
64
65FORCE:
66
67.PHONY: clean FORCE
v4.6
 
 1include ../../scripts/Makefile.include
 2include ../../scripts/utilities.mak		# QUIET_CLEAN
 3
 4ifeq ($(srctree),)
 5srctree := $(patsubst %/,%,$(dir $(shell pwd)))
 6srctree := $(patsubst %/,%,$(dir $(srctree)))
 7srctree := $(patsubst %/,%,$(dir $(srctree)))
 8#$(info Determined 'srctree' to be $(srctree))
 9endif
10
11CC = $(CROSS_COMPILE)gcc
12AR = $(CROSS_COMPILE)ar
 
13
14MAKEFLAGS += --no-print-directory
15
16LIBFILE = $(OUTPUT)libapi.a
17
18CFLAGS := $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
19CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
21CFLAGS += -I$(srctree)/tools/lib/api
 
22
23RM = rm -f
24
25API_IN := $(OUTPUT)libapi-in.o
26
27all:
28
29export srctree OUTPUT CC LD CFLAGS V
30include $(srctree)/tools/build/Makefile.include
31
32all: fixdep $(LIBFILE)
33
34$(API_IN): FORCE
35	@$(MAKE) $(build)=libapi
36
37$(LIBFILE): $(API_IN)
38	$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(API_IN)
39
40clean:
41	$(call QUIET_CLEAN, libapi) $(RM) $(LIBFILE); \
42	find $(if $(OUTPUT),$(OUTPUT),.) -name \*.o -or -name \*.o.cmd -or -name \*.o.d | xargs $(RM)
43
44FORCE:
45
46.PHONY: clean FORCE