]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - tools/lib/api/Makefile
Merge tag 'mac80211-for-davem-2015-05-26' of git://git.kernel.org/pub/scm/linux/kerne...
[mirror_ubuntu-artful-kernel.git] / tools / lib / api / Makefile
CommitLineData
85c66be1 1include ../../scripts/Makefile.include
553873e1 2include ../../perf/config/utilities.mak # QUIET_CLEAN
85c66be1 3
b4f91668
JO
4ifeq ($(srctree),)
5srctree := $(patsubst %/,%,$(dir $(shell pwd)))
6srctree := $(patsubst %/,%,$(dir $(srctree)))
7srctree := $(patsubst %/,%,$(dir $(srctree)))
8#$(info Determined 'srctree' to be $(srctree))
9endif
10
3c4797d4
RV
11CC = $(CROSS_COMPILE)gcc
12AR = $(CROSS_COMPILE)ar
13
b4f91668 14MAKEFLAGS += --no-print-directory
85c66be1 15
285a8f24 16LIBFILE = $(OUTPUT)libapi.a
85c66be1 17
b4f91668 18CFLAGS := $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
de28c15d 19CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC
b4f91668 20CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
85c66be1
BP
21
22RM = rm -f
23
b4f91668 24build := -f $(srctree)/tools/build/Makefile.build dir=. obj
285a8f24 25API_IN := $(OUTPUT)libapi-in.o
85c66be1 26
b4f91668 27export srctree OUTPUT CC LD CFLAGS V
85c66be1 28
b4f91668 29all: $(LIBFILE)
553873e1 30
b4f91668 31$(API_IN): FORCE
285a8f24 32 @$(MAKE) $(build)=libapi
b4f91668
JO
33
34$(LIBFILE): $(API_IN)
35 $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(API_IN)
85c66be1
BP
36
37clean:
285a8f24 38 $(call QUIET_CLEAN, libapi) $(RM) $(LIBFILE); \
b4f91668
JO
39 find $(if $(OUTPUT),$(OUTPUT),.) -name \*.o | xargs $(RM)
40
41FORCE:
85c66be1 42
b4f91668 43.PHONY: clean FORCE