Blame Makefile.in

7d79b0
# Makefile.in: primary common build logic.
7d79b0
# this file is covered by COPYING.SOFORT.
7d79b0
2f936c
.POSIX:
2f936c
2f936c
.SUFFIXES: .a .c .s .o .lo .ao
2f936c
f46039
PACKAGE 		= @package@
78fd02
NICKNAME 		= @nickname@
f46039
PROJECT_DIR 		= @project_dir@
11deae
SOURCE_DIR 		= @source_dir@
269f6f
GIT_REFERENCE_INDEX	= @git_reference_index@
8dc59e
CUSTOM_INSTALL_HEADERS  = @custom_install_headers@
832c05
AVOID_VERSION		= @avoid_version@
f46039
32da4e
PKGNAME			= @pkgname@
32da4e
PKGDESC			= @pkgdesc@
32da4e
PKGUSRC			= @pkgusrc@
32da4e
PKGREPO			= @pkgrepo@
32da4e
PKGPSRC			= @pkgpsrc@
32da4e
PKGDURL			= @pkgdurl@
f8f71a
PKGBUGS			= @pkgbugs@
f8f71a
PKGHOME			= @pkghome@
32da4e
PKGDEFS			= @pkgdefs@
32da4e
PKGLIBS			= @pkglibs@
32da4e
e7cc05
SRCINFO			= @srcinfo@
e7cc05
SRCSITE			= @srcsite@
e7cc05
e7cc05
PGPRKEY			= @pgprkey@
e7cc05
PGPSKEY			= @pgpskey@
e7cc05
b86201
RAWBALL			= @rawball@
b86201
RAWBALL_URL		= @rawball_url@
b86201
RAWBALL_SHA256		= @rawball_sha256@
b86201
MODBALL			= @modball@
b86201
MODBALL_URL		= @modball_url@
b86201
MODBALL_SHA256		= @modball_sha256@
b86201
SRCBALL			= @srcball@
b86201
SRCBALL_URL		= @srcball_url@
b86201
SRCBALL_SHA256		= @srcball_sha256@
b86201
987c97
MAKE                    = @make@
a2c383
MAKEMODE                = @makemode@
987c97
f46039
BUILD 			= @build@
f46039
HOST 			= @host@
c2225d
CCHOST 			= @cchost@
95d491
CFGHOST 		= @cfghost@
f46039
TARGET 			= @target@
f46039
ARCH 			= @arch@
e83fbe
COMPILER 		= @compiler@
46d732
TOOLCHAIN		= @toolchain@
f46039
SYSROOT 		= @sysroot@
f46039
CROSS_COMPILE 		= @cross_compile@
f46039
SHELL 			= @shell@
f46039
cbf7df
PREFIX 			= @prefix@
cbf7df
EXEC_PREFIX 		= @exec_prefix@
cbf7df
BINDIR 			= @bindir@
cbf7df
SBINDIR 		= @sbindir@
cbf7df
LIBDIR 			= @libdir@
cbf7df
INCLUDEDIR 		= @includedir@
cbf7df
OLDINCLUDEDIR 		= @oldincludedir@
cbf7df
MANDIR 			= @mandir@
cbf7df
DOCDIR 			= @docdir@
cbf7df
LIBEXECDIR 		= @libexecdir@
cbf7df
cbf7df
SYSCONFDIR		= @sysconfdir@
cbf7df
SHAREDSTATEDIR		= @sharedstatedir@
cbf7df
LOCALSTATEDIR		= @localstatedir@
cbf7df
RUNSTATEDIR		= @runstatedir@
cbf7df
DATAROOTDIR		= @datarootdir@
cbf7df
DATADIR			= @datadir@
cbf7df
INFODIR			= @infodir@
cbf7df
LOCALEDIR		= @localedir@
cbf7df
HTMLDIR			= @htmldir@
cbf7df
DVIDIR			= @dvidir@
cbf7df
PDFDIR			= @pdfdir@
cbf7df
PSDIR			= @psdir@
cbf7df
af99a0
CFLAGS_COMMON 		+= @cflags_common@
af99a0
CFLAGS_DEBUG 		+= @cflags_debug@
af99a0
CFLAGS_CMDLINE 		+= @cflags_cmdline@
af99a0
CFLAGS_CONFIG 		+= @cflags_config@
af99a0
CFLAGS_SYSROOT 		+= @cflags_sysroot@
af99a0
CFLAGS_OS		+= @cflags_os@
af99a0
CFLAGS_SITE		+= @cflags_site@
af99a0
CFLAGS_PATH 		+= @cflags_path@
af99a0
CFLAGS_STRICT 		+= @cflags_strict@
af99a0
CFLAGS_UTIL 		+= @cflags_util@
af99a0
CFLAGS_LAST 		+= @cflags_last@
af99a0
CFLAGS_ONCE 		+= @cflags_once@
af99a0
af99a0
LDFLAGS_COMMON 		+= @ldflags_common@
af99a0
LDFLAGS_DEBUG 		+= @ldflags_debug@
af99a0
LDFLAGS_CMDLINE 	+= @ldflags_cmdline@
af99a0
LDFLAGS_CONFIG 		+= @ldflags_config@
af99a0
LDFLAGS_SYSROOT 	+= @ldflags_sysroot@
af99a0
LDFLAGS_PATH 		+= @ldflags_path@
af99a0
LDFLAGS_STRICT 		+= @ldflags_strict@
af99a0
LDFLAGS_UTIL 		+= @ldflags_util@
af99a0
LDFLAGS_LAST 		+= @ldflags_last@
af99a0
LDFLAGS_ONCE 		+= @ldflags_once@
f46039
cbf7df
USER_CC                 = @user_cc@
cbf7df
USER_CPP                = @user_cpp@
cbf7df
USER_CXX                = @user_cxx@
cbf7df
af99a0
NATIVE_HOST		= @native_host@
af99a0
NATIVE_CFGHOST		= @native_cfghost@
af99a0
NATIVE_CFLAGS		= @native_cflags@
af99a0
NATIVE_LDFLAGS		= @native_ldflags@
f46039
a8ab0d
ALL_SHARED              = @all_shared@
a8ab0d
ALL_STATIC              = @all_static@
54c1e4
DISABLE_FRONTEND	= @disable_frontend@
a8ab0d
DISABLE_SHARED          = @disable_shared@
a8ab0d
DISABLE_STATIC          = @disable_static@
f46039
3d5a30
USE_CUSTOM_CFGDEFS      = @use_custom_cfgdefs@
3d5a30
USE_CUSTOM_USRDEFS      = @use_custom_usrdefs@
3d5a30
7485d4
SHARED_LIB_CMD          = @shared_lib_cmd@
7485d4
SHARED_LIB_LDFLAGS      = @shared_lib_ldflags@
7485d4
48fbee
VERSION_OPT             = @version_opt@
48fbee
aa7113
SHARED_LIBRARY_OPT      = @shared_library_opt@
aa7113
STATIC_LIBRARY_OPT      = @static_library_opt@
aa7113
aa7113
APP_FRONTEND_OPT        = @app_frontend_opt@
aa7113
APP_LINKING_OPT         = @app_linking_opt@
aa7113
aa7113
INSTALL_HEADERS_OPT     = @install_headers_opt@
aa7113
f74bc7
f46039
all:
f46039
install:
f46039
shared:
f46039
static:
f46039
bdd4bb
install-extras:
bdd4bb
install-app-extras:
f46039
2f936c
.cflags-host:
9a789c
	@true : $(CFLAGS)
2f936c
2f936c
.cflags-native:
9a789c
	@true : $(NATIVE_CFLAGS)
2f936c
072a7e
.ldflags-host:
373957
	@true : $(LDFLAGS_APP)
072a7e
072a7e
.ldflags-native:
072a7e
	@true : $(NATIVE_LDFLAGS)
072a7e
2f936c
af99a0
include ./ccenv/host.mk
af99a0
include ./ccenv/native.mk
f46039
601fbe
include ./cfgdefs.mk
601fbe
include ./usrdefs.mk
8e6b56
77324f
include $(PROJECT_DIR)/sofort/core/defs.mk
77324f
include $(PROJECT_DIR)/sofort/core/pkgconf.mk
77324f
include $(PROJECT_DIR)/sofort/core/version.mk
77324f
include $(PROJECT_DIR)/sofort/core/flavor.mk
2f936c
include $(PROJECT_DIR)/sofort/core/infer.mk
b2d0f4
601fbe
include $(PROJECT_DIR)/project/osforce.mk
f46039
include $(PROJECT_DIR)/project/tree.mk
f46039
include $(PROJECT_DIR)/project/depends.mk
f46039
include $(PROJECT_DIR)/project/headers.mk
f46039
include $(PROJECT_DIR)/project/common.mk
f46039
include $(PROJECT_DIR)/project/arch.mk
f46039
include $(PROJECT_DIR)/project/extras.mk
f46039
include $(PROJECT_DIR)/project/overrides.mk
f46039
f46039
a8ab0d
all:		package-shared package-static app
f46039
54c1e4
install:	package-install-app
54c1e4
install:	package-install-extras
a8ab0d
install:	install-libs
f46039
54c1e4
app:		app-tag
c26f15
5d8ea8
app.tag:
c26f15
		cp $(PACKAGE_APP) $(APP)
c26f15
		touch app.tag
f46039
a8ab0d
install-libs:	package-install-shared
a8ab0d
install-libs:	package-install-static
f46039
8dc59e
install-headers-default:
d4de33
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
d4de33
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
f46039
832c05
install-shared:	shared install-lib install-implib
832c05
install-shared: package-install-soname package-install-solink
1bf01c
install-shared: install-headers
225022
225022
install-lib:	shared
d4de33
		mkdir -p $(DESTDIR)$(LIBDIR)
d4de33
		cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)
f46039
1bf01c
install-static:	static install-headers
d4de33
		mkdir -p $(DESTDIR)$(LIBDIR)
d4de33
		cp $(STATIC_LIB) $(DESTDIR)$(LIBDIR)
f46039
bdd4bb
install-app:	app install-app-extras
d4de33
		mkdir -p $(DESTDIR)$(BINDIR)
d4de33
		cp $(APP) $(DESTDIR)$(BINDIR)
f46039
34b9c7
install-static-app:	static-app install-app-extras
34b9c7
			mkdir -p $(DESTDIR)$(BINDIR)
34b9c7
			cp $(STATIC_APP) $(DESTDIR)$(BINDIR)/$(NICKNAME)$(OS_APP_SUFFIX)
34b9c7
f46039
f46039
832c05
shared:		shared-lib implib
832c05
shared:		package-shared-soname package-shared-solink
f46039
f46039
static:		static-lib
f46039
f46039
shared-lib:	shared-objs $(SHARED_LIB)
f46039
225022
shared-soname:	shared-lib $(SHARED_SONAME)
225022
225022
shared-solink:	shared-lib $(SHARED_SOLINK)
225022
f46039
static-lib:	static-objs $(STATIC_LIB)
f46039
f46039
f46039
c26f15
default-app:	version.tag static-objs $(DEFAULT_APP)
f46039
f46039
shared-app:	version.tag shared $(SHARED_APP)
f46039
c26f15
static-app:	version.tag static-objs $(STATIC_APP)
f46039
f46039
f46039
f46039
shared-objs:	dirs $(SHARED_OBJS)
f46039
f46039
static-objs:	dirs $(STATIC_OBJS)
f46039
f46039
app-objs:	dirs $(APP_OBJS)
f46039
f46039
f46039
1b36ec
$(APP_SRCS):	srcs.tag
1b36ec
1b36ec
$(COMMON_SRCS):	srcs.tag
1b36ec
2f936c
$(APP_OBJS):	$(ALL_HEADERS) host.tag tree.tag
2f936c
2f936c
$(SHARED_OBJS):	$(ALL_HEADERS) host.tag tree.tag
2f936c
2f936c
$(STATIC_OBJS):	$(ALL_HEADERS) host.tag tree.tag
2f936c
2f936c
f46039
$(SHARED_LIB):	$(SHARED_OBJS)
f46039
f46039
$(STATIC_LIB):	$(STATIC_OBJS)
f46039
c26f15
$(APP):		$(PACKAGE_APP)
f46039
f46039
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
c26f15
		rm -f app.tag
2f936c
		$(CC) -o $@ $(STATIC_OBJS) $(APP_OBJS) $(LDFLAGS_APP)
f46039
5fe6ce
$(SHARED_APP):	$(DSO_REF_SOLINK) $(APP_OBJS) $(SHARED_SOLINK)
c26f15
		rm -f app.tag
42c429
		$(CC) -o $@ $(APP_OBJS) $(LDFLAGS_APP) -l$(PACKAGE)
f46039
f46039
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
c26f15
		rm -f app.tag
2f936c
		$(CC) -static -o $@ $(STATIC_OBJS) $(APP_OBJS) $(LDFLAGS_STATIC)
f46039
f46039
3e9a60
dirs: 		dirs.tag
f46039
f46039
dirs.tag:
feb924
		mkdir -p build
1b0fc6
		mkdir -p bin
1b0fc6
		mkdir -p lib
f46039
		touch dirs.tag
f46039
f81180
host.tag:	@makefile@
9b9d44
		rm -f host.tmp
9b9d44
		touch host.tmp
1ab21d
		mv host.tmp host.tag
63d3bb
feb924
version.tag:	$(GIT_REFERENCE_INDEX) dirs.tag
77324f
		$(PROJECT_DIR)/sofort/tools/version.sh	\
11deae
			-s $(SOURCE_DIR)		\
f46039
			-o build/$(PACKAGE)_version.h	\
f46039
			-p $(PACKAGE)
f46039
		touch version.tag
f46039
f46039
distclean:	clean
fd0bc1
		rm -f ccenv/host.mk
fd0bc1
		rm -f ccenv/native.mk
aa54db
		rm -f cfgdefs.mk
aa54db
		rm -f usrdefs.mk
8cd799
		rm -f config.log
f81180
		rm -f @makefile@
e1a906
		rmdir build ccenv bin lib 2>&1 || true
f46039
b2d0f4
clean:		clean-implib
f46039
		rm -f tree.tag
1b36ec
		rm -f srcs.tag
f46039
		rm -f dirs.tag
f46039
		rm -f host.tag
1ab21d
		rm -f host.tmp
f46039
		rm -f version.tag
d87d1a
		rm -f app.tag
f46039
		rm -f $(SHARED_OBJS)
f46039
		rm -f $(STATIC_OBJS)
f46039
		rm -f $(APP_OBJS)
f46039
		rm -f $(SHARED_LIB)
225022
		rm -f $(SHARED_SONAME)
225022
		rm -f $(SHARED_SOLINK)
f46039
		rm -f $(STATIC_LIB)
f46039
		rm -f $(APP)
f46039
		rm -f $(DEFAULT_APP)
f46039
		rm -f $(SHARED_APP)
f46039
		rm -f $(STATIC_APP)
02d0ec
		rm -f build/$(PACKAGE)_version.h
02d0ec
		rm -f build/$(PACKAGE).pc
f46039
f46039
1ab21d
.PHONY:		package-app \
c2225d
		all install shared static app \
b2d0f4
		shared-objs shared-lib \
832c05
		shared-soname shared-solink \
832c05
		package-shared-soname package-shared-solink \
f46039
		static-objs static-lib \
f46039
		default-app shared-app static-app \
b2d0f4
		install-shared install-static \
832c05
		install-soname install-solink \
832c05
		package-install-soname package-install-solink \
f46039
		install-headers install-app \
b9a8a2
		install-headers-default install-headers-custom \
b2d0f4
		clean distclean clean-implib version \
0bf5e7
		.display .conf \
40b609
		.display-project .display-env .display-tools .display-flags \
b2c8fb
		.display-pe .display-dirs .display-build \
b2d0f4
		implib implib-ver implib-soname implib-solink \
b2d0f4
		install-implib install-implib-ver \
b2d0f4
		install-implib-soname install-implib-solink