Makefile (616B)
1# SPDX-License-Identifier: GPL-2.0 2ifeq ($(strip $(V)), 1) 3 Q = 4else 5 Q = @ 6endif 7 8CFLAGS += -std=gnu99 -Wall -Wextra -g \ 9 -D_GNU_SOURCE \ 10 -Wno-unused-parameter \ 11 -Wmaybe-uninitialized \ 12 -Wredundant-decls \ 13 -Wcast-align \ 14 -Wsign-compare \ 15 -Wno-missing-field-initializers \ 16 -Wno-shift-negative-value 17 18CC := $(CROSS_COMPILE)gcc 19 20TOOLS = loopback_test 21 22all: $(TOOLS) 23 24%.o: %.c ../greybus_protocols.h 25 @echo ' TARGET_CC $@' 26 $(Q)$(CC) $(CFLAGS) -c $< -o $@ 27 28loopback_%: loopback_%.o 29 @echo ' TARGET_LD $@' 30 $(Q)$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ 31 32clean:: 33 rm -f *.o $(TOOLS)