Blame Makefile.in

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