Blame Makefile.in

9c88f2
# Makefile.in: primary common build logic.
9c88f2
# this file is covered by COPYING.SOFORT.
9c88f2
2a07d4
.POSIX:
2a07d4
2a07d4
.SUFFIXES: .a .c .s .o .lo .ao
2a07d4
cde03b
PACKAGE 		= @package@
ee3e67
NICKNAME 		= @nickname@
cde03b
PROJECT_DIR 		= @project_dir@
f7b445
SOURCE_DIR 		= @source_dir@
2c9cf6
GIT_REFERENCE_INDEX	= @git_reference_index@
bcd956
CUSTOM_INSTALL_HEADERS  = @custom_install_headers@
53e4f7
AVOID_VERSION		= @avoid_version@
cde03b
b9138e
PKGNAME			= @pkgname@
b9138e
PKGDESC			= @pkgdesc@
b9138e
PKGUSRC			= @pkgusrc@
b9138e
PKGREPO			= @pkgrepo@
b9138e
PKGPSRC			= @pkgpsrc@
b9138e
PKGDURL			= @pkgdurl@
5b4717
PKGBUGS			= @pkgbugs@
5b4717
PKGHOME			= @pkghome@
b9138e
PKGDEFS			= @pkgdefs@
b9138e
PKGLIBS			= @pkglibs@
b9138e
8abfb9
SRCINFO			= @srcinfo@
8abfb9
SRCSITE			= @srcsite@
8abfb9
8abfb9
PGPRKEY			= @pgprkey@
8abfb9
PGPSKEY			= @pgpskey@
8abfb9
aee3db
RAWBALL			= @rawball@
aee3db
RAWBALL_URL		= @rawball_url@
aee3db
RAWBALL_SHA256		= @rawball_sha256@
aee3db
MODBALL			= @modball@
aee3db
MODBALL_URL		= @modball_url@
aee3db
MODBALL_SHA256		= @modball_sha256@
aee3db
SRCBALL			= @srcball@
aee3db
SRCBALL_URL		= @srcball_url@
aee3db
SRCBALL_SHA256		= @srcball_sha256@
aee3db
4f06b3
MAKE                    = @make@
19ccfa
MAKEMODE                = @makemode@
4f06b3
cde03b
BUILD 			= @build@
cde03b
HOST 			= @host@
7e1d96
CCHOST 			= @cchost@
a18dc4
CFGHOST 		= @cfghost@
cde03b
TARGET 			= @target@
cde03b
ARCH 			= @arch@
d015ab
COMPILER 		= @compiler@
e692ec
TOOLCHAIN		= @toolchain@
cde03b
SYSROOT 		= @sysroot@
cde03b
CROSS_COMPILE 		= @cross_compile@
cde03b
SHELL 			= @shell@
cde03b
3827e4
PREFIX 			= @prefix@
3827e4
EXEC_PREFIX 		= @exec_prefix@
3827e4
BINDIR 			= @bindir@
3827e4
SBINDIR 		= @sbindir@
3827e4
LIBDIR 			= @libdir@
3827e4
INCLUDEDIR 		= @includedir@
3827e4
OLDINCLUDEDIR 		= @oldincludedir@
3827e4
MANDIR 			= @mandir@
3827e4
DOCDIR 			= @docdir@
3827e4
LIBEXECDIR 		= @libexecdir@
3827e4
3827e4
SYSCONFDIR		= @sysconfdir@
3827e4
SHAREDSTATEDIR		= @sharedstatedir@
3827e4
LOCALSTATEDIR		= @localstatedir@
3827e4
RUNSTATEDIR		= @runstatedir@
3827e4
DATAROOTDIR		= @datarootdir@
3827e4
DATADIR			= @datadir@
3827e4
INFODIR			= @infodir@
3827e4
LOCALEDIR		= @localedir@
3827e4
HTMLDIR			= @htmldir@
3827e4
DVIDIR			= @dvidir@
3827e4
PDFDIR			= @pdfdir@
3827e4
PSDIR			= @psdir@
3827e4
b8199b
CFLAGS_COMMON 		+= @cflags_common@
b8199b
CFLAGS_DEBUG 		+= @cflags_debug@
b8199b
CFLAGS_CMDLINE 		+= @cflags_cmdline@
b8199b
CFLAGS_CONFIG 		+= @cflags_config@
b8199b
CFLAGS_SYSROOT 		+= @cflags_sysroot@
b8199b
CFLAGS_OS		+= @cflags_os@
b8199b
CFLAGS_SITE		+= @cflags_site@
b8199b
CFLAGS_PATH 		+= @cflags_path@
b8199b
CFLAGS_STRICT 		+= @cflags_strict@
b8199b
CFLAGS_UTIL 		+= @cflags_util@
b8199b
CFLAGS_LAST 		+= @cflags_last@
b8199b
CFLAGS_ONCE 		+= @cflags_once@
b8199b
b8199b
LDFLAGS_COMMON 		+= @ldflags_common@
b8199b
LDFLAGS_DEBUG 		+= @ldflags_debug@
b8199b
LDFLAGS_CMDLINE 	+= @ldflags_cmdline@
b8199b
LDFLAGS_CONFIG 		+= @ldflags_config@
b8199b
LDFLAGS_SYSROOT 	+= @ldflags_sysroot@
b8199b
LDFLAGS_PATH 		+= @ldflags_path@
b8199b
LDFLAGS_STRICT 		+= @ldflags_strict@
b8199b
LDFLAGS_UTIL 		+= @ldflags_util@
b8199b
LDFLAGS_LAST 		+= @ldflags_last@
b8199b
LDFLAGS_ONCE 		+= @ldflags_once@
cde03b
3827e4
USER_CC                 = @user_cc@
3827e4
USER_CPP                = @user_cpp@
3827e4
USER_CXX                = @user_cxx@
3827e4
b8199b
NATIVE_HOST		= @native_host@
b8199b
NATIVE_CFGHOST		= @native_cfghost@
b8199b
NATIVE_CFLAGS		= @native_cflags@
b8199b
NATIVE_LDFLAGS		= @native_ldflags@
cde03b
840c66
ALL_SHARED              = @all_shared@
840c66
ALL_STATIC              = @all_static@
d48c74
DISABLE_FRONTEND	= @disable_frontend@
840c66
DISABLE_SHARED          = @disable_shared@
840c66
DISABLE_STATIC          = @disable_static@
cde03b
e271dd
USE_CUSTOM_CFGDEFS      = @use_custom_cfgdefs@
e271dd
USE_CUSTOM_USRDEFS      = @use_custom_usrdefs@
e271dd
95d930
SHARED_LIB_CMD          = @shared_lib_cmd@
95d930
SHARED_LIB_LDFLAGS      = @shared_lib_ldflags@
95d930
f11003
VERSION_OPT             = @version_opt@
f11003
46a33a
SHARED_LIBRARY_OPT      = @shared_library_opt@
46a33a
STATIC_LIBRARY_OPT      = @static_library_opt@
46a33a
46a33a
APP_FRONTEND_OPT        = @app_frontend_opt@
46a33a
APP_LINKING_OPT         = @app_linking_opt@
46a33a
46a33a
INSTALL_HEADERS_OPT     = @install_headers_opt@
46a33a
665fba
cde03b
all:
cde03b
install:
cde03b
shared:
cde03b
static:
cde03b
ba4569
install-extras:
ba4569
install-app-extras:
cde03b
2a07d4
.cflags-host:
b06837
	@true : $(CFLAGS)
2a07d4
2a07d4
.cflags-native:
b06837
	@true : $(NATIVE_CFLAGS)
2a07d4
34db76
.ldflags-host:
34db76
	@true : $(LDFLAGS)
34db76
34db76
.ldflags-native:
34db76
	@true : $(NATIVE_LDFLAGS)
34db76
2a07d4
b8199b
include ./ccenv/host.mk
b8199b
include ./ccenv/native.mk
cde03b
2f4555
include ./cfgdefs.mk
2f4555
include ./usrdefs.mk
e9c437
6afb06
include $(PROJECT_DIR)/sofort/core/defs.mk
6afb06
include $(PROJECT_DIR)/sofort/core/pkgconf.mk
6afb06
include $(PROJECT_DIR)/sofort/core/version.mk
6afb06
include $(PROJECT_DIR)/sofort/core/flavor.mk
2a07d4
include $(PROJECT_DIR)/sofort/core/infer.mk
5694f7
2f4555
include $(PROJECT_DIR)/project/osforce.mk
cde03b
include $(PROJECT_DIR)/project/tree.mk
cde03b
include $(PROJECT_DIR)/project/depends.mk
cde03b
include $(PROJECT_DIR)/project/headers.mk
cde03b
include $(PROJECT_DIR)/project/common.mk
cde03b
include $(PROJECT_DIR)/project/arch.mk
cde03b
include $(PROJECT_DIR)/project/extras.mk
cde03b
include $(PROJECT_DIR)/project/overrides.mk
cde03b
cde03b
840c66
all:		package-shared package-static app
cde03b
d48c74
install:	package-install-app
d48c74
install:	package-install-extras
840c66
install:	install-libs
cde03b
d48c74
app:		app-tag
31ed66
e25045
app.tag:
31ed66
		cp $(PACKAGE_APP) $(APP)
31ed66
		touch app.tag
cde03b
840c66
install-libs:	package-install-shared
840c66
install-libs:	package-install-static
cde03b
bcd956
install-headers-default:
a96974
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
a96974
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
cde03b
53e4f7
install-shared:	shared install-lib install-implib
53e4f7
install-shared: package-install-soname package-install-solink
b3c01c
install-shared: install-headers
d14c96
d14c96
install-lib:	shared
a96974
		mkdir -p $(DESTDIR)$(LIBDIR)
a96974
		cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)
cde03b
b3c01c
install-static:	static install-headers
a96974
		mkdir -p $(DESTDIR)$(LIBDIR)
a96974
		cp $(STATIC_LIB) $(DESTDIR)$(LIBDIR)
cde03b
ba4569
install-app:	app install-app-extras
a96974
		mkdir -p $(DESTDIR)$(BINDIR)
a96974
		cp $(APP) $(DESTDIR)$(BINDIR)
cde03b
f89e82
install-static-app:	static-app install-app-extras
f89e82
			mkdir -p $(DESTDIR)$(BINDIR)
f89e82
			cp $(STATIC_APP) $(DESTDIR)$(BINDIR)/$(NICKNAME)$(OS_APP_SUFFIX)
f89e82
cde03b
cde03b
53e4f7
shared:		shared-lib implib
53e4f7
shared:		package-shared-soname package-shared-solink
cde03b
cde03b
static:		static-lib
cde03b
cde03b
shared-lib:	shared-objs $(SHARED_LIB)
cde03b
d14c96
shared-soname:	shared-lib $(SHARED_SONAME)
d14c96
d14c96
shared-solink:	shared-lib $(SHARED_SOLINK)
d14c96
cde03b
static-lib:	static-objs $(STATIC_LIB)
cde03b
cde03b
cde03b
31ed66
default-app:	version.tag static-objs $(DEFAULT_APP)
cde03b
cde03b
shared-app:	version.tag shared $(SHARED_APP)
cde03b
31ed66
static-app:	version.tag static-objs $(STATIC_APP)
cde03b
cde03b
cde03b
cde03b
shared-objs:	dirs $(SHARED_OBJS)
cde03b
cde03b
static-objs:	dirs $(STATIC_OBJS)
cde03b
cde03b
app-objs:	dirs $(APP_OBJS)
cde03b
cde03b
cde03b
b08d44
$(APP_SRCS):	srcs.tag
b08d44
b08d44
$(COMMON_SRCS):	srcs.tag
b08d44
2a07d4
$(APP_OBJS):	$(ALL_HEADERS) host.tag tree.tag
2a07d4
2a07d4
$(SHARED_OBJS):	$(ALL_HEADERS) host.tag tree.tag
2a07d4
2a07d4
$(STATIC_OBJS):	$(ALL_HEADERS) host.tag tree.tag
2a07d4
2a07d4
cde03b
$(SHARED_LIB):	$(SHARED_OBJS)
cde03b
cde03b
$(STATIC_LIB):	$(STATIC_OBJS)
cde03b
31ed66
$(APP):		$(PACKAGE_APP)
cde03b
cde03b
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
31ed66
		rm -f app.tag
2a07d4
		$(CC) -o $@ $(STATIC_OBJS) $(APP_OBJS) $(LDFLAGS_APP)
cde03b
591e8d
$(SHARED_APP):	$(DSO_REF_SOLINK) $(APP_OBJS) $(SHARED_SOLINK)
31ed66
		rm -f app.tag
87a476
		$(CC) -o $@ $(APP_OBJS) $(LDFLAGS_APP) -l$(PACKAGE)
cde03b
cde03b
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
31ed66
		rm -f app.tag
2a07d4
		$(CC) -static -o $@ $(STATIC_OBJS) $(APP_OBJS) $(LDFLAGS_STATIC)
cde03b
cde03b
507922
dirs: 		dirs.tag
cde03b
cde03b
dirs.tag:
a70856
		mkdir -p build
c5b3f2
		mkdir -p bin
c5b3f2
		mkdir -p lib
cde03b
		touch dirs.tag
cde03b
d2829c
host.tag:	@makefile@
8828cf
		rm -f host.tmp
8828cf
		touch host.tmp
6d1fc0
		mv host.tmp host.tag
9a5af6
a70856
version.tag:	$(GIT_REFERENCE_INDEX) dirs.tag
6afb06
		$(PROJECT_DIR)/sofort/tools/version.sh	\
f7b445
			-s $(SOURCE_DIR)		\
cde03b
			-o build/$(PACKAGE)_version.h	\
cde03b
			-p $(PACKAGE)
cde03b
		touch version.tag
cde03b
cde03b
distclean:	clean
9c4951
		rm -f ccenv/host.mk
9c4951
		rm -f ccenv/native.mk
fc2f00
		rm -f cfgdefs.mk
fc2f00
		rm -f usrdefs.mk
0506d8
		rm -f config.log
d2829c
		rm -f @makefile@
f45332
		rmdir build ccenv bin lib 2>&1 || true
cde03b
5694f7
clean:		clean-implib
cde03b
		rm -f tree.tag
b08d44
		rm -f srcs.tag
cde03b
		rm -f dirs.tag
cde03b
		rm -f host.tag
6d1fc0
		rm -f host.tmp
cde03b
		rm -f version.tag
97b592
		rm -f app.tag
cde03b
		rm -f $(SHARED_OBJS)
cde03b
		rm -f $(STATIC_OBJS)
cde03b
		rm -f $(APP_OBJS)
cde03b
		rm -f $(SHARED_LIB)
d14c96
		rm -f $(SHARED_SONAME)
d14c96
		rm -f $(SHARED_SOLINK)
cde03b
		rm -f $(STATIC_LIB)
cde03b
		rm -f $(APP)
cde03b
		rm -f $(DEFAULT_APP)
cde03b
		rm -f $(SHARED_APP)
cde03b
		rm -f $(STATIC_APP)
6a9b40
		rm -f build/$(PACKAGE)_version.h
6a9b40
		rm -f build/$(PACKAGE).pc
cde03b
cde03b
6d1fc0
.PHONY:		package-app \
7e1d96
		all install shared static app \
5694f7
		shared-objs shared-lib \
53e4f7
		shared-soname shared-solink \
53e4f7
		package-shared-soname package-shared-solink \
cde03b
		static-objs static-lib \
cde03b
		default-app shared-app static-app \
5694f7
		install-shared install-static \
53e4f7
		install-soname install-solink \
53e4f7
		package-install-soname package-install-solink \
cde03b
		install-headers install-app \
e1aa5d
		install-headers-default install-headers-custom \
5694f7
		clean distclean clean-implib version \
e1d501
		.display .conf \
7c3a37
		.display-project .display-env .display-tools .display-flags \
c125a0
		.display-pe .display-dirs .display-build \
5694f7
		implib implib-ver implib-soname implib-solink \
5694f7
		install-implib install-implib-ver \
5694f7
		install-implib-soname install-implib-solink