Blame Makefile.in

37dc93
# Makefile.in: primary common build logic.
37dc93
# this file is covered by COPYING.SOFORT.
37dc93
8b1884
.POSIX:
8b1884
8b1884
.SUFFIXES: .a .c .s .o .lo .ao
8b1884
66a30d
PACKAGE 		= @package@
66a30d
NICKNAME 		= @nickname@
66a30d
PROJECT_DIR 		= @project_dir@
66a30d
SOURCE_DIR 		= @source_dir@
66a30d
GIT_REFERENCE_INDEX	= @git_reference_index@
66a30d
CUSTOM_INSTALL_HEADERS  = @custom_install_headers@
66a30d
AVOID_VERSION		= @avoid_version@
66a30d
66a30d
PKGNAME			= @pkgname@
66a30d
PKGDESC			= @pkgdesc@
66a30d
PKGUSRC			= @pkgusrc@
66a30d
PKGREPO			= @pkgrepo@
66a30d
PKGPSRC			= @pkgpsrc@
66a30d
PKGDURL			= @pkgdurl@
543c16
PKGBUGS			= @pkgbugs@
543c16
PKGHOME			= @pkghome@
66a30d
PKGDEFS			= @pkgdefs@
66a30d
PKGLIBS			= @pkglibs@
66a30d
c037c0
SRCINFO			= @srcinfo@
c037c0
SRCSITE			= @srcsite@
c037c0
c037c0
PGPRKEY			= @pgprkey@
c037c0
PGPSKEY			= @pgpskey@
c037c0
a50a27
RAWBALL			= @rawball@
a50a27
RAWBALL_URL		= @rawball_url@
a50a27
RAWBALL_SHA256		= @rawball_sha256@
a50a27
MODBALL			= @modball@
a50a27
MODBALL_URL		= @modball_url@
a50a27
MODBALL_SHA256		= @modball_sha256@
a50a27
SRCBALL			= @srcball@
a50a27
SRCBALL_URL		= @srcball_url@
a50a27
SRCBALL_SHA256		= @srcball_sha256@
a50a27
867bfd
MAKE                    = @make@
81b037
MAKEMODE                = @makemode@
867bfd
66a30d
BUILD 			= @build@
66a30d
HOST 			= @host@
66a30d
CCHOST 			= @cchost@
f6645d
CFGHOST 		= @cfghost@
66a30d
TARGET 			= @target@
66a30d
ARCH 			= @arch@
66a30d
COMPILER 		= @compiler@
66a30d
TOOLCHAIN		= @toolchain@
66a30d
SYSROOT 		= @sysroot@
66a30d
CROSS_COMPILE 		= @cross_compile@
66a30d
SHELL 			= @shell@
66a30d
5a7101
PREFIX 			= @prefix@
5a7101
EXEC_PREFIX 		= @exec_prefix@
5a7101
BINDIR 			= @bindir@
5a7101
SBINDIR 		= @sbindir@
5a7101
LIBDIR 			= @libdir@
5a7101
INCLUDEDIR 		= @includedir@
5a7101
OLDINCLUDEDIR 		= @oldincludedir@
5a7101
MANDIR 			= @mandir@
5a7101
DOCDIR 			= @docdir@
5a7101
LIBEXECDIR 		= @libexecdir@
5a7101
5a7101
SYSCONFDIR		= @sysconfdir@
5a7101
SHAREDSTATEDIR		= @sharedstatedir@
5a7101
LOCALSTATEDIR		= @localstatedir@
5a7101
RUNSTATEDIR		= @runstatedir@
5a7101
DATAROOTDIR		= @datarootdir@
5a7101
DATADIR			= @datadir@
5a7101
INFODIR			= @infodir@
5a7101
LOCALEDIR		= @localedir@
5a7101
HTMLDIR			= @htmldir@
5a7101
DVIDIR			= @dvidir@
5a7101
PDFDIR			= @pdfdir@
5a7101
PSDIR			= @psdir@
5a7101
7e34aa
CFLAGS_COMMON 		+= @cflags_common@
7e34aa
CFLAGS_DEBUG 		+= @cflags_debug@
7e34aa
CFLAGS_CMDLINE 		+= @cflags_cmdline@
7e34aa
CFLAGS_CONFIG 		+= @cflags_config@
7e34aa
CFLAGS_SYSROOT 		+= @cflags_sysroot@
7e34aa
CFLAGS_OS		+= @cflags_os@
7e34aa
CFLAGS_SITE		+= @cflags_site@
7e34aa
CFLAGS_PATH 		+= @cflags_path@
7e34aa
CFLAGS_STRICT 		+= @cflags_strict@
7e34aa
CFLAGS_UTIL 		+= @cflags_util@
7e34aa
CFLAGS_LAST 		+= @cflags_last@
7e34aa
CFLAGS_ONCE 		+= @cflags_once@
7e34aa
7e34aa
LDFLAGS_COMMON 		+= @ldflags_common@
7e34aa
LDFLAGS_DEBUG 		+= @ldflags_debug@
7e34aa
LDFLAGS_CMDLINE 	+= @ldflags_cmdline@
7e34aa
LDFLAGS_CONFIG 		+= @ldflags_config@
7e34aa
LDFLAGS_SYSROOT 	+= @ldflags_sysroot@
7e34aa
LDFLAGS_PATH 		+= @ldflags_path@
7e34aa
LDFLAGS_STRICT 		+= @ldflags_strict@
7e34aa
LDFLAGS_UTIL 		+= @ldflags_util@
7e34aa
LDFLAGS_LAST 		+= @ldflags_last@
7e34aa
LDFLAGS_ONCE 		+= @ldflags_once@
66a30d
5a7101
USER_CC                 = @user_cc@
5a7101
USER_CPP                = @user_cpp@
5a7101
USER_CXX                = @user_cxx@
5a7101
7e34aa
NATIVE_HOST		= @native_host@
7e34aa
NATIVE_CFGHOST		= @native_cfghost@
7e34aa
NATIVE_CFLAGS		= @native_cflags@
7e34aa
NATIVE_LDFLAGS		= @native_ldflags@
66a30d
66a30d
ALL_SHARED              = @all_shared@
66a30d
ALL_STATIC              = @all_static@
66a30d
DISABLE_FRONTEND	= @disable_frontend@
66a30d
DISABLE_SHARED          = @disable_shared@
66a30d
DISABLE_STATIC          = @disable_static@
66a30d
ebbba6
USE_CUSTOM_CFGDEFS      = @use_custom_cfgdefs@
ebbba6
USE_CUSTOM_USRDEFS      = @use_custom_usrdefs@
ebbba6
e13b1a
SHARED_LIB_CMD          = @shared_lib_cmd@
e13b1a
SHARED_LIB_LDFLAGS      = @shared_lib_ldflags@
e13b1a
f228da
VERSION_OPT             = @version_opt@
f228da
641793
SHARED_LIBRARY_OPT      = @shared_library_opt@
641793
STATIC_LIBRARY_OPT      = @static_library_opt@
641793
641793
APP_FRONTEND_OPT        = @app_frontend_opt@
641793
APP_LINKING_OPT         = @app_linking_opt@
641793
641793
INSTALL_HEADERS_OPT     = @install_headers_opt@
641793
2caddf
66a30d
all:
66a30d
install:
66a30d
shared:
66a30d
static:
66a30d
66a30d
install-extras:
66a30d
install-app-extras:
66a30d
8b1884
.cflags-host:
8b1884
	@printf '%s' "$(CFLAGS)"
8b1884
8b1884
.cflags-native:
8b1884
	@printf '%s' "$(NATIVE_CFLAGS)"
8b1884
8b1884
7e34aa
include ./ccenv/host.mk
7e34aa
include ./ccenv/native.mk
66a30d
315b9f
include ./cfgdefs.mk
315b9f
include ./usrdefs.mk
66a30d
cd2145
include $(PROJECT_DIR)/sofort/core/defs.mk
cd2145
include $(PROJECT_DIR)/sofort/core/pkgconf.mk
cd2145
include $(PROJECT_DIR)/sofort/core/version.mk
cd2145
include $(PROJECT_DIR)/sofort/core/flavor.mk
8b1884
include $(PROJECT_DIR)/sofort/core/infer.mk
66a30d
315b9f
include $(PROJECT_DIR)/project/osforce.mk
66a30d
include $(PROJECT_DIR)/project/tree.mk
66a30d
include $(PROJECT_DIR)/project/depends.mk
66a30d
include $(PROJECT_DIR)/project/headers.mk
66a30d
include $(PROJECT_DIR)/project/common.mk
66a30d
include $(PROJECT_DIR)/project/arch.mk
66a30d
include $(PROJECT_DIR)/project/extras.mk
66a30d
include $(PROJECT_DIR)/project/overrides.mk
66a30d
66a30d
66a30d
all:		package-shared package-static app
66a30d
66a30d
install:	package-install-app
66a30d
install:	package-install-extras
66a30d
install:	install-libs
66a30d
66a30d
app:		app-tag
66a30d
66a30d
app.tag:
66a30d
		cp $(PACKAGE_APP) $(APP)
66a30d
		touch app.tag
66a30d
66a30d
install-libs:	package-install-shared
66a30d
install-libs:	package-install-static
66a30d
66a30d
install-headers-default:
66a30d
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
66a30d
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
66a30d
66a30d
install-shared:	shared install-lib install-implib
66a30d
install-shared: package-install-soname package-install-solink
66a30d
install-shared: install-headers
66a30d
66a30d
install-lib:	shared
66a30d
		mkdir -p $(DESTDIR)$(LIBDIR)
66a30d
		cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)
66a30d
66a30d
install-static:	static install-headers
66a30d
		mkdir -p $(DESTDIR)$(LIBDIR)
66a30d
		cp $(STATIC_LIB) $(DESTDIR)$(LIBDIR)
66a30d
66a30d
install-app:	app install-app-extras
66a30d
		mkdir -p $(DESTDIR)$(BINDIR)
66a30d
		cp $(APP) $(DESTDIR)$(BINDIR)
66a30d
66a30d
install-static-app:	static-app install-app-extras
66a30d
			mkdir -p $(DESTDIR)$(BINDIR)
66a30d
			cp $(STATIC_APP) $(DESTDIR)$(BINDIR)/$(NICKNAME)$(OS_APP_SUFFIX)
66a30d
66a30d
66a30d
66a30d
shared:		shared-lib implib
66a30d
shared:		package-shared-soname package-shared-solink
66a30d
66a30d
static:		static-lib
66a30d
66a30d
shared-lib:	shared-objs $(SHARED_LIB)
66a30d
66a30d
shared-soname:	shared-lib $(SHARED_SONAME)
66a30d
66a30d
shared-solink:	shared-lib $(SHARED_SOLINK)
66a30d
66a30d
static-lib:	static-objs $(STATIC_LIB)
66a30d
66a30d
66a30d
66a30d
default-app:	version.tag static-objs $(DEFAULT_APP)
66a30d
66a30d
shared-app:	version.tag shared $(SHARED_APP)
66a30d
66a30d
static-app:	version.tag static-objs $(STATIC_APP)
66a30d
66a30d
66a30d
66a30d
shared-objs:	dirs $(SHARED_OBJS)
66a30d
66a30d
static-objs:	dirs $(STATIC_OBJS)
66a30d
66a30d
app-objs:	dirs $(APP_OBJS)
66a30d
66a30d
66a30d
35982c
$(APP_SRCS):	srcs.tag
35982c
35982c
$(COMMON_SRCS):	srcs.tag
35982c
8b1884
$(APP_OBJS):	$(ALL_HEADERS) host.tag tree.tag
8b1884
8b1884
$(SHARED_OBJS):	$(ALL_HEADERS) host.tag tree.tag
8b1884
8b1884
$(STATIC_OBJS):	$(ALL_HEADERS) host.tag tree.tag
8b1884
8b1884
66a30d
$(SHARED_LIB):	$(SHARED_OBJS)
66a30d
66a30d
$(STATIC_LIB):	$(STATIC_OBJS)
66a30d
66a30d
$(APP):		$(PACKAGE_APP)
66a30d
66a30d
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
66a30d
		rm -f app.tag
8b1884
		$(CC) -o $@ $(STATIC_OBJS) $(APP_OBJS) $(LDFLAGS_APP)
66a30d
e0f399
$(SHARED_APP):	$(DSO_REF_SOLINK) $(APP_OBJS) $(SHARED_SOLINK)
66a30d
		rm -f app.tag
3e81d3
		$(CC) -o $@ $(APP_OBJS) $(LDFLAGS_APP) -l$(PACKAGE)
66a30d
66a30d
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
66a30d
		rm -f app.tag
8b1884
		$(CC) -static -o $@ $(STATIC_OBJS) $(APP_OBJS) $(LDFLAGS_STATIC)
66a30d
66a30d
66a30d
dirs: 		dirs.tag
66a30d
66a30d
dirs.tag:
84afa9
		mkdir -p build
66a30d
		mkdir -p bin
66a30d
		mkdir -p lib
66a30d
		touch dirs.tag
66a30d
66a30d
host.tag:	Makefile
127aed
		$(CC) $(CFLAGS) -dumpmachine > host.tmp
127aed
		mv host.tmp host.tag
3437fd
84afa9
version.tag:	$(GIT_REFERENCE_INDEX) dirs.tag
cd2145
		$(PROJECT_DIR)/sofort/tools/version.sh	\
66a30d
			-s $(SOURCE_DIR)		\
66a30d
			-o build/$(PACKAGE)_version.h	\
66a30d
			-p $(PACKAGE)
66a30d
		touch version.tag
66a30d
66a30d
distclean:	clean
3c07c8
		rm -f ccenv/host.mk
3c07c8
		rm -f ccenv/native.mk
9ccb6e
		rm -f cfgdefs.mk
9ccb6e
		rm -f usrdefs.mk
15a870
		rm -f config.log
66a30d
		rm -f Makefile
d8f1c3
		rmdir build ccenv bin lib 2>&1 || true
66a30d
66a30d
clean:		clean-implib
66a30d
		rm -f tree.tag
35982c
		rm -f srcs.tag
66a30d
		rm -f dirs.tag
66a30d
		rm -f host.tag
127aed
		rm -f host.tmp
66a30d
		rm -f version.tag
66a30d
		rm -f app.tag
66a30d
		rm -f $(SHARED_OBJS)
66a30d
		rm -f $(STATIC_OBJS)
66a30d
		rm -f $(APP_OBJS)
66a30d
		rm -f $(SHARED_LIB)
66a30d
		rm -f $(SHARED_SONAME)
66a30d
		rm -f $(SHARED_SOLINK)
66a30d
		rm -f $(STATIC_LIB)
66a30d
		rm -f $(APP)
66a30d
		rm -f $(DEFAULT_APP)
66a30d
		rm -f $(SHARED_APP)
66a30d
		rm -f $(STATIC_APP)
8ad316
		rm -f build/$(PACKAGE)_version.h
8ad316
		rm -f build/$(PACKAGE).pc
66a30d
66a30d
127aed
.PHONY:		package-app \
66a30d
		all install shared static app \
66a30d
		shared-objs shared-lib \
66a30d
		shared-soname shared-solink \
66a30d
		package-shared-soname package-shared-solink \
66a30d
		static-objs static-lib \
66a30d
		default-app shared-app static-app \
66a30d
		install-shared install-static \
66a30d
		install-soname install-solink \
66a30d
		package-install-soname package-install-solink \
66a30d
		install-headers install-app \
66a30d
		install-headers-default install-headers-custom \
66a30d
		clean distclean clean-implib version \
66a30d
		.display .conf \
66a30d
		.display-project .display-env .display-tools .display-flags \
0e3468
		.display-pe .display-dirs .display-build \
66a30d
		implib implib-ver implib-soname implib-solink \
66a30d
		install-implib install-implib-ver \
66a30d
		install-implib-soname install-implib-solink