| 1 |
# |
| 2 |
# WARNING: do not run this directly, it should be run by the main Makefile |
| 3 |
|
| 4 |
include ../../Makefile.defs |
| 5 |
auto_gen= |
| 6 |
NAME=xhttp_pi.so |
| 7 |
DEFS += |
| 8 |
LIBS += |
| 9 |
|
| 10 |
ifeq ($(CROSS_COMPILE),) |
| 11 |
XML2CFG=$(shell which xml2-config) |
| 12 |
ifeq ($(XML2CFG),) |
| 13 |
XML2CFG=$(shell \ |
| 14 |
if pkg-config --exists libxml-2.0; then \ |
| 15 |
echo 'pkg-config libxml-2.0'; \ |
| 16 |
fi) |
| 17 |
endif |
| 18 |
endif |
| 19 |
|
| 20 |
ifneq ($(XML2CFG),) |
| 21 |
DEFS += $(shell $(XML2CFG) --cflags ) |
| 22 |
LIBS += $(shell $(XML2CFG) --libs) |
| 23 |
else |
| 24 |
DEFS += -I$(LOCALBASE)/include/libxml2 \ |
| 25 |
-I$(LOCALBASE)/include |
| 26 |
LIBS += -L$(LOCALBASE)/lib -lxml2 |
| 27 |
endif |
| 28 |
|
| 29 |
include ../../Makefile.modules |
| 30 |
|
| 31 |
install-cfg: |
| 32 |
# provisioning xml framework samples |
| 33 |
@mkdir -p $(data_prefix)/$(data_dir)/xhttp_pi |
| 34 |
@for FILE in $(wildcard ../../../utils/kamctl/xhttp_pi/*) ; do \ |
| 35 |
if [ -f $$FILE ] ; then \ |
| 36 |
$(INSTALL_TOUCH) $$FILE \ |
| 37 |
$(data_prefix)/$(data_dir)/xhttp_pi/`basename "$$FILE"` ; \ |
| 38 |
$(INSTALL_CFG) $$FILE \ |
| 39 |
$(data_prefix)/$(data_dir)/xhttp_pi/`basename "$$FILE"` ; \ |
| 40 |
fi ; \ |
| 41 |
done |
| 42 |
# provisioning xml framework |
| 43 |
@$(call try_err, mkdir -p $(cfg_prefix)/$(cfg_dir)) |
| 44 |
@$(call try_err, $(INSTALL_TOUCH) \ |
| 45 |
$(cfg_prefix)/$(cfg_dir)/pi_framework.xml.sample) |
| 46 |
@$(call try_err, $(INSTALL_CFG) \ |
| 47 |
../../../misc/examples/pi_framework/pi_framework.xml \ |
| 48 |
$(cfg_prefix)/$(cfg_dir)/pi_framework.xml.sample) |
| 49 |
@if [ -z "${skip_cfg_install}" -a \ |
| 50 |
! -f $(cfg_prefix)/$(cfg_dir)/pi_framework.xml ]; then \ |
| 51 |
mv -f $(cfg_prefix)/$(cfg_dir)/pi_framework.xml.sample \ |
| 52 |
$(cfg_prefix)/$(cfg_dir)/pi_framework.xml; \ |
| 53 |
fi |