mirror of
https://github.com/linux-msm/qrtr.git
synced 2025-12-25 14:29:14 +01:00
makefile: add support to install header file
New macro to be used to deploy header files when 'installing'. Use it as: $(call add-inc-target,lib,foo.h) to install file lib/foo.h Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
This commit is contained in:
8
Makefile
8
Makefile
@@ -57,6 +57,14 @@ endif
|
||||
@$(CC) -MM -MF $(call src_to_dep,$<) -MP -MT "$@ $(call src_to_dep,$<)" $(CFLAGS) $(_CFLAGS) $<
|
||||
@$(CC) -o $@ -c $< $(CFLAGS) $(_CFLAGS)
|
||||
|
||||
define add-inc-target
|
||||
$(PREFIX)/include/$2: $1/$2
|
||||
@echo "INSTALL $$<"
|
||||
@install -D -m 755 $$< $$@
|
||||
|
||||
all-install += $(PREFIX)/include/$2
|
||||
endef
|
||||
|
||||
define add-target-deps
|
||||
all-srcs += $($1-srcs)
|
||||
all-objs += $(call src_to_obj,$($1-srcs))
|
||||
|
||||
Reference in New Issue
Block a user