Blame Makefile.in

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