Blame Makefile.in

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