build: Pull common fragments into a build.rules file
Some things are used by most of the binaries, pull them into a common rule fragment that we can use properly. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
21cc50a434
commit
a41a29192e
9 changed files with 74 additions and 212 deletions
|
@ -1,22 +1,9 @@
|
|||
ALL=wlantest wlantest_cli test_vectors
|
||||
|
||||
all: $(ALL)
|
||||
include ../src/build.rules
|
||||
|
||||
UNAME := $(shell uname -s)
|
||||
|
||||
ifndef CC
|
||||
CC=gcc
|
||||
endif
|
||||
|
||||
ifndef RANLIB
|
||||
RANLIB=ranlib
|
||||
endif
|
||||
|
||||
ifndef CFLAGS
|
||||
CFLAGS = -MMD -O2 -Wall -g
|
||||
endif
|
||||
|
||||
|
||||
CFLAGS += -I.
|
||||
CFLAGS += -I../src
|
||||
CFLAGS += -I../src/utils
|
||||
|
@ -26,26 +13,6 @@ ifneq ($(UNAME),Darwin)
|
|||
LIBS += -lrt
|
||||
endif
|
||||
|
||||
ifndef LDO
|
||||
LDO=$(CC)
|
||||
endif
|
||||
|
||||
Q=@
|
||||
E=echo
|
||||
ifeq ($(V), 1)
|
||||
Q=
|
||||
E=true
|
||||
endif
|
||||
ifeq ($(QUIET), 1)
|
||||
Q=@
|
||||
E=true
|
||||
endif
|
||||
|
||||
%.o: %.c
|
||||
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
|
||||
@$(E) " CC " $<
|
||||
|
||||
|
||||
OWN_LIBS += ../src/utils/libutils.a
|
||||
OWN_LIBS += ../src/crypto/libcrypto.a
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue