Blame Makefile.in

dff3c5
# Makefile.in: primary common build logic.
dff3c5
# this file is covered by COPYING.SOFORT.
dff3c5
fa897a
PACKAGE 		= @package@
a6e0dc
NICKNAME 		= @nickname@
fa897a
PROJECT_DIR 		= @project_dir@
620842
SOURCE_DIR 		= @source_dir@
2c61d1
GIT_REFERENCE_INDEX	= @git_reference_index@
a6e0dc
CUSTOM_INSTALL_HEADERS  = @custom_install_headers@
a6e0dc
AVOID_VERSION		= @avoid_version@
fa897a
a28d52
PKGNAME			= @pkgname@
a28d52
PKGDESC			= @pkgdesc@
a28d52
PKGUSRC			= @pkgusrc@
a28d52
PKGREPO			= @pkgrepo@
a28d52
PKGPSRC			= @pkgpsrc@
a28d52
PKGDURL			= @pkgdurl@
dab52f
PKGBUGS			= @pkgbugs@
dab52f
PKGHOME			= @pkghome@
a28d52
PKGDEFS			= @pkgdefs@
a28d52
PKGLIBS			= @pkglibs@
a28d52
4fa591
SRCINFO			= @srcinfo@
4fa591
SRCSITE			= @srcsite@
4fa591
4fa591
PGPRKEY			= @pgprkey@
4fa591
PGPSKEY			= @pgpskey@
4fa591
ce2f16
RAWBALL			= @rawball@
ce2f16
RAWBALL_URL		= @rawball_url@
ce2f16
RAWBALL_SHA256		= @rawball_sha256@
ce2f16
MODBALL			= @modball@
ce2f16
MODBALL_URL		= @modball_url@
ce2f16
MODBALL_SHA256		= @modball_sha256@
ce2f16
SRCBALL			= @srcball@
ce2f16
SRCBALL_URL		= @srcball_url@
ce2f16
SRCBALL_SHA256		= @srcball_sha256@
ce2f16
fa897a
BUILD 			= @build@
fa897a
HOST 			= @host@
c2ba00
CCHOST 			= @cchost@
257ef7
CFGHOST 		= @cfghost@
fa897a
TARGET 			= @target@
fa897a
ARCH 			= @arch@
09d3a4
COMPILER 		= @compiler@
f47035
TOOLCHAIN		= @toolchain@
fa897a
SYSROOT 		= @sysroot@
fa897a
CROSS_COMPILE 		= @cross_compile@
fa897a
SHELL 			= @shell@
fa897a
6be760
PREFIX 			= @prefix@
6be760
EXEC_PREFIX 		= @exec_prefix@
6be760
BINDIR 			= @bindir@
6be760
SBINDIR 		= @sbindir@
6be760
LIBDIR 			= @libdir@
6be760
INCLUDEDIR 		= @includedir@
6be760
OLDINCLUDEDIR 		= @oldincludedir@
6be760
MANDIR 			= @mandir@
6be760
DOCDIR 			= @docdir@
6be760
LIBEXECDIR 		= @libexecdir@
6be760
6be760
SYSCONFDIR		= @sysconfdir@
6be760
SHAREDSTATEDIR		= @sharedstatedir@
6be760
LOCALSTATEDIR		= @localstatedir@
6be760
RUNSTATEDIR		= @runstatedir@
6be760
DATAROOTDIR		= @datarootdir@
6be760
DATADIR			= @datadir@
6be760
INFODIR			= @infodir@
6be760
LOCALEDIR		= @localedir@
6be760
HTMLDIR			= @htmldir@
6be760
DVIDIR			= @dvidir@
6be760
PDFDIR			= @pdfdir@
6be760
PSDIR			= @psdir@
6be760
ce6529
CFLAGS_COMMON 		+= @cflags_common@
ce6529
CFLAGS_DEBUG 		+= @cflags_debug@
ce6529
CFLAGS_CMDLINE 		+= @cflags_cmdline@
ce6529
CFLAGS_CONFIG 		+= @cflags_config@
ce6529
CFLAGS_SYSROOT 		+= @cflags_sysroot@
ce6529
CFLAGS_OS		+= @cflags_os@
ce6529
CFLAGS_SITE		+= @cflags_site@
ce6529
CFLAGS_PATH 		+= @cflags_path@
ce6529
CFLAGS_STRICT 		+= @cflags_strict@
ce6529
CFLAGS_UTIL 		+= @cflags_util@
ce6529
CFLAGS_LAST 		+= @cflags_last@
ce6529
CFLAGS_ONCE 		+= @cflags_once@
ce6529
ce6529
LDFLAGS_COMMON 		+= @ldflags_common@
ce6529
LDFLAGS_DEBUG 		+= @ldflags_debug@
ce6529
LDFLAGS_CMDLINE 	+= @ldflags_cmdline@
ce6529
LDFLAGS_CONFIG 		+= @ldflags_config@
ce6529
LDFLAGS_SYSROOT 	+= @ldflags_sysroot@
ce6529
LDFLAGS_PATH 		+= @ldflags_path@
ce6529
LDFLAGS_STRICT 		+= @ldflags_strict@
ce6529
LDFLAGS_UTIL 		+= @ldflags_util@
ce6529
LDFLAGS_LAST 		+= @ldflags_last@
ce6529
LDFLAGS_ONCE 		+= @ldflags_once@
fa897a
6be760
USER_CC                 = @user_cc@
6be760
USER_CPP                = @user_cpp@
6be760
USER_CXX                = @user_cxx@
6be760
ce6529
NATIVE_HOST		= @native_host@
ce6529
NATIVE_CFGHOST		= @native_cfghost@
ce6529
NATIVE_CFLAGS		= @native_cflags@
ce6529
NATIVE_LDFLAGS		= @native_ldflags@
fa897a
a6e0dc
ALL_SHARED              = @all_shared@
a6e0dc
ALL_STATIC              = @all_static@
a6e0dc
DISABLE_FRONTEND	= @disable_frontend@
a6e0dc
DISABLE_SHARED          = @disable_shared@
a6e0dc
DISABLE_STATIC          = @disable_static@
fa897a
092288
USE_CUSTOM_CFGDEFS      = @use_custom_cfgdefs@
092288
USE_CUSTOM_USRDEFS      = @use_custom_usrdefs@
092288
d126e0
SHARED_LIB_CMD          = @shared_lib_cmd@
d126e0
SHARED_LIB_LDFLAGS      = @shared_lib_ldflags@
d126e0
08c155
.cflags-host:
08c155
	@printf '%s' "$(CFLAGS)"
08c155
08c155
.cflags-native:
08c155
	@printf '%s' "$(NATIVE_CFLAGS)"
08c155
f67398
.SUFFIXES:
f67398
fa897a
all:
fa897a
install:
fa897a
shared:
fa897a
static:
fa897a
a6e0dc
install-extras:
a6e0dc
install-app-extras:
fa897a
ce6529
include ./ccenv/host.mk
ce6529
include ./ccenv/native.mk
fa897a
ae769d
include ./cfgdefs.mk
ae769d
include ./usrdefs.mk
367386
66f3d8
include $(PROJECT_DIR)/sofort/core/defs.mk
66f3d8
include $(PROJECT_DIR)/sofort/core/pkgconf.mk
66f3d8
include $(PROJECT_DIR)/sofort/core/version.mk
66f3d8
include $(PROJECT_DIR)/sofort/core/flavor.mk
a6e0dc
ae769d
include $(PROJECT_DIR)/project/osforce.mk
fa897a
include $(PROJECT_DIR)/project/tree.mk
fa897a
include $(PROJECT_DIR)/project/depends.mk
fa897a
include $(PROJECT_DIR)/project/headers.mk
fa897a
include $(PROJECT_DIR)/project/common.mk
fa897a
include $(PROJECT_DIR)/project/arch.mk
fa897a
include $(PROJECT_DIR)/project/extras.mk
fa897a
include $(PROJECT_DIR)/project/overrides.mk
fa897a
fa897a
a6e0dc
$(APP_SRCS:%.c=%.o): CFLAGS_STATIC = $(CFLAGS_APP)
a6e0dc
620842
src/%.lo: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
fa897a
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)
fa897a
620842
src/%.o: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
fa897a
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)
fa897a
cde76b
lib/%$(OS_LIB_PREFIXED_SUFFIX)$(VER_XYZ)$(OS_LIB_SUFFIXED_SUFFIX):
d126e0
		$(SHARED_LIB_CMD) $@ $^ $(SHARED_LIB_LDFLAGS)
fa897a
840942
lib/%$(OS_ARCHIVE_EXT):
840942
		mkdir -p lib
fa897a
		rm -f $@
d81ca4
		$(AR) rcs $@ $^
fa897a
fa897a
fa897a
a6e0dc
all:		package-shared package-static app
a6e0dc
a6e0dc
install:	package-install-app
a6e0dc
install:	package-install-extras
a6e0dc
install:	install-libs
fa897a
a6e0dc
app:		app-tag
fa897a
a6e0dc
app.tag:
a6e0dc
		cp $(PACKAGE_APP) $(APP)
a6e0dc
		touch app.tag
fa897a
a6e0dc
install-libs:	package-install-shared
a6e0dc
install-libs:	package-install-static
fa897a
a6e0dc
install-headers-default:
ae9f08
		mkdir -p $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
ae9f08
		cp $(API_HEADERS) $(DESTDIR)$(INCLUDEDIR)/$(PACKAGE)
fa897a
a6e0dc
install-shared:	shared install-lib install-implib
a6e0dc
install-shared: package-install-soname package-install-solink
a6e0dc
install-shared: install-headers
a6e0dc
a6e0dc
install-lib:	shared
ae9f08
		mkdir -p $(DESTDIR)$(LIBDIR)
ae9f08
		cp $(SHARED_LIB) $(DESTDIR)$(LIBDIR)
fa897a
a6e0dc
install-static:	static install-headers
ae9f08
		mkdir -p $(DESTDIR)$(LIBDIR)
ae9f08
		cp $(STATIC_LIB) $(DESTDIR)$(LIBDIR)
fa897a
a6e0dc
install-app:	app install-app-extras
a6e0dc
		mkdir -p $(DESTDIR)$(BINDIR)
a6e0dc
		cp $(APP) $(DESTDIR)$(BINDIR)
a6e0dc
a6e0dc
install-static-app:	static-app install-app-extras
a6e0dc
			mkdir -p $(DESTDIR)$(BINDIR)
a6e0dc
			cp $(STATIC_APP) $(DESTDIR)$(BINDIR)/$(NICKNAME)$(OS_APP_SUFFIX)
fa897a
fa897a
a6e0dc
a6e0dc
shared:		shared-lib implib
a6e0dc
shared:		package-shared-soname package-shared-solink
fa897a
fa897a
static:		static-lib
fa897a
fa897a
shared-lib:	shared-objs $(SHARED_LIB)
fa897a
a6e0dc
shared-soname:	shared-lib $(SHARED_SONAME)
a6e0dc
a6e0dc
shared-solink:	shared-lib $(SHARED_SOLINK)
a6e0dc
fa897a
static-lib:	static-objs $(STATIC_LIB)
fa897a
a6e0dc
a6e0dc
a6e0dc
default-app:	version.tag static-objs $(DEFAULT_APP)
a6e0dc
a6e0dc
shared-app:	version.tag shared $(SHARED_APP)
a6e0dc
a6e0dc
static-app:	version.tag static-objs $(STATIC_APP)
fa897a
fa897a
fa897a
fa897a
shared-objs:	dirs $(SHARED_OBJS)
fa897a
fa897a
static-objs:	dirs $(STATIC_OBJS)
fa897a
a6e0dc
app-objs:	dirs $(APP_OBJS)
a6e0dc
fa897a
fa897a
fa897a
$(SHARED_LIB):	$(SHARED_OBJS)
d84d3e
$(SHARED_LIB):	LDFLAGS_SHARED += $(LDFLAGS_IMPLIB)
fa897a
fa897a
$(STATIC_LIB):	$(STATIC_OBJS)
fa897a
a6e0dc
$(APP):		$(PACKAGE_APP)
a6e0dc
a6e0dc
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
a6e0dc
		rm -f app.tag
a6e0dc
		$(CC) -o $@ $^ $(LDFLAGS_APP)
fa897a
962b8b
$(SHARED_APP):	$(DSO_REF_SOLINK) $(APP_OBJS) $(SHARED_SOLINK)
a6e0dc
		rm -f app.tag
0db753
		$(CC) -o $@ $(APP_OBJS) $(LDFLAGS_APP) -l$(PACKAGE)
a6e0dc
a6e0dc
$(STATIC_APP):	$(STATIC_OBJS) $(APP_OBJS)
a6e0dc
		rm -f app.tag
a6e0dc
		$(CC) -static -o $@ $^ $(LDFLAGS_STATIC)
a6e0dc
a6e0dc
a6e0dc
dirs: 		dirs.tag
fa897a
fa897a
dirs.tag:
36f6a6
		mkdir -p build
a6e0dc
		mkdir -p bin
7e4a87
		mkdir -p lib
fa897a
		touch dirs.tag
fa897a
fa897a
host.tag:	Makefile
8c6daf
		$(CC) $(CFLAGS) -dumpmachine > host.tmp
8c6daf
		mv host.tmp host.tag
74c464
36f6a6
version.tag:	$(GIT_REFERENCE_INDEX) dirs.tag
66f3d8
		$(PROJECT_DIR)/sofort/tools/version.sh	\
620842
			-s $(SOURCE_DIR)		\
a6e0dc
			-o build/$(PACKAGE)_version.h	\
a6e0dc
			-p $(PACKAGE)
a6e0dc
		touch version.tag
a6e0dc
fa897a
distclean:	clean
4cab68
		rm -f ccenv/host.mk
4cab68
		rm -f ccenv/native.mk
ba433d
		rm -f cfgdefs.mk
ba433d
		rm -f usrdefs.mk
2e6edf
		rm -f config.log
fa897a
		rm -f Makefile
53bc75
		rmdir build ccenv bin lib 2>&1 || true
fa897a
a6e0dc
clean:		clean-implib
fa897a
		rm -f tree.tag
fa897a
		rm -f dirs.tag
fa897a
		rm -f host.tag
8c6daf
		rm -f host.tmp
a6e0dc
		rm -f version.tag
a6e0dc
		rm -f app.tag
fa897a
		rm -f $(SHARED_OBJS)
fa897a
		rm -f $(STATIC_OBJS)
a6e0dc
		rm -f $(APP_OBJS)
fa897a
		rm -f $(SHARED_LIB)
a6e0dc
		rm -f $(SHARED_SONAME)
a6e0dc
		rm -f $(SHARED_SOLINK)
fa897a
		rm -f $(STATIC_LIB)
a6e0dc
		rm -f $(APP)
a6e0dc
		rm -f $(DEFAULT_APP)
a6e0dc
		rm -f $(SHARED_APP)
a6e0dc
		rm -f $(STATIC_APP)
de8818
		rm -f build/$(PACKAGE)_version.h
de8818
		rm -f build/$(PACKAGE).pc
fa897a
fa897a
8c6daf
.PHONY:		package-app \
c2ba00
		all install shared static app \
a6e0dc
		shared-objs shared-lib \
a6e0dc
		shared-soname shared-solink \
a6e0dc
		package-shared-soname package-shared-solink \
fa897a
		static-objs static-lib \
a6e0dc
		default-app shared-app static-app \
a6e0dc
		install-shared install-static \
a6e0dc
		install-soname install-solink \
a6e0dc
		package-install-soname package-install-solink \
a6e0dc
		install-headers install-app \
a6e0dc
		install-headers-default install-headers-custom \
a6e0dc
		clean distclean clean-implib version \
a6e0dc
		.display .conf \
6ff2c7
		.display-project .display-env .display-tools .display-flags \
d3070f
		.display-pe .display-dirs .display-build \
a6e0dc
		implib implib-ver implib-soname implib-solink \
a6e0dc
		install-implib install-implib-ver \
a6e0dc
		install-implib-soname install-implib-solink