Blame Makefile.in

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