Blame Makefile.in

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