Blame Makefile.in

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@
f9df4a
PKGDEFS			= @pkgdefs@
f9df4a
PKGLIBS			= @pkglibs@
f9df4a
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_OS		+= @cflags_os@
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
01b183
.SUFFIXES:
01b183
18eb48
all:
18eb48
install:
18eb48
shared:
18eb48
static:
18eb48
9c558e
install-extras:
9c558e
install-app-extras:
18eb48
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
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
$(APP_SRCS:%.c=%.o): CFLAGS_STATIC = $(CFLAGS_APP)
9c558e
60bad4
src/%.lo: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
18eb48
		$(CC) -c -o $@ $< $(CFLAGS_SHARED)
18eb48
60bad4
src/%.o: 	$(SOURCE_DIR)/src/%.c $(ALL_HEADERS) host.tag tree.tag
18eb48
		$(CC) -c -o $@ $< $(CFLAGS_STATIC)
18eb48
52c636
lib/%$(OS_LIB_PREFIXED_SUFFIX)$(VER_XYZ)$(OS_LIB_SUFFIXED_SUFFIX):
9c558e
		$(CC) -shared -o $@ $^ $(LDFLAGS_SHARED)
18eb48
d46ca2
lib/%$(OS_ARCHIVE_EXT):
d46ca2
		mkdir -p lib
18eb48
		rm -f $@
043390
		$(AR) rcs $@ $^
18eb48
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
18eb48
$(SHARED_LIB):	$(SHARED_OBJS)
ace760
$(SHARED_LIB):	LDFLAGS_SHARED += $(LDFLAGS_IMPLIB)
18eb48
18eb48
$(STATIC_LIB):	$(STATIC_OBJS)
18eb48
9c558e
$(APP):		$(PACKAGE_APP)
9c558e
9c558e
$(DEFAULT_APP):	$(STATIC_OBJS) $(APP_OBJS)
9c558e
		rm -f app.tag
9c558e
		$(CC) -o $@ $^ $(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
9c558e
		$(CC) -static -o $@ $^ $(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
18eb48
host.tag:	Makefile
831445
		$(CC) $(CFLAGS) -dumpmachine > 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
51839f
		rm -f cfgdefs.mk
51839f
		rm -f usrdefs.mk
18eb48
		rm -f Makefile
18eb48
9c558e
clean:		clean-implib
18eb48
		rm -f tree.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
6598d3
.display:	.display-project .display-pkgconf .display-env \
6598d3
		.display-tools   .display-flags                \
6598d3
		.display-dirs    .display-build                \
6598d3
		.display-config
9c558e
9c558e
.conf:		PAGER ?= less
9c558e
.conf:
9c558e
		$(MAKE) .display | $(PAGER)
18eb48
8e3666
.display-project:
9c558e
		@echo PACKAGE:'                '$(PACKAGE)
9c558e
		@echo NICKNAME:'               '$(NICKNAME)
8e3666
		@echo PROJECT_DIR:'            '$(PROJECT_DIR)
435f83
		@echo SOURCE_DIR:'             '$(SOURCE_DIR)
8e3666
		@echo BUILD_DIR:'              '$(CURDIR)
8e3666
		@echo
8e3666
f9df4a
.display-pkgconf:
f9df4a
		@echo PKGNAME:'                '$(PKGNAME)
f9df4a
		@echo PKGDESC:'                '$(PKGDESC)
f9df4a
		@echo PKGUSRC:'                '$(PKGUSRC)
f9df4a
		@echo PKGREPO:'                '$(PKGREPO)
f9df4a
		@echo PKGPSRC:'                '$(PKGPSRC)
f9df4a
		@echo PKGDURL:'                '$(PKGDURL)
f9df4a
		@echo PKGDEFS:'                '$(PKGDEFS)
f9df4a
		@echo PKGLIBS:'                '$(PKGLIBS)
f9df4a
		@echo
f9df4a
18eb48
.display-env:
18eb48
		@echo BUILD:'                  '$(BUILD)
18eb48
		@echo HOST:'                   '$(HOST)
55d3a8
		@echo CCHOST:'                 '$(CCHOST)
99366d
		@echo CFGHOST:'                '$(CFGHOST)
18eb48
		@echo TARGET:'                 '$(TARGET)
18eb48
		@echo ARCH:'                   '$(ARCH)
f08094
		@echo COMPILER:'               '$(COMPILER)
722b8c
		@echo TOOLCHAIN:'              '$(TOOLCHAIN)
18eb48
		@echo SYSROOT:'                '$(SYSROOT)
521d20
		@echo CROSS_COMPILE:'          '$(CROSS_COMPILE)
18eb48
		@echo SHELL:'                  '$(SHELL)
edc52c
		@echo
18eb48
18eb48
.display-tools:
18eb48
		@echo CC:'                     '$(CC)
18eb48
		@echo CPP:'                    '$(CPP)
18eb48
		@echo CXX:'                    '$(CXX)
18eb48
		@echo
18eb48
		@echo AS:'                     '$(AS)
18eb48
		@echo AR:'                     '$(AR)
18eb48
		@echo LD:'                     '$(LD)
18eb48
		@echo NM:'                     '$(NM)
18eb48
		@echo OBJDUMP:'                '$(OBJDUMP)
18eb48
		@echo RANLIB:'                 '$(RANLIB)
18eb48
		@echo SIZE:'                   '$(SIZE)
18eb48
		@echo STRIP:'                  '$(STRIP)
18eb48
		@echo STRINGS:'                '$(STRINGS)
18eb48
		@echo
18eb48
		@echo ADDR2LINE:'              '$(ADDR2LINE)
18eb48
		@echo COV:'                    '$(COV)
18eb48
		@echo CXXFILT'                 '$(CXXFILT)
18eb48
		@echo ELFEDIT:'                '$(ELFEDIT)
18eb48
		@echo OBJCOPY:'                '$(OBJCOPY)
18eb48
		@echo READELF:'                '$(READELF)
18eb48
		@echo
18eb48
18eb48
.display-flags:
18eb48
		@echo CFLAGS_COMMON:'          '$(CFLAGS_COMMON)
9c558e
		@echo CFLAGS_DEBUG:'           '$(CFLAGS_DEBUG)
9c558e
		@echo CFLAGS_VERSION:'         '$(CFLAGS_VERSION)
18eb48
		@echo CFLAGS_CMDLINE:'         '$(CFLAGS_CMDLINE)
18eb48
		@echo CFLAGS_CONFIG:'          '$(CFLAGS_CONFIG)
18eb48
		@echo CFLAGS_SYSROOT:'         '$(CFLAGS_SYSROOT)
9c558e
		@echo CFLAGS_OS:'              '$(CFLAGS_OS)
9c558e
		@echo CFLAGS_SITE:'            '$(CFLAGS_SITE)
18eb48
		@echo CFLAGS_PATH:'            '$(CFLAGS_PATH)
9c558e
		@echo CFLAGS_STRICT:'          '$(CFLAGS_STRICT)
9c558e
		@echo CFLAGS_UTIL:'            '$(CFLAGS_UTIL)
4ad4ce
		@echo CFLAGS_LAST:'            '$(CFLAGS_LAST)
4ad4ce
		@echo CFLAGS_ONCE:'            '$(CFLAGS_ONCE)
18eb48
		@echo
9c558e
		@echo LDFLAGS_COMMON:'         '$(LDFLAGS_COMMON)
9c558e
		@echo LDFLAGS_DEBUG:'          '$(LDFLAGS_DEBUG)
9c558e
		@echo LDFLAGS_CMDLINE:'        '$(LDFLAGS_CMDLINE)
9c558e
		@echo LDFLAGS_CONFIG:'         '$(LDFLAGS_CONFIG)
9c558e
		@echo LDFLAGS_SYSROOT:'        '$(LDFLAGS_SYSROOT)
9c558e
		@echo LDFLAGS_PATH:'           '$(LDFLAGS_PATH)
9c558e
		@echo LDFLAGS_STRICT:'         '$(LDFLAGS_STRICT)
9c558e
		@echo LDFLAGS_UTIL:'           '$(LDFLAGS_UTIL)
4ad4ce
		@echo LDFLAGS_LAST:'           '$(LDFLAGS_LAST)
4ad4ce
		@echo LDFLAGS_ONCE:'           '$(LDFLAGS_ONCE)
18eb48
		@echo
18eb48
18eb48
.display-pe:
18eb48
		@echo PE_SUBSYSTEM:'           '$(PE_SUBSYSTEM)
18eb48
		@echo PE_IMAGE_BASE:'          '$(PE_IMAGE_BASE)
18eb48
		@echo
18eb48
18eb48
.display-dirs:
18eb48
		@echo PREFIX:'                 '$(PREFIX)
39ef0f
		@echo EXEC_PREFIX:'            '$(EXEC_PREFIX)
18eb48
		@echo BINDIR:'                 '$(BINDIR)
85e3de
		@echo SBINDIR:'                '$(SBINDIR)
18eb48
		@echo LIBDIR:'                 '$(LIBDIR)
18eb48
		@echo INCLUDEDIR:'             '$(INCLUDEDIR)
669023
		@echo OLDINCLUDEDIR:'          '$(OLDINCLUDEDIR)
18eb48
		@echo MANDIR:'                 '$(MANDIR)
18eb48
		@echo DOCDIR:'                 '$(DOCDIR)
18eb48
		@echo LIBEXECDIR:'             '$(LIBEXECDIR)
18eb48
		@echo
18eb48
669023
.display-exdirs:
669023
		@echo SYSCONFDIR'              '$(SYSCONFDIR)
669023
		@echo SHAREDSTATEDIR'          '$(SHAREDSTATEDIR)
669023
		@echo LOCALSTATEDIR'           '$(LOCALSTATEDIR)
669023
		@echo RUNSTATEDIR'             '$(RUNSTATEDIR)
669023
		@echo DATAROOTDIR'             '$(DATAROOTDIR)
669023
		@echo DATADIR'                 '$(DATADIR)
669023
		@echo INFODIR'                 '$(INFODIR)
669023
		@echo LOCALEDIR'               '$(LOCALEDIR)
669023
		@echo HTMLDIR'                 '$(HTMLDIR)
669023
		@echo DVIDIR'                  '$(DVIDIR)
669023
		@echo PDFDIR'                  '$(PDFDIR)
669023
		@echo PSDIR'                   '$(PSDIR)
669023
18eb48
.display-build:
18eb48
		@echo NATIVE_CC:'              '$(NATIVE_CC)
eb4330
		@echo NATIVE_CPP:'             '$(NATIVE_CPP)
eb4330
		@echo NATIVE_CXX:'             '$(NATIVE_CXX)
eb4330
eb4330
		@echo NATIVE_HOST:'            '$(NATIVE_HOST)
eb4330
		@echo NATIVE_CFGHOST:'         '$(NATIVE_CFGHOST)
eb4330
		@echo NATIVE_CFLAGS:'          '$(NATIVE_CFLAGS)
eb4330
		@echo NATIVE_LDFLAGS:'         '$(NATIVE_LDFLAGS)
d3ea7f
		@echo
18eb48
		@echo NATIVE_OS:'              '$(NATIVE_OS)
18eb48
		@echo NATIVE_OS_BITS:'         '$(NATIVE_OS_BITS)
568015
		@echo NATIVE_OS_UNDERSCORE:'   '$(NATIVE_OS_UNDERSCORE)
18eb48
		@echo
e1fef7
		@echo USER_CC:'                '$(USER_CC)
e1fef7
		@echo USER_CPP:'               '$(USER_CPP)
e1fef7
		@echo USER_CXX:'               '$(USER_CXX)
e1fef7
		@echo
18eb48
9c558e
.display-config:
9c558e
		@echo ALL_SHARED:'             '$(ALL_SHARED)
9c558e
		@echo ALL_STATIC:'             '$(ALL_STATIC)
9c558e
		@echo DISABLE_FRONTEND:'       '$(DISABLE_FRONTEND)
9c558e
		@echo DISABLE_SHARED:'         '$(DISABLE_SHARED)
9c558e
		@echo DISABLE_STATIC:'         '$(DISABLE_STATIC)
4b7770
		@echo
4b7770
		@echo USE_CUSTOM_CFGDEFS:'     '$(USE_CUSTOM_CFGDEFS)
4b7770
		@echo USE_CUSTOM_USRDEFS:'     '$(USE_CUSTOM_USRDEFS)
9c558e
9c558e
.display-host:
9c558e
		@$(CC) $(CFLAGS) -dumpmachine
9c558e
9c558e
.display-cc:
9c558e
		@echo $(CC)
9c558e
9c558e
.display-cflags:
9c558e
		@echo $(CFLAGS)
9c558e
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