summaryrefslogtreecommitdiff
path: root/package/targets.mak
blob: 3d3b61140a13b12c44bed041bc09bd6c04ad7f2c (plain)
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
LIBEXEC_TARGETS :=

LIB_DEFS := EXECLINE=execline

ifeq ($(MULTICALL),1)

BIN_TARGETS := execline
CONTENTS := $(notdir $(wildcard src/execline/deps-exe/*))
BIN_SYMLINKS := cd umask $(CONTENTS)
EXTRA_TEMP := src/multicall/execline.c

define symlink_definition
SYMLINK_TARGET_$(1) := execline
endef
$(foreach name,$(BIN_SYMLINKS),$(eval $(call symlink_definition,$(name))))

src/multicall/execline.c: tools/gen-multicall.sh $(CONTENTS:%=src/$(package)/%.c)
	./tools/gen-multicall.sh > src/multicall/execline.c

src/multicall/execline.o: src/multicall/execline.c src/include/execline/config.h src/include/execline/execline.h

else

BIN_TARGETS := $(notdir $(wildcard src/execline/deps-exe/*))
BIN_SYMLINKS := cd umask

ifeq ($(PEDANTIC_POSIX),1)
SYMLINK_TARGET_cd := posix-cd
SYMLINK_TARGET_umask := posix-umask
else
SYMLINK_TARGET_cd := execline-cd
SYMLINK_TARGET_umask := execline-umask
endif

endif