Blame Makefile.in

7a3ffb
# Makefile.in: primary common build logic.
7a3ffb
# this file is covered by COPYING.SOFORT.
7a3ffb
a79798
.POSIX:
a79798
a79798
.SUFFIXES: .a .c .s .o .lo .ao
a79798
0efa8c
PACKAGE 		= @package@
0efa8c
NICKNAME 		= @nickname@
0efa8c
PROJECT_DIR 		= @project_dir@
a88b38
SOURCE_DIR 		= @source_dir@
0efa8c
GIT_REFERENCE_INDEX	= @git_reference_index@
0efa8c
CUSTOM_INSTALL_HEADERS  = @custom_install_headers@
0efa8c
AVOID_VERSION		= @avoid_version@
0efa8c
2725e3
PKGNAME			= @pkgname@
2725e3
PKGDESC			= @pkgdesc@
2725e3
PKGUSRC			= @pkgusrc@
2725e3
PKGREPO			= @pkgrepo@
2725e3
PKGPSRC			= @pkgpsrc@
2725e3
PKGDURL			= @pkgdurl@
fd5ac4
PKGBUGS			= @pkgbugs@
fd5ac4
PKGHOME			= @pkghome@
2725e3
PKGDEFS			= @pkgdefs@
2725e3
PKGLIBS			= @pkglibs@
2725e3
5a3acb
SRCINFO			= @srcinfo@
5a3acb
SRCSITE			= @srcsite@
5a3acb
5a3acb
PGPRKEY			= @pgprkey@
5a3acb
PGPSKEY			= @pgpskey@
5a3acb
63b845
RAWBALL			= @rawball@
63b845
RAWBALL_URL		= @rawball_url@
63b845
RAWBALL_SHA256		= @rawball_sha256@
63b845
MODBALL			= @modball@
63b845
MODBALL_URL		= @modball_url@
63b845
MODBALL_SHA256		= @modball_sha256@
63b845
SRCBALL			= @srcball@
63b845
SRCBALL_URL		= @srcball_url@
63b845
SRCBALL_SHA256		= @srcball_sha256@
63b845
6b3104
MAKE                    = @make@
6886a7
MAKEMODE                = @makemode@
6b3104
0efa8c
BUILD 			= @build@
0efa8c
HOST 			= @host@
980929
CCHOST 			= @cchost@
9bb8c7
CFGHOST 		= @cfghost@
0efa8c
TARGET 			= @target@
0efa8c
ARCH 			= @arch@
0efa8c
COMPILER 		= @compiler@
0efa8c
TOOLCHAIN		= @toolchain@
0efa8c
SYSROOT 		= @sysroot@
0efa8c
CROSS_COMPILE 		= @cross_compile@
0efa8c
SHELL 			= @shell@
0efa8c
daab11
PREFIX 			= @prefix@
daab11
EXEC_PREFIX 		= @exec_prefix@
daab11
BINDIR 			= @bindir@
daab11
SBINDIR 		= @sbindir@
daab11
LIBDIR 			= @libdir@
daab11
INCLUDEDIR 		= @includedir@
daab11
OLDINCLUDEDIR 		= @oldincludedir@
daab11
MANDIR 			= @mandir@
daab11
DOCDIR 			= @docdir@
daab11
LIBEXECDIR 		= @libexecdir@
daab11
daab11
SYSCONFDIR		= @sysconfdir@
daab11
SHAREDSTATEDIR		= @sharedstatedir@
daab11
LOCALSTATEDIR		= @localstatedir@
daab11
RUNSTATEDIR		= @runstatedir@
daab11
DATAROOTDIR		= @datarootdir@
daab11
DATADIR			= @datadir@
daab11
INFODIR			= @infodir@
daab11
LOCALEDIR		= @localedir@
daab11
HTMLDIR			= @htmldir@
daab11
DVIDIR			= @dvidir@
daab11
PDFDIR			= @pdfdir@
daab11
PSDIR			= @psdir@
daab11
ac2c20
CFLAGS_COMMON 		+= @cflags_common@
ac2c20
CFLAGS_DEBUG 		+= @cflags_debug@
ac2c20
CFLAGS_CMDLINE 		+= @cflags_cmdline@
ac2c20
CFLAGS_CONFIG 		+= @cflags_config@
ac2c20
CFLAGS_SYSROOT 		+= @cflags_sysroot@
ac2c20
CFLAGS_OS		+= @cflags_os@
ac2c20
CFLAGS_SITE		+= @cflags_site@
ac2c20
CFLAGS_PATH 		+= @cflags_path@
ac2c20
CFLAGS_STRICT 		+= @cflags_strict@
ac2c20
CFLAGS_UTIL 		+= @cflags_util@
ac2c20
CFLAGS_LAST 		+= @cflags_last@
ac2c20
CFLAGS_ONCE 		+= @cflags_once@
ac2c20
ac2c20
LDFLAGS_COMMON 		+= @ldflags_common@
ac2c20
LDFLAGS_DEBUG 		+= @ldflags_debug@
ac2c20
LDFLAGS_CMDLINE 	+= @ldflags_cmdline@
ac2c20
LDFLAGS_CONFIG 		+= @ldflags_config@
ac2c20
LDFLAGS_SYSROOT 	+= @ldflags_sysroot@
ac2c20
LDFLAGS_PATH 		+= @ldflags_path@
ac2c20
LDFLAGS_STRICT 		+= @ldflags_strict@
ac2c20
LDFLAGS_UTIL 		+= @ldflags_util@
ac2c20
LDFLAGS_LAST 		+= @ldflags_last@
ac2c20
LDFLAGS_ONCE 		+= @ldflags_once@
0efa8c
daab11
USER_CC                 = @user_cc@
daab11
USER_CPP                = @user_cpp@
daab11
USER_CXX                = @user_cxx@
daab11
ac2c20
NATIVE_HOST		= @native_host@
ac2c20
NATIVE_CFGHOST		= @native_cfghost@
ac2c20
NATIVE_CFLAGS		= @native_cflags@
ac2c20
NATIVE_LDFLAGS		= @native_ldflags@
0efa8c
0efa8c
ALL_SHARED              = @all_shared@
0efa8c
ALL_STATIC              = @all_static@
0efa8c
DISABLE_FRONTEND	= @disable_frontend@
0efa8c
DISABLE_SHARED          = @disable_shared@
0efa8c
DISABLE_STATIC          = @disable_static@
0efa8c
5c5f8e
USE_CUSTOM_CFGDEFS      = @use_custom_cfgdefs@
5c5f8e
USE_CUSTOM_USRDEFS      = @use_custom_usrdefs@
5c5f8e
819e8d
SHARED_LIB_CMD          = @shared_lib_cmd@
819e8d
SHARED_LIB_LDFLAGS      = @shared_lib_ldflags@
819e8d
c8826f
VERSION_OPT             = @version_opt@
c8826f
f5c577
SHARED_LIBRARY_OPT      = @shared_library_opt@
f5c577
STATIC_LIBRARY_OPT      = @static_library_opt@
f5c577
f5c577
APP_FRONTEND_OPT        = @app_frontend_opt@
f5c577
APP_LINKING_OPT         = @app_linking_opt@
f5c577
f5c577
INSTALL_HEADERS_OPT     = @install_headers_opt@
f5c577
06c74f
0efa8c
all:
0efa8c
install:
0efa8c
shared:
0efa8c
static:
0efa8c
0efa8c
install-extras:
0efa8c
install-app-extras:
0efa8c
a79798
.cflags-host:
372312
	@true : $(CFLAGS)
a79798
a79798
.cflags-native:
372312
	@true : $(NATIVE_CFLAGS)
a79798
a79798
ac2c20
include ./ccenv/host.mk
ac2c20
include ./ccenv/native.mk
0efa8c
eb814a
include ./cfgdefs.mk
eb814a
include ./usrdefs.mk
0efa8c
4b0eaf
include $(PROJECT_DIR)/sofort/core/defs.mk
4b0eaf
include $(PROJECT_DIR)/sofort/core/pkgconf.mk
4b0eaf
include $(PROJECT_DIR)/sofort/core/version.mk
4b0eaf
include $(PROJECT_DIR)/sofort/core/flavor.mk
a79798
include $(PROJECT_DIR)/sofort/core/infer.mk
0efa8c
eb814a
include $(PROJECT_DIR)/project/osforce.mk
0efa8c
include $(PROJECT_DIR)/project/tree.mk
0efa8c
include $(PROJECT_DIR)/project/depends.mk
0efa8c
include $(PROJECT_DIR)/project/headers.mk
0efa8c
include $(PROJECT_DIR)/project/common.mk
0efa8c
include $(PROJECT_DIR)/project/arch.mk
0efa8c
include $(PROJECT_DIR)/project/extras.mk
0efa8c
include $(PROJECT_DIR)/project/overrides.mk
0efa8c
0efa8c
0efa8c
all:		package-shared package-static app
0efa8c
0efa8c
install:	package-install-app
0efa8c
install:	package-install-extras
0efa8c
install:	install-libs
0efa8c
0efa8c
app:		app-tag
0efa8c
0efa8c
app.tag:
0efa8c
		cp $(PACKAGE_APP) $(APP)
0efa8c
		touch app.tag
0efa8c
0efa8c
install-libs:	package-install-shared
0efa8c
install-libs:	package-install-static
0efa8c
0efa8c
install-headers-default:
0efa8c
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
0efa8c
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
0efa8c
0efa8c
install-shared:	shared install-lib install-implib
0efa8c
install-shared: package-install-soname package-install-solink
0efa8c
install-shared: install-headers
0efa8c
0efa8c
install-lib:	shared
0efa8c
		mkdir -p $(DESTDIR)$(LIBDIR)
0efa8c
		cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)
0efa8c
0efa8c
install-static:	static install-headers
0efa8c
		mkdir -p $(DESTDIR)$(LIBDIR)
0efa8c
		cp $(STATIC_LIB) $(DESTDIR)$(LIBDIR)
0efa8c
0efa8c
install-app:	app install-app-extras
0efa8c
		mkdir -p $(DESTDIR)$(BINDIR)
0efa8c
		cp $(APP) $(DESTDIR)$(BINDIR)
0efa8c
0efa8c
install-static-app:	static-app install-app-extras
0efa8c
			mkdir -p $(DESTDIR)$(BINDIR)
0efa8c
			cp $(STATIC_APP) $(DESTDIR)$(BINDIR)/$(NICKNAME)$(OS_APP_SUFFIX)
0efa8c
0efa8c
0efa8c
0efa8c
shared:		shared-lib implib
0efa8c
shared:		package-shared-soname package-shared-solink
0efa8c
0efa8c
static:		static-lib
0efa8c
0efa8c
shared-lib:	shared-objs $(SHARED_LIB)
0efa8c
0efa8c
shared-soname:	shared-lib $(SHARED_SONAME)
0efa8c
0efa8c
shared-solink:	shared-lib $(SHARED_SOLINK)
0efa8c
0efa8c
static-lib:	static-objs $(STATIC_LIB)
0efa8c
0efa8c
0efa8c
0efa8c
default-app:	version.tag static-objs $(DEFAULT_APP)
0efa8c
0efa8c
shared-app:	version.tag shared $(SHARED_APP)
0efa8c
0efa8c
static-app:	version.tag static-objs $(STATIC_APP)
0efa8c
0efa8c
0efa8c
0efa8c
shared-objs:	dirs $(SHARED_OBJS)
0efa8c
0efa8c
static-objs:	dirs $(STATIC_OBJS)
0efa8c
0efa8c
app-objs:	dirs $(APP_OBJS)
0efa8c
0efa8c
0efa8c
4f9a5d
$(APP_SRCS):	srcs.tag
4f9a5d
4f9a5d
$(COMMON_SRCS):	srcs.tag
4f9a5d
a79798
$(APP_OBJS):	$(ALL_HEADERS) host.tag tree.tag
a79798
a79798
$(SHARED_OBJS):	$(ALL_HEADERS) host.tag tree.tag
a79798
a79798
$(STATIC_OBJS):	$(ALL_HEADERS) host.tag tree.tag
a79798
a79798
0efa8c
$(SHARED_LIB):	$(SHARED_OBJS)
0efa8c
0efa8c
$(STATIC_LIB):	$(STATIC_OBJS)
0efa8c
0efa8c
$(APP):		$(PACKAGE_APP)
0efa8c
0efa8c
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
0efa8c
		rm -f app.tag
a79798
		$(CC) -o $@ $(STATIC_OBJS) $(APP_OBJS) $(LDFLAGS_APP)
0efa8c
12164d
$(SHARED_APP):	$(DSO_REF_SOLINK) $(APP_OBJS) $(SHARED_SOLINK)
0efa8c
		rm -f app.tag
2e2412
		$(CC) -o $@ $(APP_OBJS) $(LDFLAGS_APP) -l$(PACKAGE)
0efa8c
0efa8c
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
0efa8c
		rm -f app.tag
a79798
		$(CC) -static -o $@ $(STATIC_OBJS) $(APP_OBJS) $(LDFLAGS_STATIC)
0efa8c
0efa8c
0efa8c
dirs: 		dirs.tag
0efa8c
0efa8c
dirs.tag:
1e3213
		mkdir -p build
0efa8c
		mkdir -p bin
0efa8c
		mkdir -p lib
0efa8c
		touch dirs.tag
0efa8c
264391
host.tag:	@makefile@
c61b12
		rm -f host.tmp
c61b12
		touch host.tmp
4a690a
		mv host.tmp host.tag
545746
1e3213
version.tag:	$(GIT_REFERENCE_INDEX) dirs.tag
4b0eaf
		$(PROJECT_DIR)/sofort/tools/version.sh	\
a88b38
			-s $(SOURCE_DIR)		\
0efa8c
			-o build/$(PACKAGE)_version.h	\
0efa8c
			-p $(PACKAGE)
0efa8c
		touch version.tag
0efa8c
0efa8c
distclean:	clean
bc1b6b
		rm -f ccenv/host.mk
bc1b6b
		rm -f ccenv/native.mk
45ff96
		rm -f cfgdefs.mk
45ff96
		rm -f usrdefs.mk
9d19fd
		rm -f config.log
264391
		rm -f @makefile@
6469c1
		rmdir build ccenv bin lib 2>&1 || true
0efa8c
0efa8c
clean:		clean-implib
0efa8c
		rm -f tree.tag
4f9a5d
		rm -f srcs.tag
0efa8c
		rm -f dirs.tag
0efa8c
		rm -f host.tag
4a690a
		rm -f host.tmp
0efa8c
		rm -f version.tag
0efa8c
		rm -f app.tag
0efa8c
		rm -f $(SHARED_OBJS)
0efa8c
		rm -f $(STATIC_OBJS)
0efa8c
		rm -f $(APP_OBJS)
0efa8c
		rm -f $(SHARED_LIB)
0efa8c
		rm -f $(SHARED_SONAME)
0efa8c
		rm -f $(SHARED_SOLINK)
0efa8c
		rm -f $(STATIC_LIB)
0efa8c
		rm -f $(APP)
0efa8c
		rm -f $(DEFAULT_APP)
0efa8c
		rm -f $(SHARED_APP)
0efa8c
		rm -f $(STATIC_APP)
0e616f
		rm -f build/$(PACKAGE)_version.h
0e616f
		rm -f build/$(PACKAGE).pc
0efa8c
0efa8c
4a690a
.PHONY:		package-app \
980929
		all install shared static app \
0efa8c
		shared-objs shared-lib \
0efa8c
		shared-soname shared-solink \
0efa8c
		package-shared-soname package-shared-solink \
0efa8c
		static-objs static-lib \
0efa8c
		default-app shared-app static-app \
0efa8c
		install-shared install-static \
0efa8c
		install-soname install-solink \
0efa8c
		package-install-soname package-install-solink \
0efa8c
		install-headers install-app \
0efa8c
		install-headers-default install-headers-custom \
0efa8c
		clean distclean clean-implib version \
0efa8c
		.display .conf \
0efa8c
		.display-project .display-env .display-tools .display-flags \
c25f5f
		.display-pe .display-dirs .display-build \
0efa8c
		implib implib-ver implib-soname implib-solink \
0efa8c
		install-implib install-implib-ver \
0efa8c
		install-implib-soname install-implib-solink