feat: add install target to makefile
This commit is contained in:
parent
91d6d55a74
commit
53b936555b
9
Makefile
9
Makefile
@ -22,6 +22,7 @@ bins?= \
|
||||
81-deadlock
|
||||
|
||||
bins_target=$(addprefix ${build_dir}/,${bins})
|
||||
install_bins_targets=$(addprefix ${install_dir}/bin/,${bins})
|
||||
|
||||
src_dirs=$(sort $(dir $(wildcard ${src_dir}/**/)))
|
||||
includes=$(patsubst %,-I%,${src_dirs})
|
||||
@ -35,8 +36,12 @@ objs+=$(patsubst %.c,${build_dir}/%.o,${srcs})
|
||||
all: build
|
||||
|
||||
.PHONY: install
|
||||
install: build
|
||||
true
|
||||
install: build ${install_bins_targets}
|
||||
|
||||
.PHONY: ${install_bins_targets}
|
||||
${install_bins_targets}: ${install_dir}/bin/%: ${build_dir}/%
|
||||
@mkdir -p $(dir $@)
|
||||
install $^ $@
|
||||
|
||||
.PHONY: graphs
|
||||
graphs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user