Blame Makefile.in

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