forked from checkpoint-restore/criu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.config
51 lines (45 loc) · 1.4 KB
/
Makefile.config
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
include scripts/utilities.mak
include scripts/feature-tests.mak
CONFIG := include/config.h
ifeq ($(call try-cc,$(LIBBSD_DEV_TEST),-lbsd),y)
LIBS += -lbsd
DEFINES += -DCONFIG_HAS_LIBBSD
endif
ifeq ($(call pkg-config-check,libselinux),y)
LIBS := -lselinux $(LIBS)
DEFINES += -DCONFIG_HAS_SELINUX
endif
$(CONFIG): scripts/utilities.mak scripts/feature-tests.mak include/config-base.h
$(E) " GEN " $@
$(Q) @echo '#ifndef __CR_CONFIG_H__' > $@
$(Q) @echo '#define __CR_CONFIG_H__' >> $@
$(Q) @echo '' >> $@
$(Q) @echo '#include "config-base.h"' >> $@
$(Q) @echo '' >> $@
ifeq ($(call try-cc,$(TCP_REPAIR_TEST),),y)
$(Q) @echo '#define CONFIG_HAS_TCP_REPAIR' >> $@
endif
ifeq ($(call try-cc,$(PRLIMIT_TEST),),y)
$(Q) @echo '#define CONFIG_HAS_PRLIMIT' >> $@
endif
ifeq ($(call try-cc,$(STRLCPY_TEST),$(LIBS)),y)
$(Q) @echo '#define CONFIG_HAS_STRLCPY' >> $@
endif
ifeq ($(call try-cc,$(STRLCAT_TEST),$(LIBS)),y)
$(Q) @echo '#define CONFIG_HAS_STRLCAT' >> $@
endif
ifeq ($(call try-cc,$(PTRACE_PEEKSIGINFO_TEST),),y)
$(Q) @echo '#define CONFIG_HAS_PEEKSIGINFO_ARGS' >> $@
endif
ifeq ($(VDSO),y)
$(Q) @echo '#define CONFIG_VDSO' >> $@
endif
ifeq ($(call try-cc,$(SETPROCTITLE_INIT_TEST),-lbsd),y)
$(Q) @echo '#define CONFIG_HAS_SETPROCTITLE_INIT' >> $@
endif
ifeq ($(piegen-y),y)
$(Q) @echo '#define CONFIG_PIEGEN' >> $@
endif
$(Q) @echo '#endif /* __CR_CONFIG_H__ */' >> $@
config: $(CONFIG)
.PHONY: config