You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hostap/src/build.rules

76 lines
1.1 KiB
Plaintext

.PHONY: all
all: _all
# disable built-in rules
.SUFFIXES:
ROOTDIR := $(dir $(lastword $(MAKEFILE_LIST)))
ROOTDIR := $(dir $(ROOTDIR:%/=%))
ifndef CC
CC=gcc
endif
ifndef RANLIB
RANLIB=ranlib
endif
ifndef LDO
LDO=$(CC)
endif
ifndef CFLAGS
CFLAGS = -MMD -O2 -Wall -g
endif
ifneq ($(CONFIG_FILE),)
-include $(CONFIG_FILE)
.PHONY: verify_config
verify_config:
@if [ ! -r $(CONFIG_FILE) ]; then \
echo 'Building $(firstword $(ALL)) requires a configuration file'; \
echo '(.config). See README for more instructions. You can'; \
echo 'run "cp defconfig .config" to create an example'; \
echo 'configuration.'; \
exit 1; \
fi
VERIFY := verify_config
else
VERIFY :=
endif
# default target
.PHONY: _all
_all: $(VERIFY) $(ALL) $(EXTRA_TARGETS)
Q=@
E=echo
ifeq ($(V), 1)
Q=
E=true
endif
ifeq ($(QUIET), 1)
Q=@
E=true
endif
ifeq ($(Q),@)
MAKEFLAGS += --no-print-directory
endif
ifdef CONFIG_CODE_COVERAGE
%.o: %.c
@$(E) " CC " $<
$(Q)cd $(dir $@); $(CC) -c -o $(notdir $@) $(CFLAGS) $(notdir $<)
else
%.o: %.c
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
@$(E) " CC " $<
endif
.PHONY: common-clean
common-clean:
$(Q)$(MAKE) -C $(ROOTDIR)/src clean
$(Q)rm -f $(ALL)