-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
35 lines (28 loc) · 842 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#
# Makefile for phoenix-rtos-hostutils
#
# Copyright 2018-2021 Phoenix Systems
#
# %LICENSE%
#
# NOTE: currently host utils are being built with sanitizers enabled
# - to disable either set NOSAN=1 env variable or uncomment the line below
# NOSAN := 1
include ../phoenix-rtos-build/Makefile.common
.DEFAULT_GOAL := all
# provide common way for linking against hidapi for subcomponents
ifeq ($(UNAME_S),Linux)
HIDAPI_LIB := -lhidapi-hidraw
else
HIDAPI_LIB := $(shell pkg-config --libs hidapi)
endif
# read out all components
ALL_MAKES := $(wildcard */Makefile)
include $(ALL_MAKES)
# build all tools by default
DEFAULT_COMPONENTS := $(ALL_COMPONENTS)
# create generic targets
.PHONY: all install clean
all: $(DEFAULT_COMPONENTS)
install: $(patsubst %,%-install,$(DEFAULT_COMPONENTS))
clean: $(patsubst %,%-clean,$(ALL_COMPONENTS))