Blame Makefile.in

12fcaa
# Makefile.in: primary common build logic.
12fcaa
# this file is covered by COPYING.SOFORT.
12fcaa
2521cb
.POSIX:
2521cb
2521cb
.SUFFIXES: .a .c .s .o .lo .ao
2521cb
18eb48
PACKAGE 		= @package@
9c558e
NICKNAME 		= @nickname@
18eb48
PROJECT_DIR 		= @project_dir@
60bad4
SOURCE_DIR 		= @source_dir@
b85bc4
GIT_REFERENCE_INDEX	= @git_reference_index@
9c558e
CUSTOM_INSTALL_HEADERS  = @custom_install_headers@
9c558e
AVOID_VERSION		= @avoid_version@
18eb48
f9df4a
PKGNAME			= @pkgname@
f9df4a
PKGDESC			= @pkgdesc@
f9df4a
PKGUSRC			= @pkgusrc@
f9df4a
PKGREPO			= @pkgrepo@
f9df4a
PKGPSRC			= @pkgpsrc@
f9df4a
PKGDURL			= @pkgdurl@
7dd90c
PKGBUGS			= @pkgbugs@
7dd90c
PKGHOME			= @pkghome@
f9df4a
PKGDEFS			= @pkgdefs@
f9df4a
PKGLIBS			= @pkglibs@
f9df4a
1ca6f1
SRCINFO			= @srcinfo@
1ca6f1
SRCSITE			= @srcsite@
1ca6f1
1ca6f1
PGPRKEY			= @pgprkey@
1ca6f1
PGPSKEY			= @pgpskey@
1ca6f1
0d8353
RAWBALL			= @rawball@
0d8353
RAWBALL_URL		= @rawball_url@
0d8353
RAWBALL_SHA256		= @rawball_sha256@
0d8353
MODBALL			= @modball@
0d8353
MODBALL_URL		= @modball_url@
0d8353
MODBALL_SHA256		= @modball_sha256@
0d8353
SRCBALL			= @srcball@
0d8353
SRCBALL_URL		= @srcball_url@
0d8353
SRCBALL_SHA256		= @srcball_sha256@
0d8353
c86657
MAKE                    = @make@
18df6e
MAKEMODE                = @makemode@
c86657
18eb48
BUILD 			= @build@
18eb48
HOST 			= @host@
55d3a8
CCHOST 			= @cchost@
99366d
CFGHOST 		= @cfghost@
18eb48
TARGET 			= @target@
18eb48
ARCH 			= @arch@
f08094
COMPILER 		= @compiler@
722b8c
TOOLCHAIN		= @toolchain@
18eb48
SYSROOT 		= @sysroot@
18eb48
CROSS_COMPILE 		= @cross_compile@
18eb48
SHELL 			= @shell@
18eb48
d765ca
PREFIX 			= @prefix@
d765ca
EXEC_PREFIX 		= @exec_prefix@
d765ca
BINDIR 			= @bindir@
d765ca
SBINDIR 		= @sbindir@
d765ca
LIBDIR 			= @libdir@
d765ca
INCLUDEDIR 		= @includedir@
d765ca
OLDINCLUDEDIR 		= @oldincludedir@
d765ca
MANDIR 			= @mandir@
d765ca
DOCDIR 			= @docdir@
d765ca
LIBEXECDIR 		= @libexecdir@
d765ca
d765ca
SYSCONFDIR		= @sysconfdir@
d765ca
SHAREDSTATEDIR		= @sharedstatedir@
d765ca
LOCALSTATEDIR		= @localstatedir@
d765ca
RUNSTATEDIR		= @runstatedir@
d765ca
DATAROOTDIR		= @datarootdir@
d765ca
DATADIR			= @datadir@
d765ca
INFODIR			= @infodir@
d765ca
LOCALEDIR		= @localedir@
d765ca
HTMLDIR			= @htmldir@
d765ca
DVIDIR			= @dvidir@
d765ca
PDFDIR			= @pdfdir@
d765ca
PSDIR			= @psdir@
d765ca
eb4330
CFLAGS_COMMON 		+= @cflags_common@
eb4330
CFLAGS_DEBUG 		+= @cflags_debug@
eb4330
CFLAGS_CMDLINE 		+= @cflags_cmdline@
eb4330
CFLAGS_CONFIG 		+= @cflags_config@
eb4330
CFLAGS_SYSROOT 		+= @cflags_sysroot@
eb4330
CFLAGS_SITE		+= @cflags_site@
eb4330
CFLAGS_PATH 		+= @cflags_path@
eb4330
CFLAGS_STRICT 		+= @cflags_strict@
eb4330
CFLAGS_UTIL 		+= @cflags_util@
eb4330
CFLAGS_LAST 		+= @cflags_last@
eb4330
CFLAGS_ONCE 		+= @cflags_once@
eb4330
eb4330
LDFLAGS_COMMON 		+= @ldflags_common@
eb4330
LDFLAGS_DEBUG 		+= @ldflags_debug@
eb4330
LDFLAGS_CMDLINE 	+= @ldflags_cmdline@
eb4330
LDFLAGS_CONFIG 		+= @ldflags_config@
eb4330
LDFLAGS_SYSROOT 	+= @ldflags_sysroot@
eb4330
LDFLAGS_PATH 		+= @ldflags_path@
eb4330
LDFLAGS_STRICT 		+= @ldflags_strict@
eb4330
LDFLAGS_UTIL 		+= @ldflags_util@
eb4330
LDFLAGS_LAST 		+= @ldflags_last@
eb4330
LDFLAGS_ONCE 		+= @ldflags_once@
18eb48
d765ca
USER_CC                 = @user_cc@
d765ca
USER_CPP                = @user_cpp@
d765ca
USER_CXX                = @user_cxx@
d765ca
eb4330
NATIVE_HOST		= @native_host@
eb4330
NATIVE_CFGHOST		= @native_cfghost@
eb4330
NATIVE_CFLAGS		= @native_cflags@
eb4330
NATIVE_LDFLAGS		= @native_ldflags@
18eb48
9c558e
ALL_SHARED              = @all_shared@
9c558e
ALL_STATIC              = @all_static@
9c558e
DISABLE_FRONTEND	= @disable_frontend@
9c558e
DISABLE_SHARED          = @disable_shared@
9c558e
DISABLE_STATIC          = @disable_static@
18eb48
4b7770
USE_CUSTOM_CFGDEFS      = @use_custom_cfgdefs@
4b7770
USE_CUSTOM_USRDEFS      = @use_custom_usrdefs@
4b7770
18acfc
SHARED_LIB_CMD          = @shared_lib_cmd@
18acfc
SHARED_LIB_LDFLAGS      = @shared_lib_ldflags@
18acfc
beafec
VERSION_OPT             = @version_opt@
beafec
9626c8
SHARED_LIBRARY_OPT      = @shared_library_opt@
9626c8
STATIC_LIBRARY_OPT      = @static_library_opt@
9626c8
9626c8
APP_FRONTEND_OPT        = @app_frontend_opt@
9626c8
APP_LINKING_OPT         = @app_linking_opt@
9626c8
9626c8
INSTALL_HEADERS_OPT     = @install_headers_opt@
9626c8
01b183
18eb48
all:
18eb48
install:
18eb48
shared:
18eb48
static:
18eb48
9c558e
install-extras:
9c558e
install-app-extras:
18eb48
2521cb
.cflags-host:
55d840
	@true : $(CFLAGS)
2521cb
2521cb
.cflags-native:
55d840
	@true : $(NATIVE_CFLAGS)
2521cb
e2d56b
.ldflags-host:
7a5bd1
	@true : $(LDFLAGS_APP)
e2d56b
e2d56b
.ldflags-native:
e2d56b
	@true : $(NATIVE_LDFLAGS)
e2d56b
2521cb
eb4330
include ./ccenv/host.mk
eb4330
include ./ccenv/native.mk
18eb48
a6104a
include ./cfgdefs.mk
a6104a
include ./usrdefs.mk
ac9867
3542e2
include $(PROJECT_DIR)/sofort/core/defs.mk
3542e2
include $(PROJECT_DIR)/sofort/core/pkgconf.mk
3542e2
include $(PROJECT_DIR)/sofort/core/version.mk
3542e2
include $(PROJECT_DIR)/sofort/core/flavor.mk
2521cb
include $(PROJECT_DIR)/sofort/core/infer.mk
9c558e
a6104a
include $(PROJECT_DIR)/project/osforce.mk
18eb48
include $(PROJECT_DIR)/project/tree.mk
18eb48
include $(PROJECT_DIR)/project/depends.mk
18eb48
include $(PROJECT_DIR)/project/headers.mk
18eb48
include $(PROJECT_DIR)/project/common.mk
18eb48
include $(PROJECT_DIR)/project/arch.mk
18eb48
include $(PROJECT_DIR)/project/extras.mk
18eb48
include $(PROJECT_DIR)/project/overrides.mk
18eb48
18eb48
9c558e
all:		package-shared package-static app
9c558e
9c558e
install:	package-install-app
9c558e
install:	package-install-extras
9c558e
install:	install-libs
18eb48
9c558e
app:		app-tag
18eb48
9c558e
app.tag:
9c558e
		cp $(PACKAGE_APP) $(APP)
9c558e
		touch app.tag
18eb48
9c558e
install-libs:	package-install-shared
9c558e
install-libs:	package-install-static
18eb48
9c558e
install-headers-default:
c646f8
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
c646f8
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
18eb48
9c558e
install-shared:	shared install-lib install-implib
9c558e
install-shared: package-install-soname package-install-solink
9c558e
install-shared: install-headers
9c558e
9c558e
install-lib:	shared
c646f8
		mkdir -p $(DESTDIR)$(LIBDIR)
c646f8
		cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)
18eb48
9c558e
install-static:	static install-headers
c646f8
		mkdir -p $(DESTDIR)$(LIBDIR)
c646f8
		cp $(STATIC_LIB) $(DESTDIR)$(LIBDIR)
18eb48
9c558e
install-app:	app install-app-extras
9c558e
		mkdir -p $(DESTDIR)$(BINDIR)
9c558e
		cp $(APP) $(DESTDIR)$(BINDIR)
9c558e
9c558e
install-static-app:	static-app install-app-extras
9c558e
			mkdir -p $(DESTDIR)$(BINDIR)
9c558e
			cp $(STATIC_APP) $(DESTDIR)$(BINDIR)/$(NICKNAME)$(OS_APP_SUFFIX)
18eb48
18eb48
9c558e
9c558e
shared:		shared-lib implib
9c558e
shared:		package-shared-soname package-shared-solink
18eb48
18eb48
static:		static-lib
18eb48
18eb48
shared-lib:	shared-objs $(SHARED_LIB)
18eb48
9c558e
shared-soname:	shared-lib $(SHARED_SONAME)
9c558e
9c558e
shared-solink:	shared-lib $(SHARED_SOLINK)
9c558e
18eb48
static-lib:	static-objs $(STATIC_LIB)
18eb48
9c558e
9c558e
9c558e
default-app:	version.tag static-objs $(DEFAULT_APP)
9c558e
9c558e
shared-app:	version.tag shared $(SHARED_APP)
9c558e
9c558e
static-app:	version.tag static-objs $(STATIC_APP)
18eb48
18eb48
18eb48
18eb48
shared-objs:	dirs $(SHARED_OBJS)
18eb48
18eb48
static-objs:	dirs $(STATIC_OBJS)
18eb48
9c558e
app-objs:	dirs $(APP_OBJS)
9c558e
18eb48
18eb48
0068c4
$(APP_SRCS):	srcs.tag
0068c4
0068c4
$(COMMON_SRCS):	srcs.tag
0068c4
2521cb
$(APP_OBJS):	$(ALL_HEADERS) host.tag tree.tag
2521cb
2521cb
$(SHARED_OBJS):	$(ALL_HEADERS) host.tag tree.tag
2521cb
2521cb
$(STATIC_OBJS):	$(ALL_HEADERS) host.tag tree.tag
2521cb
2521cb
18eb48
$(SHARED_LIB):	$(SHARED_OBJS)
18eb48
18eb48
$(STATIC_LIB):	$(STATIC_OBJS)
18eb48
9c558e
$(APP):		$(PACKAGE_APP)
9c558e
9c558e
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
9c558e
		rm -f app.tag
2521cb
		$(CC) -o $@ $(STATIC_OBJS) $(APP_OBJS) $(LDFLAGS_APP)
18eb48
ad0133
$(SHARED_APP):	$(DSO_REF_SOLINK) $(APP_OBJS) $(SHARED_SOLINK)
9c558e
		rm -f app.tag
97caf7
		$(CC) -o $@ $(APP_OBJS) $(LDFLAGS_APP) -l$(PACKAGE)
9c558e
9c558e
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
9c558e
		rm -f app.tag
2521cb
		$(CC) -static -o $@ $(STATIC_OBJS) $(APP_OBJS) $(LDFLAGS_STATIC)
9c558e
9c558e
9c558e
dirs: 		dirs.tag
18eb48
18eb48
dirs.tag:
c521d9
		mkdir -p build
9c558e
		mkdir -p bin
74af79
		mkdir -p lib
18eb48
		touch dirs.tag
18eb48
f43bd8
host.tag:	@makefile@
377358
		rm -f host.tmp
377358
		touch host.tmp
831445
		mv host.tmp host.tag
d3ea7f
c521d9
version.tag:	$(GIT_REFERENCE_INDEX) dirs.tag
3542e2
		$(PROJECT_DIR)/sofort/tools/version.sh	\
60bad4
			-s $(SOURCE_DIR)		\
9c558e
			-o build/$(PACKAGE)_version.h	\
9c558e
			-p $(PACKAGE)
9c558e
		touch version.tag
9c558e
18eb48
distclean:	clean
e2ab8a
		rm -f ccenv/host.mk
e2ab8a
		rm -f ccenv/native.mk
51839f
		rm -f cfgdefs.mk
51839f
		rm -f usrdefs.mk
0d8567
		rm -f config.log
f43bd8
		rm -f @makefile@
ac1d1c
		rmdir build ccenv bin lib 2>&1 || true
18eb48
9c558e
clean:		clean-implib
18eb48
		rm -f tree.tag
0068c4
		rm -f srcs.tag
18eb48
		rm -f dirs.tag
18eb48
		rm -f host.tag
831445
		rm -f host.tmp
9c558e
		rm -f version.tag
9c558e
		rm -f app.tag
18eb48
		rm -f $(SHARED_OBJS)
18eb48
		rm -f $(STATIC_OBJS)
9c558e
		rm -f $(APP_OBJS)
18eb48
		rm -f $(SHARED_LIB)
9c558e
		rm -f $(SHARED_SONAME)
9c558e
		rm -f $(SHARED_SOLINK)
18eb48
		rm -f $(STATIC_LIB)
9c558e
		rm -f $(APP)
9c558e
		rm -f $(DEFAULT_APP)
9c558e
		rm -f $(SHARED_APP)
9c558e
		rm -f $(STATIC_APP)
fc04dc
		rm -f build/$(PACKAGE)_version.h
fc04dc
		rm -f build/$(PACKAGE).pc
18eb48
18eb48
831445
.PHONY:		package-app \
55d3a8
		all install shared static app \
9c558e
		shared-objs shared-lib \
9c558e
		shared-soname shared-solink \
9c558e
		package-shared-soname package-shared-solink \
18eb48
		static-objs static-lib \
9c558e
		default-app shared-app static-app \
9c558e
		install-shared install-static \
9c558e
		install-soname install-solink \
9c558e
		package-install-soname package-install-solink \
9c558e
		install-headers install-app \
9c558e
		install-headers-default install-headers-custom \
9c558e
		clean distclean clean-implib version \
9c558e
		.display .conf \
8e3666
		.display-project .display-env .display-tools .display-flags \
9bb340
		.display-pe .display-dirs .display-build \
9c558e
		implib implib-ver implib-soname implib-solink \
9c558e
		install-implib install-implib-ver \
9c558e
		install-implib-soname install-implib-solink