ACPI / PNP: Avoid conflicting resource reservations
[linux/fpc-iii.git] / tools / lib / api / Makefile
blob8bd9606584632582f7e893c0a3c01e8f0240678f
1 include ../../scripts/Makefile.include
2 include ../../perf/config/utilities.mak # QUIET_CLEAN
4 ifeq ($(srctree),)
5 srctree := $(patsubst %/,%,$(dir $(shell pwd)))
6 srctree := $(patsubst %/,%,$(dir $(srctree)))
7 srctree := $(patsubst %/,%,$(dir $(srctree)))
8 #$(info Determined 'srctree' to be $(srctree))
9 endif
11 CC = $(CROSS_COMPILE)gcc
12 AR = $(CROSS_COMPILE)ar
14 MAKEFLAGS += --no-print-directory
16 LIBFILE = $(OUTPUT)libapi.a
18 CFLAGS := $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
19 CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC
20 CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
22 RM = rm -f
24 build := -f $(srctree)/tools/build/Makefile.build dir=. obj
25 API_IN := $(OUTPUT)libapi-in.o
27 export srctree OUTPUT CC LD CFLAGS V
29 all: $(LIBFILE)
31 $(API_IN): FORCE
32 @$(MAKE) $(build)=libapi
34 $(LIBFILE): $(API_IN)
35 $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(API_IN)
37 clean:
38 $(call QUIET_CLEAN, libapi) $(RM) $(LIBFILE); \
39 find $(if $(OUTPUT),$(OUTPUT),.) -name \*.o | xargs $(RM)
41 FORCE:
43 .PHONY: clean FORCE