2001-07-06 13:12:14 +00:00
|
|
|
# generic utility modules
|
|
|
|
|
# (c) 2001 jannet it services
|
|
|
|
|
# contact@jannet.de
|
|
|
|
|
# $Id$
|
|
|
|
|
|
2001-07-27 22:02:40 +00:00
|
|
|
include $(MODDIR)/make/defs.mk
|
2019-02-27 20:46:54 +00:00
|
|
|
include $(MODDIR)/make/defs-cpp.mk
|
2005-04-02 20:05:31 +00:00
|
|
|
include $(MODDIR)/make/rules.mk
|
2018-11-27 15:10:18 +00:00
|
|
|
include $(MODDIR)/make/dev-utils.mk
|
2005-04-02 20:05:31 +00:00
|
|
|
|
2011-05-15 18:28:19 +00:00
|
|
|
all:
|
2019-03-13 15:26:22 +00:00
|
|
|
|
|
|
|
|
ifeq ($(wildcard $(LIB_A)),)
|
|
|
|
|
USE_PROJECT_LIB = false
|
|
|
|
|
endif
|
|
|
|
|
|
2009-06-27 16:22:19 +00:00
|
|
|
ifeq ($(USE_PROJECT_LIB),false)
|
2019-03-13 15:26:22 +00:00
|
|
|
ifeq ($(TARGET),mingw)
|
|
|
|
|
SHOBJS += $(wildcard *.dll)
|
|
|
|
|
else
|
|
|
|
|
SHOBJS += $(wildcard *.so)
|
|
|
|
|
endif
|
2011-06-20 07:47:13 +00:00
|
|
|
all: $(LD_CONF)
|
2011-05-15 18:28:19 +00:00
|
|
|
install:
|
2009-06-27 16:22:19 +00:00
|
|
|
else
|
2011-05-15 18:28:19 +00:00
|
|
|
all: $(LD_CONF) $(LIB_SO) $(LINKS_SO) $(MSVCPP_IMPLIB) $(STRIP_DONE)
|
2011-06-19 11:40:38 +00:00
|
|
|
install: install_LIB
|
2009-06-30 12:14:29 +00:00
|
|
|
endif
|
2008-04-09 11:20:01 +00:00
|
|
|
clean: libclean local_libclean clean.ld-conf
|
2005-04-02 20:24:19 +00:00
|
|
|
distclean: clean
|
2007-08-21 16:20:30 +00:00
|
|
|
|
2007-07-18 16:41:37 +00:00
|
|
|
local_libclean: clean.mingw clean.unix clean.all
|
|
|
|
|
|
2011-06-19 11:40:38 +00:00
|
|
|
ifneq ($(wildcard *.so *.so.*),)
|
2014-07-22 09:08:40 +00:00
|
|
|
install: install_files_LD_CONF
|
2011-06-19 11:40:38 +00:00
|
|
|
endif
|
|
|
|
|
|
2007-07-18 16:41:37 +00:00
|
|
|
clean.unix:
|
|
|
|
|
ifneq ($(TARGET),mingw)
|
2017-09-02 19:26:52 +00:00
|
|
|
$(RM) -rf *.so.* *.so st*
|
2007-07-18 16:41:37 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
clean.mingw:
|
|
|
|
|
ifeq ($(TARGET),mingw)
|
2017-09-02 19:26:52 +00:00
|
|
|
$(RM) -rf *.dll *.def *.exp *.lib
|
2007-07-18 16:41:37 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
clean.all:
|
2017-09-02 19:26:52 +00:00
|
|
|
$(RM) -rf *.a *.o *~ st* .*.swp *.done ld-*.conf version.ldscript
|
2008-04-09 11:20:01 +00:00
|
|
|
|
|
|
|
|
ld-%.conf:
|
|
|
|
|
echo $(INSTALL_LIBDIR) > $@.tmp
|
|
|
|
|
mv $@.tmp $@
|
|
|
|
|
|
|
|
|
|
clean.ld-conf:
|
2017-09-02 19:26:52 +00:00
|
|
|
$(RM) -f $(LD_CONF)
|
2009-06-11 16:06:17 +00:00
|
|
|
|
2009-06-12 19:43:23 +00:00
|
|
|
echo.libs:
|
|
|
|
|
@echo INSTALLED_LIB_SO = $(INSTALLED_LIB_SO)
|
|
|
|
|
@echo INSTALLED_LIB = $(INSTALLED_LIB)
|
2009-06-11 16:06:17 +00:00
|
|
|
|
2011-02-20 14:15:22 +00:00
|
|
|
install-links:
|
2017-12-18 13:45:55 +00:00
|
|
|
l=$(shell $(PWD))/$(notdir $(INSTALLED_LIB_SO)) ;\
|
2011-02-20 14:15:22 +00:00
|
|
|
cd $(dir $(INSTALLED_LIB_SO)) &&\
|
|
|
|
|
sudo ln -sf $$l
|
2009-06-12 19:43:23 +00:00
|
|
|
# ------------------------------------------ contrib libraries
|
2009-06-11 16:06:17 +00:00
|
|
|
# deps on mandatory targets
|
|
|
|
|
all: $(CONTRIB_LIBS)
|
|
|
|
|
clean: clean.contrib-libs
|
|
|
|
|
|
|
|
|
|
# deps on optional targets
|
2009-06-12 19:43:23 +00:00
|
|
|
echo-contrib: echo.contrib-libs echo.libs
|
2009-06-11 16:06:17 +00:00
|
|
|
|
|
|
|
|
# rules
|
|
|
|
|
clean.contrib-libs:
|
2017-09-02 19:26:52 +00:00
|
|
|
$(RM) -f $(CONTRIB_LIBS)
|
2009-06-11 16:06:17 +00:00
|
|
|
|
|
|
|
|
define contrib_lib_search_rules
|
|
|
|
|
%.dll: $(1)/%.dll
|
|
|
|
|
cp -p $$< $$@
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
|
$(foreach p,$(CONTRIB_LIBS_PATH),$(eval $(call contrib_lib_search_rules,$(p))))
|
|
|
|
|
|
|
|
|
|
echo.contrib-libs:
|
|
|
|
|
@echo CONTRIB_LIBS_PATH = $(CONTRIB_LIBS_PATH)
|
|
|
|
|
@echo CONTRIB_LIBS = $(CONTRIB_LIBS)
|
2009-08-08 09:23:23 +00:00
|
|
|
|
|
|
|
|
ifeq ($(TARGET),mingw)
|
|
|
|
|
clean.winres:
|
2017-09-02 19:26:52 +00:00
|
|
|
$(RM) -f $(WINRES_RC) $(WINRES_O) *.tmp
|
2009-08-08 09:23:23 +00:00
|
|
|
|
|
|
|
|
clean: clean.winres
|
|
|
|
|
#%.o : %.rc
|
|
|
|
|
# $(WINDRES) $^ -o $@
|
|
|
|
|
endif
|