Blame Makefile.in

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