Blame Makefile.in

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