Redfoxmoon / cross / slibtool

Forked from cross/slibtool 10 months ago
Clone

Blame Makefile.in

c88d44
# Makefile.in: primary common build logic.
c88d44
# this file is covered by COPYING.SOFORT.
c88d44
b55149
.POSIX:
b55149
b55149
.SUFFIXES: .a .c .s .o .lo .ao
b55149
9ca8c4
PACKAGE 		= @package@
be9551
NICKNAME 		= @nickname@
9ca8c4
PROJECT_DIR 		= @project_dir@
613e01
SOURCE_DIR 		= @source_dir@
990ef3
GIT_REFERENCE_INDEX	= @git_reference_index@
db15ad
CUSTOM_INSTALL_HEADERS  = @custom_install_headers@
e1e881
AVOID_VERSION		= @avoid_version@
9ca8c4
bb8747
PKGNAME			= @pkgname@
bb8747
PKGDESC			= @pkgdesc@
bb8747
PKGUSRC			= @pkgusrc@
bb8747
PKGREPO			= @pkgrepo@
bb8747
PKGPSRC			= @pkgpsrc@
bb8747
PKGDURL			= @pkgdurl@
6ba4be
PKGBUGS			= @pkgbugs@
6ba4be
PKGHOME			= @pkghome@
bb8747
PKGDEFS			= @pkgdefs@
bb8747
PKGLIBS			= @pkglibs@
bb8747
66aea9
SRCINFO			= @srcinfo@
66aea9
SRCSITE			= @srcsite@
66aea9
66aea9
PGPRKEY			= @pgprkey@
66aea9
PGPSKEY			= @pgpskey@
66aea9
c7b6f6
RAWBALL			= @rawball@
c7b6f6
RAWBALL_URL		= @rawball_url@
c7b6f6
RAWBALL_SHA256		= @rawball_sha256@
c7b6f6
MODBALL			= @modball@
c7b6f6
MODBALL_URL		= @modball_url@
c7b6f6
MODBALL_SHA256		= @modball_sha256@
c7b6f6
SRCBALL			= @srcball@
c7b6f6
SRCBALL_URL		= @srcball_url@
c7b6f6
SRCBALL_SHA256		= @srcball_sha256@
c7b6f6
ebc6d4
MAKE                    = @make@
b4b46d
MAKEMODE                = @makemode@
ebc6d4
9ca8c4
BUILD 			= @build@
9ca8c4
HOST 			= @host@
f83f76
CCHOST 			= @cchost@
f9d92c
CFGHOST 		= @cfghost@
9ca8c4
TARGET 			= @target@
9ca8c4
ARCH 			= @arch@
9ca8c4
COMPILER 		= @compiler@
9ca8c4
TOOLCHAIN		= @toolchain@
9ca8c4
SYSROOT 		= @sysroot@
9ca8c4
CROSS_COMPILE 		= @cross_compile@
9ca8c4
SHELL 			= @shell@
9ca8c4
18f961
PREFIX 			= @prefix@
18f961
EXEC_PREFIX 		= @exec_prefix@
18f961
BINDIR 			= @bindir@
18f961
SBINDIR 		= @sbindir@
18f961
LIBDIR 			= @libdir@
18f961
INCLUDEDIR 		= @includedir@
18f961
OLDINCLUDEDIR 		= @oldincludedir@
18f961
MANDIR 			= @mandir@
18f961
DOCDIR 			= @docdir@
18f961
LIBEXECDIR 		= @libexecdir@
18f961
18f961
SYSCONFDIR		= @sysconfdir@
18f961
SHAREDSTATEDIR		= @sharedstatedir@
18f961
LOCALSTATEDIR		= @localstatedir@
18f961
RUNSTATEDIR		= @runstatedir@
18f961
DATAROOTDIR		= @datarootdir@
18f961
DATADIR			= @datadir@
18f961
INFODIR			= @infodir@
18f961
LOCALEDIR		= @localedir@
18f961
HTMLDIR			= @htmldir@
18f961
DVIDIR			= @dvidir@
18f961
PDFDIR			= @pdfdir@
18f961
PSDIR			= @psdir@
18f961
f7f887
CFLAGS_COMMON 		+= @cflags_common@
f7f887
CFLAGS_DEBUG 		+= @cflags_debug@
f7f887
CFLAGS_CMDLINE 		+= @cflags_cmdline@
f7f887
CFLAGS_CONFIG 		+= @cflags_config@
f7f887
CFLAGS_SYSROOT 		+= @cflags_sysroot@
f7f887
CFLAGS_OS		+= @cflags_os@
f7f887
CFLAGS_SITE		+= @cflags_site@
f7f887
CFLAGS_PATH 		+= @cflags_path@
f7f887
CFLAGS_STRICT 		+= @cflags_strict@
f7f887
CFLAGS_UTIL 		+= @cflags_util@
f7f887
CFLAGS_LAST 		+= @cflags_last@
f7f887
CFLAGS_ONCE 		+= @cflags_once@
f7f887
f7f887
LDFLAGS_COMMON 		+= @ldflags_common@
f7f887
LDFLAGS_DEBUG 		+= @ldflags_debug@
f7f887
LDFLAGS_CMDLINE 	+= @ldflags_cmdline@
f7f887
LDFLAGS_CONFIG 		+= @ldflags_config@
f7f887
LDFLAGS_SYSROOT 	+= @ldflags_sysroot@
f7f887
LDFLAGS_PATH 		+= @ldflags_path@
f7f887
LDFLAGS_STRICT 		+= @ldflags_strict@
f7f887
LDFLAGS_UTIL 		+= @ldflags_util@
f7f887
LDFLAGS_LAST 		+= @ldflags_last@
f7f887
LDFLAGS_ONCE 		+= @ldflags_once@
9ca8c4
18f961
USER_CC                 = @user_cc@
18f961
USER_CPP                = @user_cpp@
18f961
USER_CXX                = @user_cxx@
18f961
f7f887
NATIVE_HOST		= @native_host@
f7f887
NATIVE_CFGHOST		= @native_cfghost@
f7f887
NATIVE_CFLAGS		= @native_cflags@
f7f887
NATIVE_LDFLAGS		= @native_ldflags@
9ca8c4
a7e33b
ALL_SHARED              = @all_shared@
a7e33b
ALL_STATIC              = @all_static@
eb1dc5
DISABLE_FRONTEND	= @disable_frontend@
a7e33b
DISABLE_SHARED          = @disable_shared@
a7e33b
DISABLE_STATIC          = @disable_static@
9ca8c4
d2a366
USE_CUSTOM_CFGDEFS      = @use_custom_cfgdefs@
d2a366
USE_CUSTOM_USRDEFS      = @use_custom_usrdefs@
d2a366
139454
SHARED_LIB_CMD          = @shared_lib_cmd@
139454
SHARED_LIB_LDFLAGS      = @shared_lib_ldflags@
139454
db7312
VERSION_OPT             = @version_opt@
db7312
36fbcc
SHARED_LIBRARY_OPT      = @shared_library_opt@
36fbcc
STATIC_LIBRARY_OPT      = @static_library_opt@
36fbcc
36fbcc
APP_FRONTEND_OPT        = @app_frontend_opt@
36fbcc
APP_LINKING_OPT         = @app_linking_opt@
36fbcc
36fbcc
INSTALL_HEADERS_OPT     = @install_headers_opt@
36fbcc
95b473
9ca8c4
all:
9ca8c4
install:
9ca8c4
shared:
9ca8c4
static:
9ca8c4
028ddb
install-extras:
028ddb
install-app-extras:
9ca8c4
b55149
.cflags-host:
45190f
	@true : $(CFLAGS)
b55149
b55149
.cflags-native:
45190f
	@true : $(NATIVE_CFLAGS)
b55149
b55149
f7f887
include ./ccenv/host.mk
f7f887
include ./ccenv/native.mk
9ca8c4
45423b
include ./cfgdefs.mk
45423b
include ./usrdefs.mk
f7eed4
3cdb2f
include $(PROJECT_DIR)/sofort/core/defs.mk
3cdb2f
include $(PROJECT_DIR)/sofort/core/pkgconf.mk
3cdb2f
include $(PROJECT_DIR)/sofort/core/version.mk
3cdb2f
include $(PROJECT_DIR)/sofort/core/flavor.mk
b55149
include $(PROJECT_DIR)/sofort/core/infer.mk
1f5b18
45423b
include $(PROJECT_DIR)/project/osforce.mk
9ca8c4
include $(PROJECT_DIR)/project/tree.mk
9ca8c4
include $(PROJECT_DIR)/project/depends.mk
9ca8c4
include $(PROJECT_DIR)/project/headers.mk
9ca8c4
include $(PROJECT_DIR)/project/common.mk
9ca8c4
include $(PROJECT_DIR)/project/arch.mk
9ca8c4
include $(PROJECT_DIR)/project/extras.mk
9ca8c4
include $(PROJECT_DIR)/project/overrides.mk
9ca8c4
9ca8c4
a7e33b
all:		package-shared package-static app
9ca8c4
eb1dc5
install:	package-install-app
eb1dc5
install:	package-install-extras
a7e33b
install:	install-libs
9ca8c4
eb1dc5
app:		app-tag
32003e
473425
app.tag:
32003e
		cp $(PACKAGE_APP) $(APP)
32003e
		touch app.tag
9ca8c4
a7e33b
install-libs:	package-install-shared
a7e33b
install-libs:	package-install-static
9ca8c4
db15ad
install-headers-default:
2b6981
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
2b6981
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
9ca8c4
e1e881
install-shared:	shared install-lib install-implib
e1e881
install-shared: package-install-soname package-install-solink
ae90c3
install-shared: install-headers
513c5c
513c5c
install-lib:	shared
2b6981
		mkdir -p $(DESTDIR)$(LIBDIR)
2b6981
		cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)
9ca8c4
ae90c3
install-static:	static install-headers
2b6981
		mkdir -p $(DESTDIR)$(LIBDIR)
2b6981
		cp $(STATIC_LIB) $(DESTDIR)$(LIBDIR)
9ca8c4
028ddb
install-app:	app install-app-extras
2b6981
		mkdir -p $(DESTDIR)$(BINDIR)
2b6981
		cp $(APP) $(DESTDIR)$(BINDIR)
9ca8c4
d477aa
install-static-app:	static-app install-app-extras
d477aa
			mkdir -p $(DESTDIR)$(BINDIR)
d477aa
			cp $(STATIC_APP) $(DESTDIR)$(BINDIR)/$(NICKNAME)$(OS_APP_SUFFIX)
d477aa
9ca8c4
9ca8c4
e1e881
shared:		shared-lib implib
e1e881
shared:		package-shared-soname package-shared-solink
9ca8c4
9ca8c4
static:		static-lib
9ca8c4
9ca8c4
shared-lib:	shared-objs $(SHARED_LIB)
9ca8c4
513c5c
shared-soname:	shared-lib $(SHARED_SONAME)
513c5c
513c5c
shared-solink:	shared-lib $(SHARED_SOLINK)
513c5c
9ca8c4
static-lib:	static-objs $(STATIC_LIB)
9ca8c4
9ca8c4
9ca8c4
32003e
default-app:	version.tag static-objs $(DEFAULT_APP)
9ca8c4
9ca8c4
shared-app:	version.tag shared $(SHARED_APP)
9ca8c4
32003e
static-app:	version.tag static-objs $(STATIC_APP)
9ca8c4
9ca8c4
9ca8c4
9ca8c4
shared-objs:	dirs $(SHARED_OBJS)
9ca8c4
9ca8c4
static-objs:	dirs $(STATIC_OBJS)
9ca8c4
9ca8c4
app-objs:	dirs $(APP_OBJS)
9ca8c4
9ca8c4
9ca8c4
75733a
$(APP_SRCS):	srcs.tag
75733a
75733a
$(COMMON_SRCS):	srcs.tag
75733a
b55149
$(APP_OBJS):	$(ALL_HEADERS) host.tag tree.tag
b55149
b55149
$(SHARED_OBJS):	$(ALL_HEADERS) host.tag tree.tag
b55149
b55149
$(STATIC_OBJS):	$(ALL_HEADERS) host.tag tree.tag
b55149
b55149
9ca8c4
$(SHARED_LIB):	$(SHARED_OBJS)
9ca8c4
9ca8c4
$(STATIC_LIB):	$(STATIC_OBJS)
9ca8c4
32003e
$(APP):		$(PACKAGE_APP)
9ca8c4
9ca8c4
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
32003e
		rm -f app.tag
b55149
		$(CC) -o $@ $(STATIC_OBJS) $(APP_OBJS) $(LDFLAGS_APP)
9ca8c4
15f733
$(SHARED_APP):	$(DSO_REF_SOLINK) $(APP_OBJS) $(SHARED_SOLINK)
32003e
		rm -f app.tag
832051
		$(CC) -o $@ $(APP_OBJS) $(LDFLAGS_APP) -l$(PACKAGE)
9ca8c4
9ca8c4
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
32003e
		rm -f app.tag
b55149
		$(CC) -static -o $@ $(STATIC_OBJS) $(APP_OBJS) $(LDFLAGS_STATIC)
9ca8c4
9ca8c4
f4247a
dirs: 		dirs.tag
9ca8c4
9ca8c4
dirs.tag:
1d8e07
		mkdir -p build
83ef8c
		mkdir -p bin
83ef8c
		mkdir -p lib
9ca8c4
		touch dirs.tag
9ca8c4
1311e2
host.tag:	@makefile@
4a289f
		$(CC) $(CFLAGS) -dumpmachine > host.tmp
4a289f
		mv host.tmp host.tag
543a15
1d8e07
version.tag:	$(GIT_REFERENCE_INDEX) dirs.tag
3cdb2f
		$(PROJECT_DIR)/sofort/tools/version.sh	\
613e01
			-s $(SOURCE_DIR)		\
9ca8c4
			-o build/$(PACKAGE)_version.h	\
9ca8c4
			-p $(PACKAGE)
9ca8c4
		touch version.tag
9ca8c4
9ca8c4
distclean:	clean
c22b8d
		rm -f ccenv/host.mk
c22b8d
		rm -f ccenv/native.mk
85b9b7
		rm -f cfgdefs.mk
85b9b7
		rm -f usrdefs.mk
a8f188
		rm -f config.log
1311e2
		rm -f @makefile@
8453f0
		rmdir build ccenv bin lib 2>&1 || true
9ca8c4
1f5b18
clean:		clean-implib
9ca8c4
		rm -f tree.tag
75733a
		rm -f srcs.tag
9ca8c4
		rm -f dirs.tag
9ca8c4
		rm -f host.tag
4a289f
		rm -f host.tmp
9ca8c4
		rm -f version.tag
01a503
		rm -f app.tag
9ca8c4
		rm -f $(SHARED_OBJS)
9ca8c4
		rm -f $(STATIC_OBJS)
9ca8c4
		rm -f $(APP_OBJS)
9ca8c4
		rm -f $(SHARED_LIB)
513c5c
		rm -f $(SHARED_SONAME)
513c5c
		rm -f $(SHARED_SOLINK)
9ca8c4
		rm -f $(STATIC_LIB)
9ca8c4
		rm -f $(APP)
9ca8c4
		rm -f $(DEFAULT_APP)
9ca8c4
		rm -f $(SHARED_APP)
9ca8c4
		rm -f $(STATIC_APP)
347b61
		rm -f build/$(PACKAGE)_version.h
347b61
		rm -f build/$(PACKAGE).pc
9ca8c4
9ca8c4
4a289f
.PHONY:		package-app \
f83f76
		all install shared static app \
1f5b18
		shared-objs shared-lib \
e1e881
		shared-soname shared-solink \
e1e881
		package-shared-soname package-shared-solink \
9ca8c4
		static-objs static-lib \
9ca8c4
		default-app shared-app static-app \
1f5b18
		install-shared install-static \
e1e881
		install-soname install-solink \
e1e881
		package-install-soname package-install-solink \
9ca8c4
		install-headers install-app \
42e1ff
		install-headers-default install-headers-custom \
1f5b18
		clean distclean clean-implib version \
cb65d5
		.display .conf \
9ca8c4
		.display-project .display-env .display-tools .display-flags \
b5c111
		.display-pe .display-dirs .display-build \
1f5b18
		implib implib-ver implib-soname implib-solink \
1f5b18
		install-implib install-implib-ver \
1f5b18
		install-implib-soname install-implib-solink